8 small dried hot chiles, such as Chinese or cayenne, stems and seeds
1 large dried semi-hot chile, such as guajillo, pasilla or New Mexico, stem
and seeds discarded
1 small shallot, coarsely chopped
1 tablespoon sugar
3 tablespoons Thai fish sauce (nam pla) (See Note)
1 1/2 tablespoons tamarind concentrate dissolved in 1 1/2 tablespoons boiling
water (See Note)
1 teaspoon fresh lime juice
2 cups plus 3 1/2 tablespoons vegetable oil
1/4 cup diced (1/2 inch) soft tofu, patted dry
2 teaspoons unsalted peanuts
2 tablespoons coarsely chopped dried shrimp (See Note)
2 large eggs, lightly beaten
1/2 pound medium shrimp—shelled, deveined and halved lengthwise
2 cups mung bean sprouts
Lime wedges, for serving
In a large bowl, cover the rice vermicelli with cold water and let soak until pliable, about 20 minutes. Drain the vermicelli.
In a medium bowl, cover all the chiles with boiling water. Let soak until softened, about 10 minutes. Drain and coarsely chop the chiles.
In a mortar or mini-processor, grind the softened chiles, shallot and sugar to a paste. Work in the fish sauce, tamarind liquid and lime juice. Set the chile paste aside.
In a wok or medium saucepan, heat 2 cups of the vegetable oil until shimmering. Add the tofu and deep-fry over moderately high heat until golden brown, about 4 minutes. Using a slotted spoon, transfer to paper towels to drain. Add the peanuts to the oil and deep-fry until golden brown, about 2 minutes; drain on paper towels. Fry the dried shrimp until crisp, about 1 minute, then drain on paper towels. Reserve the oil for future frying or discard it.
Heat the wok over moderately high heat. When it is very hot, after about 2 minutes, add 1/2 tablespoon of the remaining oil and heat until shimmering. Season the eggs with salt and lightly stir-fry until they start to set. Shape the eggs into an 8-inch round, flatten slightly, then turn over and cook until firm, about 10 more seconds. Transfer the egg cake to a work surface and cut it into long 1-inch-wide strips.
Heat the remaining 3 tablespoons oil in the wok over moderately high heat until almost smoking. Add the chile paste and stir-fry until fragrant, about 4 minutes. Add the fresh shrimp and stir-fry until bright pink, about 3 minutes. Add 1/3 cup of water and the soaked rice vermicelli and stir fry until tender, about 3 more minutes. Add more water if necessary to keep the noodles moist. Add the egg strips and toss again. Transfer the noodles to a platter, garnish with the fried tofu, peanuts, dried shrimp and bean sprouts and serve with lime wedges.
Dried rice vermicelli, Thai fish sauce, tamarind concentrate and dried shrimp are available at Asian markets, well-stocked supermarkets and specialty food stores.