Decompiling A .gpe


TheMinder

Member
Joined
Mar 21, 2006
Messages
150
I'm pretty sure I know the answer to this already, but is it possible to decompile a gpe back to source even in a limited way ?

I've been hunting around for something I did ages ago and have managed (by chance) to hunt down the gpe but the source seems to be long gone.
 
I don't know of any decompilers for ARM. There are a few for x86, ranging from primitive and free to not quite as primitive and expensive. You're never going to get back something very closely what you had originally, but it'd probably be a lot more useful to deconstruct from than disassembly would be. But that's probably your only option right now. For that you can use objdump.

How big is the binary? Do you remember what level of optimization you compiled it with?
 
It's ~940Kb and knowing me will be unoptimised.

I knew it was very unlikely having tried things like this before, but as you say anything would be better than nothing (although it's not earth-shattering stuff so I could start from scratch if needs be), and it's worth trying to be lazy in the first instance !

;)
 
In my experience it wastes more time than it returns :)

ie: If you need to look up somethign specific .. like in the middle of some giant app yo ujust need to find the key in a hash algorithym, its worth it. But if you want to get a >=5000 line program back .. far better to just start over :)

jeff
 
I actually agree if i'm honest (instead of lazy!) and it was far less than 5000 lines.

Thanks for the replies, was worth a shot in case there was a new magical tool !
 
Do you remember how many lines it is then? If your code could be disassembled in isolation then it might not be too bad to hand decompile. The hard part would be separating it from the library functions that got linked in and made it the relatively huge size it is. That is, unless it still has all of its symbols, in which case you'd probably be able to recognize them and delete them and all their children.
 
REC gave me a list of functions so at least it will jog my memory a bit - i'll do it better this time round anyway :)

Cheers for the replies.
 
IDA can disassemble ARM code quite nicely. I used it on the GP32 to disassemble the firmware code to figure out how the USB stuff worked, and on the GP2X to find how they setup the netchip.

You need to know ARM assembler before you can make good use of it however, unless you can run the Hex rays decompiler on ARM code (I've only tried it on x86, to which it makes a decent effort, but still no where near the original code due to typical compiler optimisations)
 
Back
Top