Skip to content

Instantly share code, notes, and snippets.

@eira-fransham
Last active December 13, 2018 10:06
Show Gist options
  • Save eira-fransham/02d74070d5c135b1cb483b5bbb273f64 to your computer and use it in GitHub Desktop.
Save eira-fransham/02d74070d5c135b1cb483b5bbb273f64 to your computer and use it in GitHub Desktop.
push rbp
mov rbp, rsp
sub rsp, 0x10
mov qword ptr [rsp + 8], rdi
mov eax, 0
push rax
mov rax, qword ptr [rsp + 0x10]
push rax
pop rax
pop rcx
xor rdx, rdx
cmp ecx, eax
sete dl
push rdx
pop rax
test eax, eax
je 0x4d
mov eax, 1
push rax
jmp 0xf4
mov eax, 1
push rax
mov rax, qword ptr [rsp + 0x10]
push rax
pop rax
pop rcx
xor rdx, rdx
cmp ecx, eax
sete dl
push rdx
pop rax
test eax, eax
je 0x87
mov eax, 1
push rax
jmp 0xf4
mov rax, qword ptr [rsp + 8]
push rax
mov eax, 0xffffffff
push rax
pop rax
pop rcx
add ecx, eax
push rcx
pop rdi
sub rsp, 0
call 0
add rsp, 0
push rax
mov rax, qword ptr [rsp + 0x10]
push rax
mov eax, 0xfffffffe
push rax
pop rax
pop rcx
add ecx, eax
push rcx
pop rdi
sub rsp, 0
call 0
add rsp, 0
push rax
pop rax
pop rcx
add ecx, eax
push rcx
pop rax
mov rsp, rbp
pop rbp
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment