Preheat a wok over high heat until hot.
Add the oil and swirl to coat. Add the garlic, ginger, and a pinch of salt, stir-frying until fragrant, about 30 seconds.
If needed, break up the rice with your hands before adding to the wok; stir-fry until warmed through, 2-3 minutes.
As the rice cooks, beat the eggs with the sesame oil and a pinch of salt and pepper in a small bowl.
Push the rice to the sides of the wok to create a large hole or pocket in the center; add the egg to the center and stir-fry until softly scrambled, 20-30 seconds.
Add the crab meat, peas, soy sauce, and basil leaves, if using. Cook and stir until the rice is piping hot and the crab meat is warmed through, 2-3 minutes.
Divide between bowls and serve straight away for best results.