Re: Can I Decompile asm to cpp source code

From: Claudio Puviani (puviani_at_hotmail.com)
Date: 03/15/04


Date: Mon, 15 Mar 2004 19:28:26 GMT


"David Harmon" <source@netcom.com> wrote
> On Mon, 15 Mar 2004 10:44:47 +0100 in comp.lang.c++, "Guest"
> <nospam@nospam.com> wrote,
> >Is ther any decompiler to make cpp source code from asm code.
>
> No.
>
> Writing a good decompiler is at least as much work as writing a good
> optimizing compiler, a huge amount of work. Some would say it's
> impossible, but like most impossible things they are going to some
> day be proven wrong.

Since there's an n:m relationship between source code and object code, the best
one could achieve with a decompiler is a semantically equivalent output, and
most of the meaning is then lost. Even with disassemblers, where the
relationship is _almost_ 1:1 (some assemblers optimize certain instructions or
blocks of instructions), the output is severely incomplete relative to the
original source, and that's even without factoring in the comments.

> For now, the market for decompilers is very small compared to
> compilers and other types of software, and except for some
> academic work nobody has found it worth the trouble.
>
> For a point of view disagreeing with me, see [37.4] in Marshall Cline's
> C++ FAQ. It is always good to check the FAQ before posting. You can
> get the FAQ at: http://www.parashift.com/c++-faq-lite/
>
> He's mostly wrong, but the answer for now is still "No."

He's mostly right, actually.

Claudio Puviani



Relevant Pages

  • Re: VB6+ Article in VSM by Bill McCarthy
    ... >> decompiled into source code. ... decompiler but instead had to use Salamander, which handles obfuscated code just fine. ... an eBook on how to obfuscate, so presumably he uses it himself. ... If developers target a virtual machine, Win32 support can disappear and businesses will be required to upgrade. ...
    (microsoft.public.vb.general.discussion)
  • Re: String / Character Conversion Question
    ... >> But in regards to obfuscating source code, let's say if you did compile ... Or do you mean compile, ... And which decompiler would you be talking about? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: String / Character Conversion Question
    ... >> But in regards to obfuscating source code, let's say if you did compile ... Or do you mean compile, ... And which decompiler would you be talking about? ...
    (microsoft.public.dotnet.framework)
  • Re: String / Character Conversion Question
    ... >> But in regards to obfuscating source code, let's say if you did compile ... Or do you mean compile, ... And which decompiler would you be talking about? ...
    (microsoft.public.dotnet.general)
  • Re: Reverse Engineering
    ... >executable back to the Ada source isn't possible. ... Such a tool is called a "decompiler". ... to the original source code, but it can generate source code which is ... The intent was to take existing executables, ...
    (comp.lang.ada)