Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
kooltore

Reverse engineering and decompiling

Recommended Posts

Hi all,

I've been reading the posts in this thread with a lot of interest, since I'm interested in obtaining the source code, or something close to the source code, of games which don't have their source code officially released, like Strife, Corridor 7, or the early Xatrix games. I read that Randy Heit decompiled the strife executable to obtain the code, is he available to contact? I would like to know what program he used to decompile the .exe. I have a program which decompiles .exe files called Ida Pro, but I'm not a programmer, so I can't get much use for it. The program generates assembly code, and a clean organized code structure which can be turned into readable code by a talented programmer. Is someone around here knowledgeable of assembly code, which is also interested in decompiling the source for these games? I would like to know. I would like to contribute in getting the source of these and another games' source codes.

Thanks

Share this post


Link to post

Decompiling means to recreate the source with a tool.

ZDoom's Strife code was done by rewriting equivalent code from analyzing the disassembly.

Share this post


Link to post

So, then, what program was used to dissasemble the strife .exe?

I assume it was IdaPro. It is the most powerful program for decompiling. By means of IdaPro I completely decompiled Doom2.exe, Doom95.exe and partially tasdoom.exe, dosdoom.exe and doom12.exe for fixing many problems of incompatibility between these engines and prboom-plus

Share this post


Link to post

Good to know, entryway, would you be able then, since you have ida pro, to decompile completely the source code of games like Corridor 7, Strife, etc, so as to be able to write a win/linux source port for them?

Share this post


Link to post

Disassemblers take a compiled binary and render low-level assembly code; ie. a human readable version of machine instructions. This is not the same as source code, which for Strife would have originally been in C. Decompilers are extremely limited tools which attempt to reconstruct source from assembly. Because compilation causes a large loss of information and is not strictly a reversable process, no decompiled source is the same as the original source.

Here's an illustrative contrast between what the two might look like:

Decompilation:

int v01;

void func01(void)
{
   v01 = 1;   
}
Disassembly:
v01: dword
func01:
sto v01 $01
ret
It can be difficult enough to figure out what decompiled code does, as it lacks comments or descriptive variable and function names. Disassembled code can be even more difficult to deal with as it must be more or less mentally decompiled.

Share this post


Link to post

It's a lot of work to dissect an entire game and gather useful information from disassembly alone. Without the existing Doom source it would have been nearly impossible to figure out how Strife works.

Share this post


Link to post

But in the case of corridor 7 for example, the code of wolf3d is available, so its a starting point, just as hexen/heretic since they are based on doom.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×