Hacker News new | ask | show | jobs
by speeder 1902 days ago
I reverse engineered some games trying to fix them.

If they were made in ASM? Well, then it is easy, what you get from the decompiler is probably very close to what went into the compiler.

C? It gets harder, but decompilation to C is possible, you lose function names and whatnot but that is alright.

C++? Then you are 100% screwed, virtual functions, polymorphism, etc... it all becomes just a huge mess, if they used some common libraries it helps (STL, BOOST, etc...) but if they made a ton of custom classes that have virtual functions, polymorphism and composition at same time, then nothing can be done, you will get some ASM that almost looks like non-sense.

2 comments

That depends on how much time you're willing to invest. The recently DMCA'd re3 project is a full decompilation of Grand Theft Auto 3 and Vice City, through a clever combination of all released versions (eg. the Android version leaked some symbols, Renderware signatures were somewhat recognizable on PC and PS2), pre-existing community knowledge (The mission script format had already been reversed which provided many clues by looking at its interpreter, many memory addresses were known by the modding community, etc.) and just a massive collective effort, it fully reversed the cpp game that is Grand Theft Auto 3 (and VC).
Honestly, I think decompiled C++ might be easier for me to read than regular C++. Half of the confusing parts are compiled out entirely.