I have a locked .exe file....is there a way to view to code?
I cant right click on it and click open with notepad for example....how do i view this code if its a .exe file.
It opens up in command prompt....
I have a locked .exe file....is there a way to view to code?
I cant right click on it and click open with notepad for example....how do i view this code if its a .exe file.
It opens up in command prompt....
The code inside an .exe file is in assembly, not C.
C code (portable, human friendly) is compiled by a C compiler into assembly. Assembly is platform specific, meaning the exact same C code will produce different assembly code on different platforms. Which a big reason to use C.
Also, assembly is not so easy to understand. You can examine an .exe for assembly, which contains other OS stuff as well, I dunno how on windows. But there is no C source there to look at.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Actually the code in an .exe is machine code, not assembly language
(Unless the exe is just a wrapper for an interpreter or JIT-compiler, like .net/autoit/etc. But that's beyond the scope of this post)
The process goes: c code -> (compiler) -> assembly code -> (assembler) -> machine code
You can disassemble a compiled binary to get the corresponding assembly listing. (Not necesserily the same code as produced by the compiler because of optimizations)
And I'm not trying to be rude here; but if your best idea is trying to open an .exe file in notepad then you won't be able to understand the output from said disassembler.
On a side note; there are also a few decompilers around. But noone that works perfectly, and getting back the original c code is impossible.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge