Is it possible to retrieve source file from an exe?

It depends on the underlying language that the developers used.

For Java and .NET languages it is possible most of the time to "de-compile" the source code. it's not going to be the true original code (variable names will be different, optimizations by the compiler will have rearranged code, etc) but it will be close.

Other languages such as C/C++ are not so easy.

As far as the ethics go, if you are just a hobby coder interested in playing around then that's fine. However, if you are a professional and you're trying to get source code to copy an app then that's very unethical and a big no-no!


If the application is written in one of the .NET languages (VB/C#), you can use Red Gate's Reflector reflector.red-gate.com to disassemble the application into corresponding source files. Not every application is written in managed languages like this though, and decompiling a C++ application, or one written in Delphi or another non-managed language is not nearly as easy, and all you can really get are hex dumps, which are very difficult to then reconstruct into an actual application.


You can't do it if your .exe code is in C/C++, but if it is in C# you can do it. I don't know a good tool for that, but one way is using ANTS Profiler. It shows you all objects, methods and arguments from a C# binary.