Optimize assembly payloads

This commit is contained in:
mkrsym1
2023-06-26 12:25:44 +03:00
parent 851ebb5b9a
commit 33f7dd89a9
2 changed files with 5 additions and 16 deletions

View File

@ -2,8 +2,6 @@ BITS 64
main: ; Replacement entry point
push rsi
push rdi
sub rsp, 8h
call GetKernel32ModuleHandle
@ -11,20 +9,16 @@ main: ; Replacement entry point
mov rcx, rax
call GetAddressOf_GetProcAddress
mov rdi, rax ; *GetProcAddress
mov rcx, rsi ; kernel32.dll
lea rdx, [rel s_LoadLibraryA]
mov rax, rdi ; *GetProcAddress
call rax ; rax = *LoadLibraryA
lea rcx, [rel dllPath]
call rax ; LoadLibraryA(dllPath)
add rsp, 8h
pop rdi
pop rsi
ret