PDA

View Full Version : reading arguments before a function call


wirepair
February 23rd, 2005, 04:47
lo all,
I would like to be able to read the arguments to a function call much like a run trace and save them to my own variables. I found the address of the import and I would like to set a break point on each reference. I'm pretty sure that part is easy to do, but i have no idea on how to trap these arguments to the function call. Is this something that is possible with the api?
Thanks,
-wire


I want this stuff below after i set my breakpoint on:
01001CC5 |. FF35 C8900001 PUSH DWORD PTR DS:[10090C8] ; |format = " Ln %d, Col %d "
01001CCB |. 8D85 FCFEFFFF LEA EAX,DWORD PTR SS:[EBP-104] ; |
01001CD1 |. 6A 7F PUSH 7F ; |count = 7F (127.)
01001CD3 |. 50 PUSH EAX ; |wstr
01001CD4 |. FF15 14130001 CALL DWORD PTR DS:[<&msvcrt._snwprintf>] ; &#92;_snwprintf

here:
0007FD28 0007FD50 |wstr = 0007FD50
0007FD2C 0000007F |count = 7F (127.)
0007FD30 000A89C4 |format = " Ln %d, Col %d "
0007FD34 00000001 |<%d> = 1
0007FD38 00000005 &#92;<%d> = 5
0007FD3C 77D491A3 USER32.GetMessageW

blabberer
February 23rd, 2005, 05:18
use shift+f4 and make
check the log function arguments radio button to always
and in log window enable saving the log automatically to a file that you name

this is detailed in conditional log breakpoint part in help files
and there are various examples of them in this forum
use search to find them and read through them

wirepair
February 23rd, 2005, 06:34
Uhm, do you realize this forum is for programming, not 'how to use olly?.' I'm asking for a programming solution not a clickity mouse click solution. Thanks anyways...
-wire