Follow Minder's advise and simply buy a known working one for a few cents...
Otherwise you will need to first harvest it, then try to program it and hope it's not locked down.
I know many UPSes have AVR or PIC inside... but it's not something worth while unless you need something right away or have no other sources.