crypto2011 / IDR

Interactive Delphi Reconstructor
MIT License
955 stars 225 forks source link

Knowledge base for delphi 10.1 and later #56

Open danyhm opened 4 years ago

danyhm commented 4 years ago

Hello, I have a file compiled with Embarcadero Delphi(10.1 Berlin) and while trying to process it with IDR it autodetects it as kb2014 which is obviously wrong.

I the processed file, I get a lot of "prototype of ... is not complete" and "prototype is not complete" and only get the source code for a few functions.

I was wondering how can I obtain the BINs for this version?

This project has been by far the best I could find at decompiling Delphi files. great job!

crypto2011 commented 4 years ago

Hello I couldn't find patterns that fully define Delphi version for kb2013 and kb2014, so you can manually set desired Delphi version. You cannot obtain source code for all program (as IDA), you need strictly define prototypes and decompile only one procedure or function at one time.

danyhm commented 4 years ago

I did decompile one function at a time but for some of them, I got the errors. Is there any way to correct the errors? could it be because of the version difference? I checked the website and found out that Delphi 2013 and 2014 are difference from 10.1 to 10.3

danyhm commented 4 years ago

one more thing that doesn't work is the Unicode strings. my program is in an RTL language and the strings are Unicode but IDR shows them as question marks "?".

How can I solve that?

crypto2011 commented 4 years ago

Unicode strings stuff need aditional components.

danyhm commented 4 years ago

I think it's needed. I'm getting garbage text in IDC generator.

example:

MakeComm(0x494E92, "'TCanvasD2D.?f8C:'+#0+p°'+#0+„°'+#0+ª°'+#0+ʰ'+#0+Ⱇ'+#0+ü°'+#0+±'+#0+&±'+#0+H±'+#0+f±'+#0+„±'+#0+¤±'+#0+#0+#0+#0+#0+À±'+#0+#0+#0+#0+#0+À±'+#0+#0+#0+#0+#0+Ա'+#0+𱗧+#0+#8+²'+#0+²'+#0+(²'+#0+>²'+#0+R²'+#0+d²'+#0+t²'+#0+Œ²'+#0+š²'+#0+¨²'+#0+¸²'+#0+#0+#0+#0+#0+Ա'+#0+𱗧+#0+#8+²'+#0+²'+#0+(²'+#0+>²'+#0+R²'+#0+d²'+#0+t²'+#0+Œ²'+#0+š²'+#0+¨²'+#0+¸²'");

which breaks the IDC scripts and doesn't let it run at all.

alexis- commented 3 years ago

Hi @crypto2011,

Thank you for sharing IDR with the world. It has been essential in building my project dedicated to improving education.

Would you be open to take on paid work for updating IDR to support newest versions of Delphi ? (Version 10.2 and above)

SuperMemo Assistant has gained a little popularity, and the software on which it is based recently moved to a newer compiler. I think the community would be willing to fund such work to help the project survive, if you would be interested at all.

You can either reply here or contact me by email (redacted - we are in touch).

famouzkk commented 3 years ago

bump 10.2 delphi support?

piratesephiroth commented 3 years ago

Just copy dcu you want to add to knowledge base, copy dcu32int to this directory and run as dcu32int -K* -U, rename kb.bin to kb2015.bin

see #46