Link to home
Start Free TrialLog in
Avatar of ginsonic
ginsonicFlag for Romania

asked on

Delphi decompiler ?

Where can find a Delphi decompiler ?
I have exe2dpr but isn't yet a decompiler ( don't read the procedure body ) .
Avatar of rwilson032697
rwilson032697

There isn't one - nor will there ever likely be one. It is just too difficult - and even if you could the resulting code would bear no resemblance to the original source. It would not be understandable and certainly would not be maintainable. Furthermore - optimisation will make this even worse.

Sorry to be the beaer of bad tidings...

Cheers,

Raymond.
I am with rwilson on this one - dont hold your breath.......

Heath
I am reanswering this in the hope you will post a comment as to why you rejected it.

There isn't one - nor will there ever likely be one. It is just too difficult - and even if you could the resulting code would bear no resemblance to the original source. It would not be understandable and certainly would not be maintainable. Furthermore - optimisation will make this even worse.

       Sorry to be the beaer of bad tidings...

       Cheers,

       Raymond.
Avatar of ginsonic

ASKER

I have see some decompiler for VB or Fox or C and work OK .
exe2dpr , the Delphi decompiler , isn't YET a decompiler but the author make until now ~15% from this .

Sorry , but I think that will work . It's my opinion .

Best regards,
Nick
no chance heath and raymond are correct.
borland would'nt give anyone the dcu file format to work with .With exe2dpr it's crap .like i took out half my uses clause on a standard form yet when it so called decompiled it ,i had all my uses clause back again???and no procedures whatsoever
merely a pointer to an address.
Regards Barry
I am sorry, but everyone here is going to answer this the same way.  Yes there are pretty good VB and FoxPro decompilers available.  These are interpreted languages and decompiling their executables, although difficult, is TRIVIAL to decompiling a real executable.  You mention a C decompiler, and yes there are MANY C decompilers available.  I have used a few.  Most are designed for a particular task such as generating function primatives or getting parameter sizes out of the exe.  I have not, however, EVER seen a C decompiler that can produce human readable source code from even the most trivial exe.  I am not saying these things dont produce source, it is just that it will usually take longer to figure out there output than to write the damn thing from scratch.  This problem will be even worse with delphi. C is an open language and MANY people know alot of intiment details about it.  Delphi (object Pascal) on the other hand is a propriatery language that uses a completely undocumented format.  It WONT HAPPEN.  Dont fool yourself.


Heath
ginsonic:

There appears to be a consensus here that it won't happen (that is, a delphi decompiler will be written). Rejecting these views appears to be saying you don't like the answer, regardless of its merits.

These are poor grounds for rejecting the answer.

Perhaps you should contact the author of exe2dpr (perhaps you already know him/her) and ask him/her what they think their chances are of completing it as a complete Delphi decompiler and if they could, how useful the output of it will be.

Let us know what you find out.

Cheers,

Raymond.
Sorry for delay .
I send all comments to author of exe2dpr and I wait to receive an answer .
When I receive this I will put to comment .

Regards,
Nick
The only semi decompiler I've seen is exe2dpr.  The best you could hope for is to pull RTTI info out...but actual code...good luck...now I do know of some programs that will decompile to Assembly...if your interested in those...

Rick
I promise the answer from exe2dpr author :

Hi!

> Answers :
> 1.There isn't one - nor will there ever likely be one. It is just too
> difficult - and even if you could the
>    resulting code would bear no resemblance to the original source. It
> would not be understandable
>    and certainly would not be maintainable. Furthermore - optimisation
> will make this even worse.
>    Sorry to be the beaer of bad tidings...

It is really difficult, but theoretically possible. All original names will
be changed to some like LocFunc14,
LocVar12 etc. See similar decompilers for VB3 or Clipper, result will be
like this.
Optimisztion kill some unexecuted code, for example:

const
  DEMO = True;
.
  if not DEMO then begin
.
    end

> 4. I have see some decompiler for VB or Fox or C and work OK .
>    Nick
Decompilers for VB3, Fox, Java, Clipper etc is very simpler, that Delphi or
C, because
its generate byte-code (p-code) instead of native code in C and Delphi. But
decompiler
for C is really exist, and such Delphi decompiler is also possible.

> 5. no chance heath and raymond are correct.
>     borland would'nt give anyone the dcu file format to work with .With
> exe2dpr it's crap .like i took out
>     half my uses clause on a standard form yet when it so called
> decompiled it ,i had all my uses
>     clause back again???and no procedures whatsoever
>     merely a pointer to an address.

exe2dpr only make a pas-templates for given dfms. And only so 'uses'
generated, that needed for
successfull compiling of this template.

[other skipped]

Now i try to write dcu-decompiler, if it will be succesfully completed,
then i will try make a Delphi-exe
parser for search all standard library's dcu in it and then extract all
other human-maked dcu.

Bye

Regards,
Nick
I think this comment from the author of exe2dpr says it really...

       It is really difficult, but theoretically possible. All original names will
       be changed to some like LocFunc14, LocVar12 etc.

In other words, yes it is POSSIBLE to do this, but is it WORTHWHILE to do it?

Cheers,

Raymond.
Maybe . I wait .

Nick
Yes, there´s one. If you send me you e-mail address I will send you the program.
Thanks vantive,
My e-mail address : nick@decebal.ro .
Wait your mail ,
Nick
For vantive :

Hello man ,
Your offer is still available ?

Nick
Because vantive don't send the program how he promise , I reject her answer .
If vantive keep her offer and send the decompiler I will accept the answer .
Nick
Because vantive don't send the program how he promise , I reject her answer .
If vantive keep her offer and send the decompiler I will accept the answer .
Nick
Sorry man,
I'm having problems using the decompiler but, as soon as I fix the problems I will send you.

Vantive

I think that says it all... :-)

Cheers,

Raymond.
COUNTDOWN .
Nick
Rwillson,
Reanswer ,
Nick
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I still think that is possible .
Regards,
Nick
Where can get this reasonable decompliler?

Please its really urgent, I going nuts.

my email ( alt -- ...  is freemtnhorse@hotmail.com )

the best - worst ? I  have seen from Dede and IDa ( yuck ) is you can figure out most of the stuff like captions, controls etc, but variables and what happens to those variables is very time consuming.

To decompile a basic program that you have already written takes 10 times longer to figure out what is happening and that is cheeting anyhow since you made it yourself.

thanks and thoughts,
Phil