Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get source code of a Windows executable?

Tags:

I've got some old Windows executable files. How can I edit them with Visual Studio 2010? What are the ways to see an exe's source code?

like image 263
Ali Demirci Avatar asked Apr 17 '10 18:04

Ali Demirci


2 Answers

You can't get the C++ source from an exe, and you can only get some version of the C# source via reflection.

like image 170
i_am_jorf Avatar answered Oct 13 '22 19:10

i_am_jorf


If the program was written in C# you can get the source code in almost its original form using .NET Reflector. You won't be able to see comments and local variable names, but it is very readable.

If it was written C++ it's not so easy... even if you could decompile the code into valid C++ it is unlikely that it will resemble the original source because of inlined functions and optimizations which are hard to reverse.

Please note that by reverse engineering and modifying the source code you might breaking the terms of use of the programs unless you wrote them yourself or have permission from the author.

like image 34
Mark Byers Avatar answered Oct 13 '22 20:10

Mark Byers