Score the fish on both sides.
Heat the cooking oil in a non-stick pan. Pour in the beaten egg and cook until set. Scoop out the egg, transfer to a chopping board and coarsely chop. Set aside.
Reheat the cooking oil and lightly fry the fish to sear both sides.
Push the fish to one side of the frying pan. Saute the chopped onion in the hot oil. When it starts to turn soft, add the garlic and cook for about 30 seconds. Add the tomatoes and cook for another 30 seconds. Stir in the chopped tofu.
Push the fish to the center of the frying pan, moving the vegetables around it. Pour in a quarter cup of water. Season with 2 to 3 tablespoonfuls of fish sauce. Sprinkle liberally with ground pepper. Cover and cook over low heat for about 15 minutes.
With a large slotted spatula, lift the fish and transfer to a serving platter.
Add the chopped egg to the vegetables and tofu. Cook until the egg is reheated. Season the salsa with more fish sauce and pepper if necessary.
Pour the salsa over the fish. Sprinkle with the chopped onion leaves and serve with hot rice.