• Welcome to Valhalla Legends Archive.
 

Calling functions found in IDA

Started by warz, December 17, 2002, 01:48 PM

Previous topic - Next topic

warz

Howdy,

I've been poking around in a few files, file.exe for reference sake, with IDA, and have found a useful function (usefulfunc()). I need to force file.exe to call usefulfunc() whenever I want. It must be called from within file.exe, not outside its memory. Any ideas ?

Noodlez

#1
hmm.. just
jmp <address> ?

warz

#2
What about arguments?  :P

n00blar

push arg
push arg
push arg
call funcaddr

Skywing

#4
You'll probably want to do this by loading a DLL into the target process.  As for how you'd call the function, that depends on it's calling convention and prototypes.  If you're using the same compiler as the program in question was compiled with, then you'll usually be able to call the function directly from within the language (assuming C/C++) instead of resorting to a inline assembly to make the transition to the foreign code.