joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b3460
Capabilities:
Check http status code

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
lea eax, [rdx - 0xc8]
mov rdi, rcx
mov rcx, qword [rcx]
mov esi, r8d
cmp eax, 0x64
jb 0x1400b3495
lea rdx, str.Couldnt_set_desired_mode
call fcn.140095410
lea eax, [rbx + 0x11]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
cmp edx, 0xc8
je 0x1400b34ac
mov r8d, edx
lea rdx, str.Got_a__03d_response_code_instead_of_the_assumed_200_n
call fcn.140095590
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], r14
cmp esi, 0x13
jne 0x1400b34c8
mov rcx, rdi
call fcn.1400b33a0
jmp 0x1400b35ff
cmp esi, 0x14
jne 0x1400b35e1
mov rsi, qword [rdi]
mov rbp, rbx
cmp dword [rsi + 0xba0], 2
jne 0x1400b3549
mov rax, qword [rsi + 0x1e0]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400b3549
mov byte [rsp + 0x28], 1
lea r9, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov qword [rsp + 0x50], rbx
call fcn.1400aaf50
test eax, eax
jne 0x1400b35ff
mov rcx, qword [rsp + 0x50]
lea edx, [rax + 0x2f]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x1400b353e
mov rbp, qword [rsp + 0x50]
mov ecx, 1
sub rax, rbp
cmovne rcx, rax
mov byte [rcx + rbp], bl
jmp 0x1400b3549
mov rcx, qword [rsp + 0x50]
call qword [fcn.1400cf482]
mov rdx, qword [rsi + 0xc08]
test rdx, rdx
jne 0x1400b356d
cmp byte [rsi + 0xf0d], bl
lea rax, str.NLST
lea rdx, str.LIST
cmovne rdx, rax
lea r8, [0x1400e06e2]
test rbp, rbp
mov r9, r8
lea rax, [0x1400ea5e0]
cmovne r9, rbp
lea rcx, [0x1400d62a8]
cmovne r8, rax
call fcn.140083cd0
mov rcx, rbp
mov r14, rax
call qword [fcn.1400cf482]
test r14, r14
jne 0x1400b35ac
lea ebx, [r14 + 0x1b]
jmp 0x1400b3601
lea rcx, [rdi + 0xa00]
mov r8, r14
lea rdx, [0x1400e6274]
call fcn.1400c95c0
mov rcx, r14
mov esi, eax
call qword [fcn.1400cf482]
test esi, esi
je 0x1400b35d5
mov ebx, esi
jmp 0x1400b3601
mov dword [rdi + 0xab8], 0x1f
jmp 0x1400b3601
cmp esi, 0x15
jne 0x1400b35ec
lea r8d, [rsi - 8]
jmp 0x1400b35f5
cmp esi, 0x16
jne 0x1400b3601
lea r8d, [rsi - 8]
mov dl, 1
mov rcx, rdi
call fcn.1400b2ed0
mov ebx, eax
mov r14, qword [rsp + 0x60]
mov eax, ebx
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret

Function at 0x1400b9360
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1400b93bf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140095410
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.1400b8ef0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x1400b9570
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x1400b9718
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x1400b95d5
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x1400b95d5
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x1400b95d5
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x1400b960c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x1400b9662
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400b9662
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400b9662
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400b9662
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400b9662
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.1400b9020
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x1400b96c4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140095410
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.1400b93f0
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1400b9710
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140095410
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x1400bae80
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1400fe080]
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], pe_nt_image_headers64
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 0x1400baf15
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 0x1400baf76
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140095410
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.1400cdf90
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 0x1400bb031
sub ecx, 1
je 0x1400bb0a4
sub ecx, 1
je 0x1400bafe0
cmp ecx, 1
je 0x1400bafc3
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1400e6274]
call fcn.140095410
jmp 0x1400bb0a4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.1400babb0
test eax, eax
je 0x1400bb0a4
jmp 0x1400baf4a
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 0x1400bb0a4
sub rax, rsi
cmp rax, rbp
jae 0x1400bb0a4
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.140095590
jmp 0x1400bb0a4
cmp r8d, 4
jle 0x1400bb0a4
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 0x1400bb0a4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.140095330
mov esi, eax
test eax, eax
je 0x1400bb083
mov edx, 5
mov rcx, rbx
call fcn.1400bbb70
mov eax, esi
jmp 0x1400baf4a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.1400a3dd0
mov rcx, r14
call fcn.1400a40b0
test eax, eax
je 0x1400baf48
mov edx, 5
mov rcx, rbx
call fcn.1400bbb70
mov eax, Ordinal_46
jmp 0x1400baf4a
Function at 0x1400cde40
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 [fcn.1400cf488]
mov rdi, rax
test rax, rax
jne 0x1400cde82
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 0x1400cdec9
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 0x1400cdf22
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 0x1400cdee0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1400cdf63
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400e0222]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400e0223]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400cdf30
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 0x1400ceeac
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
sub rsp, 0x50
mov r12, r9
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
test r8, r8
jne 0x1401135cd
xor al, al
jmp 0x14011372f
mov rax, qword [0x1401336b0]
lea rcx, [rsp]
xor r11d, r11d
mov qword [rcx], rax
mov rax, qword [0x1401336b8]
mov qword [rsp + 0x60], rbp
mov qword [rcx + 8], rax
mov rax, qword [0x1401336c0]
mov rdx, r11
mov qword [rcx + 0x10], rax
mov rax, qword [0x1401336c8]
mov qword [rcx + 0x18], rax
mov rax, qword [0x1401336d0]
mov qword [rcx + 0x20], rax
mov rax, qword [0x1401336d8]
mov qword [rcx + 0x28], rax
mov rax, qword [0x1401336e0]
mov qword [rcx + 0x30], rax
mov rax, qword [0x1401336e8]
mov qword [rcx + 0x38], rax
movzx eax, byte [0x1401336f0]
mov byte [rcx + 0x40], al
mov rax, qword [r9]
mov rcx, r8
lea rbp, [r8 + rax]
test rbx, rbx
je 0x140113721
add r8, 4
nop word [rax + rax]
movzx r9d, byte [rdx + rdi]
inc rdx
shl r9d, 0x10
cmp rdx, rbx
jne 0x140113679
mov r11d, 2
jmp 0x14011369d
movzx eax, byte [rdx + rdi]
inc rdx
shl eax, 8
or r9d, eax
cmp rdx, rbx
jne 0x140113693
mov r11d, 1
jmp 0x14011369d
movzx eax, byte [rdx + rdi]
or r9d, eax
inc rdx
mov r10d, r9d
and r9d, 0x3f
cmp r8, rbp
ja 0x140113745
mov rax, r10
shr rax, 0x12
and eax, 0x3f
movzx eax, byte [rsp + rax]
mov byte [rcx], al
mov rax, r10
shr rax, 0xc
and eax, 0x3f
movzx eax, byte [rsp + rax]
mov byte [rcx + 1], al
cmp r11, 1
jbe 0x1401136e2
mov byte [rcx + 2], 0x3d
add rcx, 3
add r8, 3
jmp 0x1401136fa
shr r10, 6
add rcx, 3
and r10d, 0x3f
add r8, 3
movzx eax, byte [rsp + r10]
mov byte [rcx - 1], al
test r11, r11
je 0x14011370a
mov byte [rcx], 0x3d
inc rcx
inc r8
jmp 0x140113718
movzx eax, byte [rsp + r9]
inc rcx
inc r8
mov byte [rcx - 1], al
cmp rdx, rbx
jb 0x140113660
sub rcx, rsi
mov al, 1
mov qword [r12], rcx
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x50
pop r12
ret
xor al, al
jmp 0x14011372a
Function at 0x140002f44
Capabilities:
Get hostname

Disassembly:
push rsi
push rbx
sub rsp, 0x138
lea rsi, [rsp + 0x30]
lea rdx, [rsp + 0x2c]
mov dword [rsp + 0x2c], 0x100
mov rbx, rcx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov rdx, rsi
test eax, eax
jne 0x140002f79
lea rdx, [0x140066ac1]
mov rcx, rbx
call fcn.14000185a
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
ret

Function at 0x140002f8e
Capabilities:
Enumerate processes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x170
xor edx, edx
mov rdi, rcx
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140003040
lea rbp, [rsp + 0x40]
mov rcx, rax
mov dword [rsp + 0x40], 0x130
mov rdx, rbp
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x140003037
lea r12, [rsp + 0x6c]
lea rsi, [rsp + 0x20]
mov rdx, r12
mov rcx, rsi
call fcn.14000185a
mov r8, qword [rsp + 0x28]
cmp r8, qword [rdi + 8]
jne 0x140003009
mov rdx, qword [rdi]
mov rcx, qword [rsp + 0x20]
test r8, r8
je 0x140003022
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x140003022
mov rcx, rsi
call fcn.140055560
mov rdx, rbp
mov rcx, rbx
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x140002fdd
jmp 0x140003037
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call fcn.140055560
mov al, 1
jmp 0x140003057
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003057
add rsp, 0x170
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140003065
Capabilities:
Get cpu information
Query or enumerate registry value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x8a8
xor r8d, r8d
mov r9d, 1
lea rdx, str.HARDWAREDESCRIPTIONSystemCentralProcessor0
lea rax, [rsp + 0x38]
mov rsi, rcx
mov dword [rsp + 0x34], 0x800
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000319d
lea rax, [rsp + 0x34]
mov rcx, qword [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
lea rbp, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
lea rdx, str.ProcessorNameString
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x38]
test eax, eax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x14000319b
call rax
mov ecx, 0x20
call fcn.14005f200
xor edx, edx
mov rcx, rax
mov rbx, rax
call fcn.14005b7a0
lea rax, fcn.14004ac00
xor edx, edx
xor ecx, ecx
xor r8d, r8d
mov qword [rbx], rax
lea rax, [rsp + 0x58]
lea rdi, [rsp + 0x40]
mov qword [rbx + 0x18], 0x10ffff
mov qword [rsp + 0x48], rax
xor eax, eax
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x70], rdx
mov rdx, rdi
mov dword [rsp + 0x88], ecx
mov rcx, rsi
mov qword [rsp + 0x90], r8
mov r8, rbp
mov qword [rsp + 0x40], rbx
mov byte [rsp + 0x58], 0
mov qword [rsp + 0x68], rax
mov word [rsp + 0x78], 0
mov word [rsp + 0x98], 0
call fcn.14005a030
mov rcx, rdi
call fcn.14005a1f0
jmp 0x1400031c1
call rax
lea rdx, [0x140066ac1]
mov rcx, rsi
call fcn.14000185a
jmp 0x1400031c1
mov rax, rsi
add rsp, 0x8a8
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x140003780
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.140003742
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140008de4
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x140089ab8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x140089ab4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x140008e32
mov rdx, qword [rax]
cmp r12, rdx
jb 0x140008e2a
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140008f19
inc ebx
add rax, 0x28
jmp 0x140008e0a
mov rcx, r12
call fcn.140009611
mov rbp, rax
test rax, rax
jne 0x140008e51
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140008d80
movsxd rbx, ebx
mov rax, qword [0x140089ab8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.1400096bf
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140089ab8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140008eb3
mov rax, qword [0x140089ab8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140008d80
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140008f13
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140008f13
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140089ab8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140008f13
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140008d80
inc dword [0x140089ab4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140009340
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x140089b20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140089b00]
test rbx, rbx
je 0x14000938c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140009386
test eax, eax
jne 0x140009386
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x14000935e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140009540
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140009563
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140009563
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140009564
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x14000959e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140009595
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400095a0
inc r8d
add rax, 0x28
jmp 0x14000957c
xor eax, eax
ret

Function at 0x140009611
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x14006b6a0]
mov r8, rcx
mov rcx, r9
call fcn.140009540
test eax, eax
je 0x14000963d
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp fcn.140009564
xor eax, eax
add rsp, 0x28
ret
Function at 0x140011ac3
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400636e8], eax
inc eax
jne 0x140011add
call sub.msvcrt.dll_abort
nop
add rsp, 0x28
ret

Function at 0x140011c51
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
mov rbx, rcx
test rcx, rcx
je 0x140011ced
call fcn.14001184a
dec eax
jne 0x140011ce6
xor eax, eax
lea rdi, [rsp + 0x25]
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x4d]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x4c]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
mov eax, 0x27
lea rcx, [rsp + 0x25]
cmp byte [rcx + rax], 0
je 0x140011cc5
inc rax
cmp rax, 0x6b
jne 0x140011cb4
jmp 0x140011cdb
cmp eax, 0x6a
je 0x140011cdb
movsxd rdx, eax
inc eax
cdqe
mov byte [rsp + rdx + 0x25], 0xa
mov byte [rsp + rax + 0x25], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret

Function at 0x140011d8f
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
call fcn.140011cf8
mov ecx, dword [0x1400636e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x140011e9e
call fcn.140011ba5
cmp qword [0x14008d048], 0
mov rbx, rax
je 0x140011e9e
test rax, rax
je 0x140011e9e
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.140011c51
xor edx, edx
xor ecx, ecx
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], edx
mov qword [rbx + 0x28], rcx
call rdi
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rdi
xor r8d, r8d
mov dword [rsp + 0x30], 2
mov rdx, rsi
mov dword [rsp + 0x28], r8d
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], r8d
mov r8, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x140011e64
call sub.msvcrt.dll_abort
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1400636e8]
mov rdx, rbx
mov dword [rbx + 0xc0], eax
xor eax, eax
mov dword [rbx + 0xbc], eax
mov al, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140011e5f
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x140012a1f
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
call fcn.140011d8f
mov qword [rax + 8], rsi
mov rcx, qword [rax + 0x1d8]
mov rbx, rax
call fcn.1400124f7
test byte [rbx + 0x40], 0x30
jne 0x140012a58
lea rcx, [rbx + 0xd0]
mov edx, 1
call qword [sym.imp.msvcrt.dll_longjmp]
mov ecx, dword [0x1400636e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140012ae3
cmp qword [rax + 0x28], 0
mov rcx, qword [rax + 0x30]
jne 0x140012a93
mov dword [rax], 0xdeadbeef
test rcx, rcx
je 0x140012a88
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov esi, dword [rbx + 8]
mov qword [rbx + 0x30], rcx
jmp 0x140012acd
mov dword [rax + 0xbc], 1
mov esi, dword [rax + 8]
test rcx, rcx
je 0x140012aab
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov qword [rbx + 0x30], rdx
test byte [rbx + 0x44], 4
je 0x140012ae3
mov dword [rbx], 0xdeadbeef
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov qword [rbx + 0x28], rax
mov rcx, rbx
call fcn.140011ea9
mov ecx, dword [0x1400636e8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
nop