val1 = func( &apple, &bat, &cat, &dog )
The address of apple, bat, cat, and dog are now on the stack.
here's one method!
ZZ equ ???? ; I forget the actual number to use try 8?
Check your address of those arguments, then in debugger
to align them. Dependent upon memory model, method of stack protection etc. that ZZ value has to be set accordingly!
mov ebx, [ebp + ZZ + 0] ; Save apple
mov [ebx], eax
mov ebx, [ ebp + ZZ + 4]
mov [ebx], eax
mov ebx, [ ebp + ZZ + 8]
mov [ebx], eax
mov ebx, [ ebp + ZZ + 12]
mov [ebx], eax
return eax
Reputation Points: 546
Solved Threads: 99
Practically a Posting Shark
Offline 891 posts
since Jun 2009