Decompile Exe To Source Code

Posted By admin On 11.09.21

Decompile .NET assemblies to C#

Once you have identified a module that requires decompilation, you can right-click on the module and select “Decompile Source to Symbol File”. This action creates a symbol file containing decompiled source which in turn permits you to step into 3 rd party code directly from your source code.

dotPeek is a free-of-charge standalone tool based on ReSharper's bundled decompiler. It can reliably decompile any .NET assembly into equivalent C# or IL code.

The decompiler supports multiple formats including libraries (.dll), executables (.exe), and Windows metadata files (.winmd).

Export decompiled code to Visual Studio projects

As soon as you've decompiled an assembly, you can save it as a Visual Studio project (.csproj). This can potentially save a lot of time if you need to restore lost source code from a legacy assembly. Viking conquest 2.036 serial key.

Download source code and debug third-party code

dotPeek can identify local source code based on PDB files, or fetch source code from source servers such as Microsoft Reference Source Center or SymbolSource.

dotPeek can also perform as a symbol server and supply Visual Studio debugger with the information required to debug assembly code.

dotPeek inherits a lot of features from ReSharper. These include contextual and context-insensitive navigation, usage search, as well as different code structure and hierarchy views.

Find usages of any symbol

Use Find Usages to search for all usages of a symbol, be it a method, property, local variable or a different entity. The Find Results tool window lets you group usages, navigate between them, and open them in the code view area.

Jump to a type, symbol or anything

Whenever you put a caret on a symbol in the code view area, dotPeek offers a plethora of contextual navigation options that are all available via Navigate To drop-down menu.

Navigate to related code

dotPeek indexes all assemblies in your assembly list, as well as all assemblies that they reference, and provides features to quickly jump to specific code. For instance, Go to Everything allows searching for an assembly, namespace, type, member, or a recently opened file.


Long-time users of JetBrains ReSharper will feel at home working with dotPeek as it provides ReSharper-like navigation and search, code insight, and familiar keyboard shortcuts.

dotUltimate: Empowering Your .NET
and Visual Studio Development

dotUltimate is a single license that allows a single developer to use these JetBrains tools:

dotUltimate license also covers plugins for dotCover and dotTrace in Rider.

Share some tips and experiences here.Keep the author's information and article links for sharing, reprinting or citing your hard work.

Author's environment:


Theoretically, systems with win7 and above and any version of python are available.

1. Basic scripts

First, we build a simple script, such as output a series of numbers, text, and so on. Here we output a series of words and calculate the power of three times at the same time.

Save this script as and run it:

As you can see, the script is working correctly.

Decompile Exe To Source Code

For demonstration purposes, we create a new script into the script file and import the test function from mylib.

2. Package as exe using PyInstaller

Package it as a single exe using the following command (remove-F is not a single exe)

/ozone-stereo-imager-serial-key/. The packaging process is as follows:

Finally, build, disk folders are generated in the directory.Where exe file is in disk.It is working properly.As follows:

3. Decompiled Pyinstaller packaged exe

Such exe s can already be migrated to other computers for use, and this is the end if it is for the convenience of other computers.Sometimes, however, we may use this feature for many people, but if you don't want to open source or be cracked by others, this is not enough.

Because at this point exe can be decompiled by others.

Tools used here:

exe decompile tool: Click here to download

pyc decompile tool: Easy Python Decompiler Or decompile pyc online.

Place in the same directory as the exe file and execute the following cmd command:

If executed successfully, a new decompiled folder, main.exe_extracted, will be generated in the same directory, as shown below:

At the same time, we can find the mylib module, which was introduced by exe at that time, in pyc format, in the path circled below.

pyc format file, decompile is very simple.Using the tools provided in the previous section or finding an online minute decompile on the web, let's look at the results of the decompilation:

As you can see, the source code is basically decompiled perfectly.Where Chinese is involved, coding problems will change.But the non-Chinese part is almost the same.

Ask you if you are afraid!!!

4. Compile scripts as pyd to prevent decompiling

Fear, hath.

How to solve this problem, consider compiling the module py file into a dynamic link library, which makes cracking more difficult.In python, the pyd format is a dynamic link library.Use cython to compile, and if anaconda comes with it, some pythons may not have cython, just install it:

We create a new py file in the folder where is located. Here I name it, which reads as follows:

Then execute the following cmd command:

The process and results are illustrated below, with the red-box PYD file compiled.Since I am a 64-bit system and python, an amd64 suffix is generated, so we can rename this deletion to mylib.pyd.

Note: When both mylib.pyd and exist, the import priority is pyd>py, so PYD is the default import without removing the PY file.

At this point, we delete the build, disk folders, repeat Step 2, and compile to exe again.

Note: Compilation requires a relevant VC environment, as Python 3.5 is based on the VS14 version, so I installed it here as well.It cannot be compiled without installation.

You can verify that:

After decompiling main.exe again, mylib.pyc could not be found under the original path E:tdistmain.exe_extractedout00-PYZ.pyz_extracted.

Because he is no longer a file that can be decompiled directly.

Where is he? He exists in the upper directory as a pyd.As follows:

Decompile Exe To Source Code Generator

pyd's decompilation is quite difficult, so you're done!

Reference link: (pyinstaller-F--key=***encrypted pyc prevents decompilation) pycropto needs to be installed during this process, which is cumbersome to install:

Decompile Exe File To Source Code

Added by friday_13 on Fri, 02 Aug 2019 03:46:14 +0300