Pull the main shell off the crab and discard it. Remove the gray gills and the soft insides. Cut the body in half and then cut between each leg. Crack the legs and claws with the back of the knife or a hammer and set aside.
In a bowl mix the ketchup, chili paste, oyster sauce, soy sauce, and tamarind paste or powder; thin it with 1 cup water and set aside.
Pour the oil into a wok or large skillet over high heat. Add the scallion, ginger, garlic, 1/2 the chile, and cilantro and cook for 1 minute.
Add the crab and stir-fry for another minute. Pour in the sauce and continue cooking, stirring often, until the crab has absorbed the sauce and the sauce has thickened, about 5 minutes.
Put onto a platter and garnish with the rest of the chile and cilantro.