Is it possible to convert 32bit machine code into 64bit?

80 views Asked by At

I have a old game runing on a 32bit exe and couple of dlls. I would like to convert it to 64bit in order to allocate more memory space. Is it possible to convert it to 64bit without the source code? And how much work would that takes?

1

There are 1 answers

0
Igor Levicki On

If the game executable is not encrypted, it is possible to decompile it into assembler code. Some tools like IDA even have plugins to decompile into C.

However, even if you succeed in doing that, said code would not compile without extensive manual fixing (machine decompilation is still far from perfect).

Next obstacle would be the sheer size — between half a million and perhaps ten million lines would be a reasonable estimate for a typical AAA title. For older games you would be lucky if you end up with less than ten thousand lines.

Furthermore, you would still have to change all pointer arithmetic in the code and all game data structures to use 64-bit values which means also editing all resource files which are directly deserialized into memory structures.

Impossible to do? Probably not if you have the required knowledge of reverse engineering and a lot of free time on your hands.

It would be a monumental undertaking and there would be no guarantee that it would work correctly if at all.