Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I decompile a .dll file?

Tags:

decompiler

dll

I have a .dll I would like to decompile to make some improvements to the code. What are some tools out there that will allow me to do this?

It's written in VB, I believe.

like image 517
curiousgeorge Avatar asked Mar 04 '11 17:03

curiousgeorge


People also ask

Can DLL files be decompiled?

Such a DLL is compiled to machine language and can only be directly decompiled to assembly language. So, again, it depends on the language used. And the answer might be that it's just not possible to get anything resembling the original source code. Then, as stated, if it's Visual Basic, research p-code decompilers.

How do I convert a DLL file to readable?

Download and install a decompiler. In order to see the code that makes a DLL file work, you will need to use a decompiler to revert it back into readable code. Opening a DLL file without a decompiler (such as opening it with Notepad) will result in a jumbled mess of unreadable characters.

What is a DLL decompiler?

A "decompiler" is a program that allows you to see the source code that was used to construct a file or program, in this case a DLL file. In order to see the code that makes a DLL file work, you will need to use a decompiler to revert it back into readable code.

How to decompile a DLL file to a VB file?

Then close the Add-Ins window. Go to File and click Open and choose the dll that you want to decompile, select the output directory and select appropriate settings as your wish, Click generate files. Thanks & Good luck! Try .NET Reflector, It will decompile your dll into C# or VB. Reply if success. Good luck !

How to remove a DLL file in Windows 7?

1 Open the Command Prompt. ... 2 If you are using Windows 7 or newer, open the folder containing the new DLL file, hold the Shift key and right-click in the folder, and select "Open command window ... 3 Type regsvr32 dllname .dll and press Enter. ... 4 Type regsvr32 -u dllname .dll to remove the DLL file from the Windows Registry.

How can I get the source code of a DLL file?

Finally, if it's written in a language like C++, there is no direct way to obtain the source code. Such a DLL is compiled to machine language and can only be directly decompiled to assembly language. So, again, it depends on the language used.


4 Answers

The answer depends on what language the DLL was written in.

If it was a .NET language then, as pointed out, you can use .NET Reflector.

If it's the older Visual Basic (pre-.NET), then the DLL is compiled as what's called p-code and there are a few options for doing some variations on decompiling.

Finally, if it's written in a language like C++, there is no direct way to obtain the source code. Such a DLL is compiled to machine language and can only be directly decompiled to assembly language.

So, again, it depends on the language used. And the answer might be that it's just not possible to get anything resembling the original source code.

like image 130
Jonathan Wood Avatar answered Sep 26 '22 06:09

Jonathan Wood


JetBrain's dotPeek billed as the Free .NET Decompiler and Assembly Browser worked great for me: quick, easy, and of course best of all, free!

like image 20
Brice Roncace Avatar answered Sep 22 '22 06:09

Brice Roncace


.NET Reflector!!!

http://www.red-gate.com/products/dotnet-development/reflector/

It is even free, you won't need the pro version to see the dissassembled code.

like image 32
Brandon Frohbieter Avatar answered Sep 26 '22 06:09

Brandon Frohbieter


There are many paid tools out there in the market. But I use a free tool and not only just seeing disassembled code, but I am also able to debug the code. For example, let's say there is an exe that was developed in .Net, I am able to debug that compile code using this tool known as DnSpy.

http://xyzcoder.github.io/dll_decompiling/decompiled_dll_debugging/dnspy/2018/06/07/dnSpy-For-DeCompiling,Debugging.html

like image 36
Pavan Kumar Aryasomayajulu Avatar answered Sep 25 '22 06:09

Pavan Kumar Aryasomayajulu