Tuesday, October 17, 2017

Still have ambitions of decompiling a 20+ year old exe

Ok, that's not precisely true.  What I want to do is get at the code that can only be accessed by decompiling it.

Dark Forces was my first FPS, I think.  It came in one of the Lucas Arts collections (6 cd sets) and someone got it for me as a gift at some point.  Actually, at more than one point.  This wasn't redundant because CDs can get scratched and such.

Dark Forces lends itself well to certain types of modding and 22 years later the mod community is still active.  However, it also had a lot of information packed inside of the exe itself which utterly prevents changing, updating, or even understanding a vast array of other stuff.

If I take a look in my Dark Forces directory I see four exe files.  There's dark.exe, which I assume contains what I'm interested in, there's imuse.exe which I believe was used to handle the music, there's dos4gw.exe which I'm told is the DOS extender, and there's install.exe which I would hope is for installation.

Dark Forces was written in vanilla C and compiled using watcom.  I have been told dark.exe an LE linear executable.

I really want to be able to get inside of dark.exe (probably imuse too, though for different reasons) even though the odds are very good that even under ideal decompilation I wouldn't understand a damned thing.

-

Here's where things all collapse into flaming wreckage.  Decompilation is a strange and esoteric field.  It doesn't actually have to be.  As in, there are peer reviewed scientific papers out there pointing out that this can be straightforward, and then attaching mathematical proofs that demonstrate that the statement is not bullshit.  No one has actually done the work outlined in such papers.

There are, of course, limits.  Getting back the source code that was used to create something is impossible baring an incredibly unlikely avalanche of coincidence (which would necessarily begin with the people writing the source doing it in a way that people don't write source.)  Getting a source code that reads in a sensible way and would compile into a given exe is possible, but the work on how to do that is in its infancy and the LE format seems to be one of the ones to receive the least attention.

It would be difficult for someone who really understood all of this shit.

For someone (like me) who doesn't know a damned thing about assembly and such, not a fucking chance.

And yet I keep on coming back to this.  I want to be able to crack the game open and look at how it works.  For, I'm going to say this without even attempting to make an accurate tally, about a dozen different reasons.

No comments:

Post a Comment