Exetools  

Go Back   Exetools > General > Source Code

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2020, 15:42
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 725
Rept. Given: 35
Rept. Rcvd 48 Times in 30 Posts
Thanks Given: 666
Thanks Rcvd at 1,050 Times in 475 Posts
chants Reputation: 48
IDA Ghidra decompiler plugin source code release

There are still a good number of cleanup tasks for things like building on Linux, building on 32-bit systems, moving every path variable for bison or libraries to a single unified place.

This was built with an older Ghidra release not the current one and contains some special customizations of the sleigh source that it is built with by necessity as the P-code parser portion is a necessity. Otherwise the decompiler itself is communicated with via the interface that the Java frontend uses in Ghidra.

My focus was on 16-bit code so a lot of special details dealing with both IDA and Ghidra for these cases are built in for handling them. There are no good 16-bit decompilers in existence. But the concept of Ghidra which requires parameter identification before the decompilation pass was in the works and never completely finished. The code is somewhat staged to do it though.

You can browser or download the source here: https://github.com/GregoryMorse/GhidraDec

GhidraDec project is the main project as the others were test projects, or projects to test total decompiler integration. Ideally a build variable should allow building against the full decompiler, as well as the current separate binary approach. For technical design reasons, its definitely better to leave the decompiler as a separate process, Ghidra may have had to do it do to use of Java, but there are other reasons dealing with processes and threads and stability and memory leaks, crashes or hangs.
Reply With Quote
The Following User Gave Reputation+1 to chants For This Useful Post:
yoza (05-08-2020)
The Following 7 Users Say Thank You to chants For This Useful Post:
argie (08-17-2020), besoeso (04-29-2020), niculaita (04-29-2020), sh3dow (08-17-2020), Stingered (04-29-2020), virus (05-04-2020), yoza (05-08-2020)
  #2  
Old 04-29-2020, 19:30
SegWolf SegWolf is offline
Friend
 
Join Date: Oct 2018
Posts: 17
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 3
Thanks Rcvd at 26 Times in 7 Posts
SegWolf Reputation: 1
Is this your own work or are you just sharing it with us? I ask since the source was available online from the past 9 months on github...

Is this the same as the one here:
Quote:
https://forum.exetools.com/showthread.php?t=19264
Thanks for sharing this

Last edited by SegWolf; 04-29-2020 at 19:54.
Reply With Quote
  #3  
Old 04-29-2020, 21:19
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 725
Rept. Given: 35
Rept. Rcvd 48 Times in 30 Posts
Thanks Given: 666
Thanks Rcvd at 1,050 Times in 475 Posts
chants Reputation: 48
It is my own work, it was kept in a private repo. For the sake of continuation of the project while its still relevant, I had it made public. I simply have not had time to work on remaining parts. It is basically a mess of technical details mostly on the IDA database side, that requires a lot of testing.

The decompiler.cpp/h and sleighinterface.cpp/h contain all of the crucial code. I am not sure if its forward compatible or not, but as long as the protocol between the decompiler and UI did not change, and as long as the sleigh classes did not have any major changes, it should be.

A lot was done including trying to make all typedefs, minimal function declarations which are needed, forward/initialized/uninitialized data definitions, in the right order including dealing with circular references and such. A lot of recursive functions were eliminated using STL stacks, to allow for unlimited depth without stack overflows in this regard.
Reply With Quote
  #4  
Old 04-29-2020, 21:40
SegWolf SegWolf is offline
Friend
 
Join Date: Oct 2018
Posts: 17
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 3
Thanks Rcvd at 26 Times in 7 Posts
SegWolf Reputation: 1
Quote:
Originally Posted by chants View Post
It is my own work, it was kept in a private repo. For the sake of continuation of the project while its still relevant, I had it made public. I simply have not had time to work on remaining parts. It is basically a mess of technical details mostly on the IDA database side, that requires a lot of testing.
Thanks. I'd asked so that I could contact you directly outside of the forum with some of my private questions about this that I cannot post here.
As you know, I do not have the private message privileges yet
Reply With Quote
  #5  
Old 08-17-2020, 20:40
argie argie is offline
Family
 
Join Date: Oct 2010
Posts: 252
Rept. Given: 84
Rept. Rcvd 86 Times in 38 Posts
Thanks Given: 231
Thanks Rcvd at 351 Times in 119 Posts
argie Reputation: 88
Quote:
Originally Posted by SegWolf View Post
Thanks. I'd asked so that I could contact you directly outside of the forum with some of my private questions about this that I cannot post here.
As you know, I do not have the private message privileges yet
chants the hero.

I really wonder if by some magic magic, this (not full capacity obv) could be made for x64dbg.

Cheers chants!
Reply With Quote
  #6  
Old 08-18-2020, 15:04
agoo agoo is offline
Friend
 
Join Date: Dec 2014
Posts: 128
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 13
Thanks Rcvd at 25 Times in 21 Posts
agoo Reputation: 0
I wish I also had private message privileges for my questions too.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DeDe (delphi decompiler) 3.10 Source Code Ported for Berlin 10.1 ReBirth Source Code 12 03-03-2020 13:56
VB6 N-CODE - Stop any servive and Start any APP-Release and Source Code wilson bibe General Discussion 5 04-10-2013 00:23


All times are GMT +8. The time now is 07:28.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )