Dot Net Decompilers

Program-Transformation.Org: The Program Transformation Wiki

.NET Decompiler Comparison

.NET Decompilers

  • Salamander is a commercial decompiler for .NET. The web page allows decompiling of moderately sized programs online. It seems to recognise the source language, and automatically generates source code in C#, managed C++, Visual Basic.NET, JScript.NET etc. First release was 1st Feb 2002. There are several examples online. For some tests see DecompilationSalamanderTest.

  • Anakrino is a .NET (more correctly CIL, sometimes called MSIL, i.e. CLR executable files) to C# decompiler. The web page is a little difficult to get an overview of, since the latest news is at the top. Source code is available online. The command line version seems to be called Exemplar. See also this article from dotnetcoders.com. For some tests see DecompilationAnakrinoTest.

  • LSW DotNet-Reflection-Browser is a commercial .NET object browser, disassembler, and decompiler. It is a native Windows application. Downloads are free, but it is not capable of any decompilation without registration (starts at US$99 as of March 2003). They do have an extended example, which does not recompile with Mono. For example, there are calls to point..ctor() (presumably, a constructor for the point object), variable m is declared as both a Message and later as an int , local variables are declared at the start of the function, not where they come into scope, and so on. There are many goto s in the example decompilation.

  • Lutz Roeder's Programming.NET page has released Reflector for .NET. From the web page: Reflector is a class browser for .NET components and assemblies. It features hierarchical assembly and namespace views, type and member dictionary index search, type reference search, custom attributes view, IL disassembler, C# decompiler, VB decompiler, viewers for C# XML docs and MSDN help. Assembly dependency trees, supertype/subtype hierarchies and resources can be inspected as well. Function prototypes are displayed in C# and VB syntax. Full source code is available. Also decompiles in Delphi-like and Visual Basic flavours. See also DecompilationReflectorTest.

  • Dis#. The main problem of decompilation is the absence of full source information in the executable file. Dis# allows the editing of local variables and other names and these changes persist in project file. Generated source code becomes more similar to the original source. Proprietary software; a trial version is available.

  • 9rays.net sells a product called spices.net, which can include a plugin called spices.decompiler. This decompiles to IL (disassembles the .NET bytecodes), C#, Visual Basic, C++, J#, Delphi.

  • Microsoft provides a CIL (Common Intermediate Language) disassembler called ILDASM with all its compilers. A disassembler is certainly not a decompiler, but ILDASM has the "round tripping" ability. This means that is it possible to take a CIL binary file to which you don't have the source code, disassemble it (to ILAsm format, not pretty), make some changes, and then reassemble it. Most disassembler / assembler pairs are not capable of this round tripping, because of a host of issues. However, the CIL format avoids all these problems. So without the source code to a program, you can achieve some of the things that normally you would want a decompiler for (e.g. making small changes). It is, presumably, part of the .NET framework SDK download page). See also this C# Intermediate Language Disassembler (ILDASM) page.

.NET Links

  • http://www.ikvm.net, an implementation of the Java VM in .NET. There is also a tool called ikvmc which translates Java bytecode (compiled) programs to .NET in various forms.

CategoryDecompilation