Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Assembly code? #76

Open
mohammadkad opened this issue Jul 3, 2022 · 5 comments
Open

How to use Assembly code? #76

mohammadkad opened this issue Jul 3, 2022 · 5 comments

Comments

@mohammadkad
Copy link

mohammadkad commented Jul 3, 2022

Hello dear,

I'm using your great project for decompiling an *.exe file (Delphi 7.0), I get a bunch of *.pas and *.dfms and it seems ok,
But many function contents are assembly code and have a style like this:

procedure PROCEDURE_NAME(Sender:TObject);
begin
{*
0064A8CC mov eax,[006CBFFC];gvar_006CBFFC:TSaveDialog
...
*}
end;

My question is how I can convert this commented assembly part to "Inline Assembly Code" [asm ... end;] , what should I do about Addresses and other parts?

Thanks in advance

@crypto2011
Copy link
Owner

crypto2011 commented Jul 3, 2022 via email

@mohammadkad
Copy link
Author

mohammadkad commented Jul 4, 2022

Hello again,

I need to find a procedure behind a Button, firstly I recieve this one: (Commented Assembly code!! + Addresses)

procedure TExportFileForm.ConvertBtnClick(Sender:TObject);
begin
{*
0064AB70 push ebp
0064AB71 mov ebp,esp
0064AB73 xor ecx,ecx
0064AB75 push ecx
0064AB76 push ecx
....

Then I use your feature and convert it to delphi source code, it turned to this one:

procedure TExportFileForm.ConvertBtnClick(Sender:TObject);
var

lvar_8:TCaption;
lvar_C:TCaption;
lvar_10:TCaption;
lvar_14:TCaption;
EAX : TEdit;
ECX : Integer;
EBX : Tobject;
//lvar_4:AnsiString;
//lvar_8:AnsiString;
//lvar_C:AnsiString;
//lvar_10:AnsiString;
//lvar_14:AnsiString;
begin//0
//0064AB70
ECX := 0;
EBX := Self;
try
//0064AB8B
EAX := edFilename;
lvar_8 := edFilename.Text;
//0064AB99
EAX := edDestination;
lvar_C := edDestination.Text;
if (lvar_8 = '') Or (lvar_C = '') then
...

I can't go further cuz Assembly code is strange for me and I can't handle addresses, delphi codes also is very strange ( combination of delphi and asm)

@crypto2011
Copy link
Owner

crypto2011 commented Jul 4, 2022 via email

@mohammadkad
Copy link
Author

of course, Can I mail it for you?

@crypto2011
Copy link
Owner

crypto2011 commented Jul 4, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants