[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Decompiler?



On Mon, Feb 22, 2010 at 05:11:07AM +0000, Hadi Motamedi wrote:
[... snip nice explanation of why this won't work...]

> So I dis-assembled the code and I was lucky to find the related
> subroutine . It is short in length but I cannot decode it to find the
> logic in behind . So I need to find a de-compiler to de-compile it to
> some sort of higher level languages to see if I can understand the
> login behind . Please give me a hint on how to accomplish this .

basically it can't be done. It's a one-way operation. Picture this --
within C there are several ways to print a value to the screen. These
all likely produce similar machine code where a register is loaded
with the address of the value to print and then a print routine is
called. The question when decompiling is: how do you know *which*
method of printing a string to decompile to? You can't know. Throw in
the fact that code and data are indistinguishable at the machine
level, and it's basically impossible. Now remember that there are many
many many languages that compile to machine code. How do you even know
which language it was originally written in? What language do you
target for the decompilation?

The transformation of high-level code into machine code is not an
isomorphism. It cannot be reversed. 

That said, there my be ways to make some reasonable guess as to what
the code is doing and de-compile to some psuedo-language, but this
will still largely be guesswork. If you can make it work even remotely
reliably, you could probably get a PhD for the work...

A

Attachment: signature.asc
Description: Digital signature


Reply to: