One can then access them by [HWND] or [LOCAL1] etc.
The first parameter is how many qwords to reserve for the stack unconditionally (room for api calls).
The second is the amount of actual arguments (a dlgproc has 4), and also allocate stack for that to back them up
for more than 4 arguments one needs to look beyond the returnaddress of the caller and it's shadow space and find the other ( > 4) arguments stored right to left (that part is't working yet but doesn't matter for this question)
Any additional argument names after the formal ones will be made local variables.
Attached is procdemo.zip that consist of procdemo.asm and procdemo.png (a screenshot from x64dbg that shows the generated code)
The line 'mov rax,qword ptr ss:[ ... ]' is repeated 4 times, the following
'mov qword ptr ss:[rsp+60], rax' only once (which is correct and even the correct offset)
But they are generated within the same 'if', that's the part i don't understand, what am i missing ?
Joined: 24 Dec 2016
Location: Zeist, Netherlands
Looked again ....
It actually works, i was looking for the (my) handling of any (not local)) parameter beyond 4.
The example proc usage i sent was 4 parameters and 1 local so there was no 5 parameters whatsoever to begin with.
Second post, second time overlooking something ...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum