|
|
|
|
|
by slacka
4430 days ago
|
|
Very impressive! I just left a bug report with instructions to get it working with VC2013 Express. How does your technique in epanos compare to https://github.com/notaz/ia32rtools used to decompile Starcraft so it could be ported to ARM? If you do get around to it, I'd love to see a Linux version. Even a 32-bit only version would be sweet. I've had great success with the ia32-libs getting 32-bit apps to run on 64-bit OS's. |
|
I saw ia32rtools when it was released (and was impressed, since x86 is so much more difficult than MIPS), but I haven't had a good chance to really look over how it works. But I think his approach is roughly the same in spirit--the translation from disassembly to C is pretty direct. His tool has to track the stack, set flags for instructions that change them, and other things like that; my decompiler doesn't bother with the stack at all (the ElectroPaint binary has no functions that spill arguments to stack and never adjusts the stack pointer within a function), and MIPS doesn't have "flags" (ALU comparison results are just stored in a GPR, though floating point comparisons do have a flag--I think later MIPS versions have multiple condition FPU registers though). Both tools handle variable argument functions, and of course in order to do so you have to have special handling of each function--that's why my decompiler has an entire parser just for printf and scanf...fortunately the only variable argument functions used by ep. :)
I don't know if or when I'll have time for a Linux version, but I would love to see it made available for all OSes. I just know I can't personally commit to properly maintaining it for more than one platform for the time being, mostly because of the 64-bit issue more than anything...