exe to C++ source code

M

Michael Dekson

Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.
Thanks
 
S

Sharad Kala

Michael Dekson said:
Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.
Thanks

Not one I know of.
Compilers make many optimisations etc in the exe, so it's difficult to reach the
source code from the exe.

-Sharad
 
L

lallous

Michael Dekson said:
Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.
Thanks
This has been discussed over and over, one of the replies I liked was:
"Can you return a hamburger back to a cow?" ;)

You can recover / rebuild the source code back from the binary but that will
take lots of time and that is rather called reverse engineering.
 
P

Peter van Merkerk

Michael Dekson said:
Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.

What you are asking is how to turn a hamburger into a cow.

It is not possible to produce reasonable C++ source code from an .exe file,
even if you know exactly which compiler and the compiler settings (e.g.
optimization) were used to create the executable. Simply too much
information is lost in the compilation process.
 
T

Thomas Matthews

Sharad said:
Not one I know of.
Compilers make many optimisations etc in the exe, so it's difficult to reach the
source code from the exe.

-Sharad

See my reply to your later post.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
D

David Harmon

This has been discussed over and over, one of the replies I liked was:
"Can you return a hamburger back to a cow?" ;)

You can, but it is no longer legal in informed locales due to BSE risk.
 
T

Thomas Matthews

Peter said:
What you are asking is how to turn a hamburger into a cow.

Wrong. He is asking how to create a source file from an executable
code. This is far different than turning hamburger into a cow.
It is possible to create source code from an executable. The
probability of it looking like the original source code is
extremely low, so low that you would win a lottery many times
over.

It is not possible to produce reasonable C++ source code from an .exe file,
even if you know exactly which compiler and the compiler settings (e.g.
optimization) were used to create the executable. Simply too much
information is lost in the compilation process.

Reasonable is in the eye of the beholder. I agree that the
generate source code will be difficult to understand.
However, I think many newbies should attempt the project just
so these posts will stop.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
G

Guest

Only to x86 Assembly.

Maybe to C but produced source will have no similarity with official source.
 
T

Thomas Matthews

Only to x86 Assembly.

Maybe to C but produced source will have no similarity with official source.

1. Don't top-post. Replies are append to the end or
interspersed.

2. One can parse a Windows executable file into ARM assembly
or other assembly language, then into C or C++.
There are "byte-code" assembly languages which are an
intermediary step between the high-level language and
the platform. Many compilers, which compile to different
platforms, use this technique. They have specific back
ends that translate the intermediary language into
platform specific instructions.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,427
Latest member
HildredDic

Latest Threads

Top