LED circuit with epoxy and (broken?) transistor
The transistor is jellybean Chinese PNP transistor. The specs (and even the pinout) vary somewhat from maker to maker- no JEDEC standardization here, but it's broadly similar to the Fairchild SS8550. They seldom fail if not abused. 

Anyway, the thing under the blob is an IC chip (Chip-On-Board), and chances are very good that's where the problem lies (quite possibly in the wire bonds to the chip). In which case, the unit is not economically repairable. That construction technique is not particularly good (reliability-wise) for this kind of application but it is very cheap in high volume.  

You could always hack in a mechanical switch (toggle or whatever) across the transistor and ignore the electronics. It's mostly there to allow an almost free momentary switch and allow blink modes. I'd try to disconnect the chip itself - I find that the one I have slowly drains the 4 AA cells whilst allegedly off. Or if you're ambitious beyond all reason, hack in a small microcontroller to drive the transistor.