Determine function parameters from asm source
Ok, not sure if anyone can help wiht this, but doesn't hurt to ask. I am trying to hook a process and call a function within that process. I have the asm source and can call the function by address, but I do not know how to determine the proper parameters to pass. Is it possible to determine the parameters with the asm source? If needed I can post the source code.
Thanks
Re: Determine function parameters from asm source
To some degree, but only very roughly. You need to recognize access to parameters within the function, and then figure out what the program is doing with them and, based on that, what the parameters are.
Re: Determine function parameters from asm source
Or easier, debug another program that calls that function, the pushes in advance of the call are the parameters, and you get an idea of what is in the parameters. Remember that c++ code also often passes information in registers to a called function.