Someone just sent me a decompile of a program into C. It was a very good decompile, producing nice, mostly readabe C code (if you overlook the fact that none of the variables or functions had a human-readable name) that mostly looked like it would actually compile.

There was one big problem, though. I happen to know that the program he was decompiling was written in Delphi, which is full of concepts that are difficult to translate into C. But I was really impressed by the decompiler's output, and it made me wonder. Is there anything that can do that for Delphi?

The best decompiling tool I've seen for Delphi is DeDe. It can do a lot of things, but it doesn't even try to produce Object Pascal code as its output, and it hasn't been updated since Delphi 6. Is there anything better out there?

Was it helpful?


I don't think there are any machine code decompilers that produce Pascal code. Most "Delphi decompilers" parse form and RTTI data, but do not actually decompile the machine code. I can only recommend using something like DeDe (or similar software) to extract symbol information in combination with a C decompiler, then translate the decompiled C code to Delphi (there are many source code converters out there).


You can use IDR it is a great program to decompile delphi, it is update to the current delphi versions and it has a lot of features.

Here's a list : (and this page mentions some more : )

I've used DeDe on occasion, but it's not really all that powerfull, and it's not up-to-date with current Delphi versions (latest version it supports is Delphi 7 I believe)

Languages like Delphi, C and C++ Compile to processor-native machine code, and the output executables have little or no metadata in them. This is in contrast with Java or .Net, which compile to object-oriented platform-independent bytecode, which retains the names of methods, method parameters, classes and namespaces, and other metadata.

So there is a lot less useful decompiling that can be done on Delphi or C code. However, Delphi typically has embedded form data for any form in the project (generated by the $R *.dfm line), and it also has metadata on all published properties, so a Delphi-specific tool would be able to extract this information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow