Hi, I've got an .exe file and I need to know in what language the program has been developed. And also is there a trick to view the code (basing on that .exe file) ? I used the Reflector and now I know it is not .NET
views:
102answers:
2I've got an .exe file and I need to know in what language the program has been developed.
Generally speaking this is impossible. Every language could conceivably compile their version of "Hello, world!" targeting a given platform (or executable format) to the same executable (byte for byte).
And also is there a trick to view the code (basing on that .exe file) ?
No, see above. However you can try a decompiler of your choice.
Compilation of a high-level language into a low-level .EXE is typically a one-way process - it's almost impossible to reliably extract meaningful information from the executable regarding the original language once the process is complete. You might get lucky and find some identifiable cues left in the binary, or of course find an accompanying file (like a .pdb) which yields clues as to the original language.
However, what the .EXE contains is (typically) assembly language, and this can sometimes be decompiled back into a high-level representation of the program. Note that this is never going to give you an instruction-accurate source file - the result is likely to be very 'wordy' and difficult to follow, simply because of what the compiler did in the first place - which was turn a high-level 'conceptual' complex language into a stream of low-level instructions, throwing away most of the contextual cues which aren't needed for the CPU to execute the code.