hi,
I have a problem with understanding SEH directives. I've read about this issue on MSDN, but i'm not sure do i understood it correctly. As far as i know SEH directives are for handling exceptions. They write informations about procedure frames to xdata and pdata sections. And SEH directives are needed only for procs that are calling other procs.
For example if got proc Main which calls other proc that takes 8 params and Main uses its own params i think that proper prologue and epilogue should look like this:
.data
qwResult dq 0
.code
Main PROC FRAME 1st:QWORD, 2nd:QWORD
push rbp
.pushreg rbp
push rbx
.pushreg rbx
push rdi
.pushreg rdi
mov rbp, rsp
.setframe rbp, 0
sub rsp, 8*8
.allocstack 8*8
.endprolog
mov 1st, rcx
mov 2nd, rdx
xor ebx, ebx
mov qword ptr [rsp+7*8], rbx
mov qword ptr [rsp+6*8], rbx
mov qword ptr [rsp+5*8], rbx
mov qword ptr [rsp+4*8], rbx
mov r9, 100000h
mov r8, 10000h
mov rdx, 1000h
mov rcx, 100h
call EightParamProc
add rax, 1st
add rax, 2nd
mov qwResult, rax
add rsp, 8*8
pop rdi
pop rbx
pop rbp
ret
Main ENDP
END
Could someone correct me if wrong?
Thanks in advance.