Prepare 3-5 crabs.
Mix 2 cups cornstarch with a little salt and stir until well combined.
Heat oil in a wok or large pan and fry the crabs until they are golden brown, then set aside.
Finely chop 1 large onion, 5 garlic cloves, and grate 1 inch ginger.
Tumis the chopped onions, minced garlic, and grated ginger until fragrant.
Add 2 tablespoons chili paste and stir until the oil is absorbed by the ingredients.
Add 1 stalk lemongrass and 2 sprigs kari leaves, stir-fry for a few seconds.
Stir in 1 tablespoon kari powder, 1 tablespoon sugar, and 1 tablespoon salt.
Add 2 tablespoons oyster sauce, 2 tablespoons chili sauce, and 2 tablespoons tomato sauce. Stir well.
Add a little bit of water and crack an egg into the mixture, stir until combined.
Return the fried crabs to the pan with the sauce and mix thoroughly.
Cook for another 5 minutes or until everything is well coated in the sauce.
Serve immediately.