In this tutorial, I am going to show you how to decompile or reverse engineer Windows executable file (.exe and .dll files) and get the source code back. This tutorial is going to be easy-peasy for a beginner to learn. If you’re a fast-learner, please feel free to skim the text.

For this tutorial, I am creating a dummy project which displays “Hello world” in Visual Studio to demonstrate how to get the source code back.

Here we go, here’s the project we are going to decompile.

Creating a Visual Studio Project

Here are the code and the output. We are going to get the same code after decompilation.

Project Code and Output

Let’s start decompiling the above project

Now that we created a sample project, let’s try to decompile the above project using Telerik’s JustDecompile.

In case you don’t have this software, please download and install it from here

Step – 1: Open JustDecompile

Open JustDecompile application. If you have installed this software now, probably you will get a shortcut created on your desktop. Otherwise, open it from the Start Menu

Step – 2: Locate the executable file you want to decompile

Open the file you want to decompile in JustDecompile or just drag and drop your files(.dll or .exe) on the interface.

I’m using the normal way. Just navigate to Open… -> File(s) or just press Ctrl + O on your keyboard and choose your file using File Explorer.

If you have created the project now. then you can find your executable file in the bin/Debug folder of your Project Directory. Here I have mine.

Open JustDecompile

Step – 3: Reverse Engineer

Here we go to the actual part. The DECOMPILATION

When you open a file in JustDecompile, it will decompile the file and adds the file to the current workspace. You can browse through the left sidebar for the project files.

In my case, I got my source code back. Take a look in the picture below.

If you need to check the source code only, you might stop here. In case you need to create a Visual Studio project from the source code. Then follow the next step.

Step – 4: Creating a Visual Studio Project

So, now you have the source code. Here is what you have to do in order to create the Visual Studio Project from the decompiled source code.

Navigate to Tools -> Create Project. This will create Latest Visual Studio Project (Currently VS 2017).

If you want to create a Legacy project (for earlier Visual Studio Versions), then click on Create Legacy Project

Then create an empty directory and then open it. Then click on Save.

This will create a Visual Studio project in the given directory and you are good to go.

This is how you can reverse engineer and get your source files back. If you have any problems regarding this article, please feel free to drop a comment below. Thank you! 🙂