Jump to content
Tuts 4 You

Ripping code delphi


nosconf

Recommended Posts

Posted

Is it possible to rip asm code and use it in delphi?

Many thanks

NoScONf

Posted

nosconf the answer is yes, you can rip asm code and use it in not only pascal/delphi but other languages as well. You will undoubtedly need to use the correct syntax something in a procedure for instance. You are going to have some trouble with "ripped code" but if you understand asm it shouldnt be difficult to take some ripped code in import it into your function depending on what the code your ripping intends to do. You may already be seasoned with Delphi and ASM but if your not take a few hours to read this. There are some plugins for olly on tuts4you main page that rip code. Good Luck!

Learning assembler with delphi

original function in pascal

function Sum(X,Y:integer):integer; 
begin
Result := X+Y;
end;

asm in delphi

function Sum(X,Y:integer):integer; 
begin
asm
mov eax,X
add eax,Y
mov Result,eax
end;
end;
Posted
nosconf the answer is yes, you can rip asm code and use it in not only pascal/delphi but other languages as well. You will undoubtedly need to use the correct syntax something in a procedure for instance. You are going to have some trouble with "ripped code" but if you understand asm it shouldnt be difficult to take some ripped code in import it into your function depending on what the code your ripping intends to do. You may already be seasoned with Delphi and ASM but if your not take a few hours to read this. There are some plugins for olly on tuts4you main page that rip code. Good Luck!
Learning assembler with delphi

original function in pascal

function Sum(X,Y:integer):integer; 
begin
Result := X+Y;
end;

asm in delphi

function Sum(X,Y:integer):integer; 
begin
asm
mov eax,X
add eax,Y
mov Result,eax
end;
end;

Excellent!

Thanks mate!

Posted

Your welcome brother. Hope it works out for you. :-)

Cheers!

Posted

The above example can also be done like this:

function Sum(X, Y: integer): integer;
asm
add eax, edx
ret
end;

Cheers, hope it helps in some way :smilie3:

Posted
The above example can also be done like this:
function Sum(X, Y: integer): integer;
asm
add eax, edx
ret
end;

Cheers, hope it helps in some way :smilie3:

function Sum(X, Y: integer): integer;
asm
add eax, edx
end;

ret not obligatory

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...