Carpathia
January 22nd, 2003, 15:11
I remember three very old tutes by a guy called BadToast but they were all trivial patches and not really worth reading. Latigo wrote a palm reversing tute on this site, but Im not aware of many others.
There is no way I know of to easily (read quickly) unpack a palm app. It can be done with debuffer, I spent a long time on a doc reader app, dumping portions from debuffer, turning this hex dump back into real binary, and then patching this back into the app and fixing up the structure. Its not much fun but can be done if youre willing to put the time in. Perhaps todays pda debuggers have progressed enough to make this easier, maybe try palmdebugger or southdebugger.
Im hoping to add a feature to pdemon which will allow you to replace code segments, and it will fix up the application structure, but at the moment its just another feature on my long to do list
RE: Palmwars, this is not actually packed that I can tell, but appears to be compiled as a standalone binary written in FORTH (Oh FORTH, my day grows brighter every time we cross paths).
The actual code is held in the p4ap resource, locked into memory by the stub (the only bit of the disassembly palmdemon is showing you), and then executed. This doesnt really help you because you still need to be able to get at the p4ap disassembly. Palmdemon is currently 'in between' versions and so I am reluctant to release a version which allows you to disassemble the p4ap segment. In the meantime however, you should be able to export the resource from pdemon (right click on tree view node), and then run this through one of the other disassemblers (pildis, pilotdis), and see what this brings up. Note that I havent tried this, there is a possibility the dumped p4ap is still packed, with the decompression routine begin written in FORTH :-)
I will investigate further when I have time.
Regards
Carpathia