Valhalla Legends Forums Archive | General Programming | Another good idea for a project..

AuthorMessageTime
iago
This is just an idea to throw out, since I have very little free time and am already tied up in my own projects, but eh?

Writing a good decompiler.  Basically, take a disassembler to the next level; have it convert code right back to C or C++, including known header functions it finds, various function conventions (__cdecl, __fastcall, etc).

This would probably be very difficult, but eh?

That's all for now.. it's about 6 hours past my bed time :)
December 31, 2002, 5:21 AM
Yoni
Tell me when you've made it better than IDA :)
December 31, 2002, 10:39 AM
iago
I'll get right on it :-P

It's on the bottom of my real life priority queue right now, and the queue is big and my speed is slow, so it could take awhile :)
December 31, 2002, 3:37 PM
St0rm.iD
It'd require figuring out how vc++ expands ifs and classes. You'd probably need to write a debugger too, to runtime check the types of variables PUSHed on the stack as function args.
January 5, 2003, 2:12 PM
Eibro
Good luck once you get into virtual functions/dynamic binding/inheritance/templates/polymorphism or even classes for that matter... one word: Impossible.

You might be able to get some level of conversion to C, but you'll never be able to convert it back to it's C++ equivalent. (Assuming it was written in C++)
January 5, 2003, 3:34 PM
Adron
Also note that optimization modifies all the original structures generated very much - interleaving instructions from different source code lines, removing/joining redundant instructions etc.
January 6, 2003, 12:57 AM
Skywing
Not to mention how much things can change depending on the compiler used (ebx used as this sometimes in VC7, for example).
January 6, 2003, 8:17 AM
Grok
And, and, and ... good luck when ... you know ... good luck.
January 6, 2003, 5:19 PM
iago
If it was easy, there would already be one floating around, but I've never heard of one so it must be fairly difficult :-D
January 6, 2003, 10:41 PM

Search