can i get cpp file from exe file ??


i trying to find the way that i can get cpp file from the exe (that has been generated by vc++)
is it possible?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I'm affraid that once compiled program can't be brought back to .cpp file ...
And if that is the case that only in form of decomposed original in Assembler language.
The compiling process is actually one way directions, there are numerous optimizations in questions that are being done to establich an .exe files which can't be back-tracked to restore the original file.

I'm sorry.

Hope this explains it ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jaime OlivaresSoftware ArchitectCommented:
Definitively no. You can't.
A binary (.exe) file doesn't have variables information or source code information, unless it have specific debugging options.
Release (non test) executables don't use to have this information. A simple test: open your exe file with an hexadecimal editor, if you don't see variable names, then you won't obtain nothing.
murugesandinsShell_script Automation /bin/bash /bin/bash.exe /bin/ksh /bin/mksh.exe AIX C C++ CYGWIN_NT HP-UX Linux MINGW32 MINGW64 SunOS Windows_NTCommented:
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

This is an endless debate. The comnclusion always is - No, you cannot get your source code written in a high-level language back from a compiled binary executable.

The reason is simple. There are irreversible factors that go into the making of an executable program. Here is what happens, in brief.

(1) Program is compiled and a symbol table is created
(2) Procedures and functions are compiled
(3) Optimization, if any applicable, is done
(4) Various compiled modules are linked to form an executable binary
(5) OS specific headers are added to the file

You can see that first three steps are not reversible. And they are what will make it impossible to generate the source code back. Any good decompiler can reproduce a reasnably readable assembly code from a binary executable. But converting assembly instructions again to get back the HLL source code is a huge challenge.

I am not sure if there has been developed any intelligent decompilers that can produce source code in a high level language, but even if they do so, rest assured what they will reproduce will be significantly different from the original source code.

In fact as you know the compiler maybe you can. You'll need a computer with the headers used to compile the program, at least those you know. Then you can search for a decompiler. Search at and at

Actually, you CAN get SOURCE code back from any executable. But the chances of understanding it in any meaninful way is not good.

The c++ source would look something  like:
String  a001="0";
String a002="1";
int a003=1;
for (a003=0; a003-<=100;a003++){}

and where the decompiler fails to decompile the code it will throw the assembly code inline in the C++ program, which would look like :
<cpp  code snipped>
inline ASM
{ add ax, 3
add ax, 3
rot ax, 3
bnl ax, 3
add ax, 3
div ax, 3
mul ax, 3
<more c++ code here>

And to JUST get that virtually useless code out of the binary, you need to know exactly which compiler created the code in the first place, such as GCC, intel C++, MS vC++, and you need to know exactly what version of the compiler was used, and exactly what command line parameters were used. Theres even some tools on internet to do it. The are called DE-Compilers, or reverse compilers.

Such as this one called DCC

Now, having said that its also illegal to use decompilers in a corporate envioronment on someone elses code you dont own, in the USA. Due to the DMCA act which specifically forbids reverse enginerring or decrypting without permission by federal law now.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.