jadeite/injector/src/launcher_p.asm
2023-06-26 12:18:25 +03:00

41 lines
732 B
NASM

BITS 64
main: ; Replacement entry point
push rsi
push rdi
sub rsp, 8h
call GetKernel32ModuleHandle
mov rsi, rax ; kernel32.dll
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
%include "gpa.asm"
; Strings
s_LoadLibraryA: db "LoadLibraryA", 0
dllPath:
; This will be filled out by the injector
; Path to the dll to inject into the launcher