malware-dev/5-analyze-teb-struct/lasterror.asm
2023-11-03 16:58:05 +02:00

15 lines
183 B
NASM

.code
getTEB proc
mov rax, qword ptr gs:[30h]
ret
getTEB endp
CustomError proc
xor eax, eax
call getTEB
mov eax, dword ptr [rax+68h] ; GetLastError()
ret
CustomError endp
end