Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Boar on April 25, 2007, 12:59:42 PM

Title: Reading Dll Files
Post by: Boar on April 25, 2007, 12:59:42 PM
Is there any way to view dll files in cpp format?
Title: Reading Dll Files
Post by: Brazilian Fan on April 25, 2007, 01:49:19 PM
I wish there was a way...

You can only "translate" the DLL and EXE files on assembly using a disassembler (like win32dasm) or you could try using 'REC' (Reverse Engineering Compiler, I think).
REC translates assembly into a pseudo c-code, but it is still not very readable because of the labels, jumps, RVAs etc.

Every program you write on delphi/c/c++ etc. is translated to an intermediary code by the compiler to perform various kinds of optimizations, then the intermediary code is translated, or to assembly code and it's assembled, or to directly to machine language. During the two translations (or three) and optimizations, lot's of information are lost including variable names, redundant commands, comments, original structure etc.
Title: Reading Dll Files
Post by: BlackBox on April 25, 2007, 01:57:12 PM
Yeah, there isn't really any 'automatic' way to convert compiled DLL files back to the source language.

The next best thing is to, as Brazilian Fan already mentioned, learn x86 assembler and learn how to reverse engineer software for the win32 platform. This way you should be able to reconstruct the DLL source code in its entirety (the DLL files are really not that complex and you could probably write a carbon copy of the DLL in a day or two).
Title: Reading Dll Files
Post by: Eddy-B on May 04, 2007, 02:46:33 AM
I have managed to "translate" 3 dlls back to their source: ademo1.dll ademo2.dll and ademo3.dll
All 3 of these are rather small, and it took me several hours so translate and is painstaking task. It is possible to get the assembler code from a dll file, by using a disassembler or debugger. but it will (most likely) not have any labels or function names, other than the ones that are exported. Even then it's sometimes hard to figure out what certain variables do or what their contents are.
Title: Reading Dll Files
Post by: Nightmare24148 on August 10, 2007, 02:53:07 AM
Ooooo mucho pointers in this thread :).
Title: Reading Dll Files
Post by: Eddy-B on August 10, 2007, 06:11:25 PM
Too bad this forum does not have much you can do with your points :P