mirror of
https://github.com/Cxbx-Reloaded/subhook.git
synced 2024-12-11 21:03:37 +00:00
25 lines
246 B
NASM
25 lines
246 B
NASM
bits 64
|
|
|
|
extern puts
|
|
global foo
|
|
|
|
section .data
|
|
|
|
message:
|
|
db 'foo() called', 0
|
|
|
|
section .text
|
|
|
|
foo:
|
|
nop
|
|
push rbp
|
|
mov rbp, rsp
|
|
lea rdi, [rel message]
|
|
%ifdef USE_PLT
|
|
call puts wrt ..plt
|
|
%else
|
|
call puts
|
|
%endif
|
|
pop rbp
|
|
ret
|