Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Assembly 

Calling function

Hi everyone,

I'm delphi coder and I've never coded asm before
I was trying to call a function of an external software, the function decrypt some strings in delphi it may be like:
Quote:function Decrypt(str:string):string;stdcall;


In the asm i'm seeing the program pass the params like this:
Quote:mov eax,program.dll+6D278 { ["Wkd4c2FXNXFaV04wWldRbw**"] }
call program.dll+58C60


and sometimes like this:
Quote:lea edx,[ebp-48]
mov eax,progam.dll+6CB44 { ["TDJGMWRHOTNhVzQq"] }
call program.dll+58C60


"program.dll+58C60" is the function I want to call and get the string decrypted.
Can someone help me to do this?
(Apr 12, 2018 04:24 PM)samuelrizzo Wrote:  Hi everyone,

I'm delphi coder and I've never coded asm before
I was trying to call a function of an external software, the function decrypt some strings in delphi it may be like:

In the asm i'm seeing the program pass the params like this:

and sometimes like this:

"program.dll+58C60" is the function I want to call and get the string decrypted.
Can someone help me to do this?

Can you post more of your code ?
I might be able to help you..
call program.dll+58C60
program.dll > dll base address
58C60 > offset 0x58C60
call dll base address + 0x58C60
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
use CreateRemoteThread to call function remotely (its important to check the calling convention) you'll have to obtain a valid handle to the process, use OpenProcess.
or you can manipulate and use an existing thread (thread hijacking) but I'd suggest you sticking with my first suggestion ^

-spiderfruit


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Assembly] by gamg7May 17, 2016 09:09 PM 1 220 May 17, 2016 09:09 PM
Last Post: brownclown
by Jordy ClasieJun 10, 2013 10:13 AM 3 97 Jun 10, 2013 10:13 AM
Last Post: Mafugsa Bob
by CarlosMarti123Mar 12, 2012 12:40 PM 3 140 Mar 12, 2012 12:40 PM
Last Post: MrZander