Decompiler

from Wikipedia, the free encyclopedia

A decompiler (English decompiler or reverse compiler , reverse engineering compiler ) is a computer program composed of machine or object code again the human readable source code in a high level language generated. It tries to reverse the compilation process .

A decompiler should not be confused with a disassembler , since the assembly language is only an alternative form of representation of the machine code.

functionality

Since there is usually no reverse function for the compilation , a decompilation is a reverse engineering technique. It is used to subsequently generate source code based on an executable program. The obtained source code is, within certain limits, similar to the original version of the source code that was used to generate the executable program. If debug information is also stored in this executable program , then often even the variable names, function names and modules used by the original author can be recovered. Comments and the original formatting have usually been lost, since both pieces of information are typically no longer included in the compilation .

Bytecode decompilation, such as B. Java and .NET programs, is usually less complicated than the decompilation of machine code, since these systems transfer a relatively large amount of information from the original source code into the object file, comparable to the debug version of a C or C ++ program. In particular, the type information and the names of public identifiers are retained. However, the decompiled program code is only functionally identical to the original source file.

restrictions

If, on the other hand, the program was compiled with an optimization option of the compiler and no debug information is contained or it was even disguised with an obfuscator , the recovered source text can in individual cases be distorted until it is unusable.

Due to the restrictions mentioned, decompilation is usually not suitable for restoring lost source texts. These should always be present in multiple backups anyway . Under normal circumstances, a programmer will rarely use a decompiler. With very old software, however, it happens every now and then that the original sources have been lost or are on data media for which no suitable reading devices are available. In the early days of electronic data processing, it was also common to fix small errors by patching the object files. In addition to reverse engineering of third-party software, these cases are the only applications for which decompilers are used.

Legal

Commercial software vendors often state in their licenses that decompiling their products is prohibited (even if only for study purposes or to change the software for personal use).

However, according to Section 69e UrhG , German law allows under certain conditions to decompile a program, insofar as this is necessary in order to maintain " interoperability " with a computer program created independently of the original program. License agreements that contradict this are void.

See also

Web links

(all in English)