Force stack alignment
This commit is contained in:
parent
f043e4b9b4
commit
5877c79538
|
@ -58,6 +58,9 @@ module Exe
|
||||||
|
|
||||||
def create_thread_stub_x64
|
def create_thread_stub_x64
|
||||||
<<-EOS
|
<<-EOS
|
||||||
|
push rbp
|
||||||
|
mov rbp, rsp
|
||||||
|
and rsp, FFFFFFFFFFFFFFF0h
|
||||||
sub rsp, 38h
|
sub rsp, 38h
|
||||||
|
|
||||||
mov rcx, hook_libname
|
mov rcx, hook_libname
|
||||||
|
@ -77,8 +80,7 @@ module Exe
|
||||||
mov rdx, rcx
|
mov rdx, rcx
|
||||||
call rax
|
call rax
|
||||||
|
|
||||||
add rsp, 38h
|
leave
|
||||||
|
|
||||||
jmp entrypoint
|
jmp entrypoint
|
||||||
|
|
||||||
hook_libname db 'kernel32', 0
|
hook_libname db 'kernel32', 0
|
||||||
|
|
Loading…
Reference in New Issue