Updated: July 14, 2020 (July 23, 2007)

  Charts & Illustrations

Decompilers in Action

My Atlas / Charts & Illustrations

354 wordsTime to read: 2 min

Applications written using the .NET Framework, like Java, can be easily reverse-engineered back to their source code. At the upper left is a small snippet of C# code that enumerates the prime numbers less than a given number. The code was compiled to a running executable that consists of intermediate language (IL) code that represents the logic along with metadata, additional information that describes the code. The executable was then decompiled using a freely available tool, Lutz Roeder’s .NET Reflector. The reflector uses the .NET Framework’s built-in Reflection APIs to examine the IL and metadata and reproduce the original source code, as shown in the upper right. The decompiled code is almost identical to the original, including the name of the function (“prime”) and of the variables (e.g., “number,” “divisor”); the only differences are in formatting (e.g., the decompiled code includes some unnecessary parentheses and curly braces). In fact, the information contained in the IL and metadata is so complete that Reflector can generate code in a variety of languages, regardless of the language used to write the original program. In other words, a C# program can be decompiled to Visual Basic, C++, or even Borland’s Delphi, which is based on Pascal.

Atlas Members have full access

Get access to this and thousands of other unbiased analyses, roadmaps, decision kits, infographics, reference guides, and more, all included with membership. Comprehensive access to the most in-depth and unbiased expertise for Microsoft enterprise decision-making is waiting.

Membership Options

Already have an account? Login Now