joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14002f0b0
Capabilities:
Resolve dns

Disassembly:
push rbx
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor r13d, r13d
mov r12, r9
mov qword [r9], r13
lea r9, [rsp + 0x68]
mov ebx, r13d
mov r15d, r13d
call qword [sym.imp.WS2_32.DLL_getaddrinfo]
mov r14d, eax
test eax, eax
jne 0x14002f274
mov qword [rsp + 0x58], rsi
mov rsi, qword [rsp + 0x68]
mov qword [rsp + 0x60], rdi
test rsi, rsi
je 0x14002f254
mov qword [rsp + 0x50], rbp
mov eax, dword [rsi + 4]
cmp eax, 2
jne 0x14002f10d
lea ebp, [rax + 0xe]
jmp 0x14002f119
cmp eax, 0x17
jne 0x14002f1c1
lea ebp, [rax + 5]
cmp qword [rsi + 0x20], r13
je 0x14002f1c1
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x14002f1c1
cmp rax, rbp
jb 0x14002f1c1
mov ecx, 0x30
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
je 0x14002f1fc
mov ecx, dword [rsi]
mov dword [rax], ecx
mov ecx, dword [rsi + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rsi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rsi + 0xc]
mov dword [rax + 0x10], ebp
mov dword [rax + 0xc], ecx
mov rcx, rbp
mov qword [rax + 0x20], r13
mov qword [rax + 0x18], r13
mov qword [rax + 0x28], r13
call qword [sub.msvcrt.dll_malloc]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x14002f1eb
mov rdx, qword [rsi + 0x20]
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x14002f1ae
call qword [case.0x14000f357.0]
mov qword [rdi + 0x18], rax
test rax, rax
je 0x14002f1d0
test rbx, rbx
cmove rbx, rdi
test r15, r15
je 0x14002f1be
mov qword [r15 + 0x28], rdi
mov r15, rdi
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x14002f100
jmp 0x14002f202
mov rcx, qword [rdi + 0x20]
mov r14d, 8
call qword [fcn.14000203c]
mov rcx, rdi
call qword [fcn.14000203c]
jmp 0x14002f202
mov rcx, rdi
mov r14d, 8
call qword [fcn.14000203c]
jmp 0x14002f202
mov r14d, 8
mov rcx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x50]
test rcx, rcx
je 0x14002f217
call qword [sym.imp.WS2_32.DLL_freeaddrinfo]
test r14d, r14d
je 0x14002f24f
test rbx, rbx
je 0x14002f24a
mov rcx, qword [rbx + 0x20]
call qword [fcn.14000203c]
mov rcx, qword [rbx + 0x18]
call qword [fcn.14000203c]
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call qword [fcn.14000203c]
mov rbx, rdi
test rdi, rdi
jne 0x14002f221
mov rbx, r13
jmp 0x14002f263
test rbx, rbx
jne 0x14002f263
mov r14d, 0x2af9
mov ecx, r14d
call qword [sym.imp.WSOCK32.DLL_WSASetLastError]
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov qword [r12], rbx
mov eax, r14d
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rbx
ret
Function at 0x1400341f0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x60
mov edx, 1
mov ebx, 2
mov rsi, r9
lea r8d, [rdx + 5]
mov ecx, ebx
mov dword [rsp + 0x34], 0x10
mov dword [rsp + 0x30], 1
call qword [sym.imp.WSOCK32.DLL_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400343e1
xor eax, eax
mov ecx, 0x7f000001
mov qword [rsp + 0x38], rax
mov word [rsp + 0x38], bx
mov qword [rsp + 0x40], rax
call qword [sym.imp.WSOCK32.DLL_htonl]
lea r9, [rsp + 0x30]
lea r8d, [rbx + 2]
mov dword [rsp + 0x3c], eax
xor eax, eax
mov edx, 0xffff
mov rcx, rdi
mov qword [rsi + 8], 0xffffffffffffffff
mov qword [rsi], 0xffffffffffffffff
mov word [rsp + 0x3a], ax
mov dword [rsp + 0x20], 4
call qword [sym.imp.WSOCK32.DLL_setsockopt]
cmp eax, 0xffffffff
je 0x1400343c5
lea r8d, [rbx + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_bind]
cmp eax, 0xffffffff
je 0x1400343c5
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_getsockname]
cmp eax, 0xffffffff
je 0x1400343c5
lea edx, [rbx - 1]
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_listen]
cmp eax, 0xffffffff
je 0x1400343c5
lea edx, [rbx - 1]
xor r8d, r8d
mov ecx, ebx
call qword [sym.imp.WSOCK32.DLL_socket]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
je 0x1400343c5
lea r8d, [rbx + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x1400343c5
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_accept]
mov qword [rsi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x1400343c5
lea r8, [0x14004e208]
lea edx, [rbx + 0xa]
lea rcx, [rsp + 0x48]
mov r9, rsi
call fcn.140026710
lea rax, [rsp + 0x48]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x140034351
mov rcx, qword [rsi]
lea rdx, [rsp + 0x48]
xor r9d, r9d
mov r8d, ebx
call qword [sym.imp.WSOCK32.DLL_send]
movsxd rcx, eax
cmp rcx, rbx
jne 0x1400343c5
mov rcx, qword [rsi + 8]
xor r9d, r9d
lea rdx, [rsp + 0x54]
lea r8d, [r9 + 0xc]
call qword [sym.imp.WSOCK32.DLL_recv]
movsxd rcx, eax
cmp rcx, rbx
jne 0x1400343c5
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x48]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1400343c5
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_closesocket]
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_closesocket]
mov rcx, qword [rsi]
call qword [sym.imp.WSOCK32.DLL_closesocket]
mov rcx, qword [rsi + 8]
call qword [sym.imp.WSOCK32.DLL_closesocket]
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
or eax, 0xffffffff
add rsp, 0x60
pop rdi
ret

Function at 0x140034400
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x28
xor eax, eax
test edx, edx
lea r8, [rsp + 0x38]
setne al
mov edx, 0x8004667e
mov dword [rsp + 0x38], eax
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
add rsp, 0x28
ret
Function at 0x1400398b0
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movsxd rbx, edx
mov rdi, rcx
mov byte [rcx], 0
mov edx, ebx
call qword [sym.imp.WSOCK32.DLL_gethostname]
mov byte [rbx + rdi - 1], 0
test eax, eax
jne 0x1400398ea
lea edx, [rax + 0x2e]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_strchr]
test rax, rax
je 0x1400398e8
mov byte [rax], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140040640
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
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
mov r14, rdx
add rax, 0x18
add rcx, rax
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140040682
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 [rsp + 0x48], rsi
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1400406c5
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + 8]
mov r14d, dword [rbx + 0x18]
mov rdx, qword [rdi + 8]
add r14, qword [rdi + 0x10]
mov rcx, r14
call qword [rbx + 0x10]
mov ebp, dword [rbx + 0x20]
mov rcx, qword [rdi + 8]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x140040721
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
mov r8d, 1
xor al, 0x36
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + 8]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
mov r8d, 1
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 0x10]
call qword [rbx + 8]
dec rbp
jne 0x1400406e0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x140040763
nop dword [rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x140050cc1]
mov r8d, 1
call qword [rbx + 8]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x140050cc2]
mov r8d, 1
call qword [rbx + 8]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x140040730
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rax, rdi
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x140040f8c
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
cmp dword [0x140056c20], 0
mov r14, rdx
mov r15, rcx
lea rbx, [0x140056c30]
jne 0x140040fd9
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, rbx
mov dword [0x140056c58], eax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x140056c20], 1
mov ecx, dword [0x140056c58]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test rax, rax
jne 0x1400410ae
mov rcx, qword [0x140056760]
lea edx, [rax + 8]
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x1400410d9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x140056c28]
test rax, rax
je 0x140041029
mov qword [rax], rbp
mov rcx, rbx
mov qword [rbp + 8], rax
mov qword [0x140056c28], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
lea r9, [rbp + 0x20]
mov r8, rdi
mov rcx, rax
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdx, qword [rbp + 0x20]
lea rcx, [rbp + 0x18]
lea r8, [0x1400410f4]
mov r9, rbp
mov dword [rsp + 0x28], 8
or dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
mov ecx, dword [0x140056c58]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x140056760]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x1400410d9
mov qword [rax + 8], r15
mov qword [rax + 0x10], r14
mov rcx, qword [rbp + 0x10]
mov qword [rax], rcx
mov qword [rbp + 0x10], rax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x140af9058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140af91df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140af9089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140af906f
add dl, dl
jne 0x140af9096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140af90f6
xor eax, eax
add dl, dl
jne 0x140af90a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140af91ad
add dl, dl
jne 0x140af90b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140af90c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140af90d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140af90dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140af90ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140af907e
mov eax, 1
add dl, dl
jne 0x140af9106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140af9113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140af90fb
sub eax, ebx
mov ebx, 1
jne 0x140af914c
mov ecx, 1
add dl, dl
jne 0x140af912e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140af913b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140af9123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140af907e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140af9168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140af9175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140af915d
cmp eax, 0x7d00
jae 0x140af919b
cmp eax, 0x500
jb 0x140af9196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140af907e
cmp eax, 0x7f
ja 0x140af919e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140af907e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140af91d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140af907e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140002ab0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
sub rsp, 0x18
mov r8, rcx
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x140002b41
movsxd rax, dword [0x14000003c]
lea rdx, [0x140000000]
lea rcx, [rax + rdx]
cmp dword [rcx], 0x4550
jne 0x140002b41
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002b41
sub r8, rdx
movzx eax, word [rcx + 0x14]
lea rdx, [rcx + 0x18]
add rdx, rax
movzx eax, word [rcx + 6]
lea rcx, [rax + rax*4]
lea r9, [rdx + rcx*8]
mov qword [rsp], rdx
cmp rdx, r9
je 0x140002b25
mov ecx, dword [rdx + 0xc]
cmp r8, rcx
jb 0x140002b1f
mov eax, dword [rdx + 8]
add eax, ecx
cmp r8, rax
jb 0x140002b27
add rdx, 0x28
jmp 0x140002b04
xor edx, edx
test rdx, rdx
jne 0x140002b30
xor al, al
jmp 0x140002b47
test dword [rdx + 0x24], 0x80000000
je 0x140002b3d
xor al, al
jmp 0x140002b47
mov al, 1
jmp 0x140002b47
xor al, al
jmp 0x140002b47
add rsp, 0x18
ret

Function at 0x1400041e8
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x20
mov esi, r8d
mov ebx, edx
mov r14d, ecx
test r8d, r8d
jne 0x140003fbc
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140003fbc
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140003fbc
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003fbc
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140003fbc
cmp dword [rcx + 0x84], 0xe
jbe 0x140003fbc
cmp dword [rcx + 0xf8], esi
je 0x140003fbc
mov ecx, r14d
call fcn.140004104
mov ecx, 2
call fcn.140007540
nop
cmp byte [0x14001f3f0], 0
jne 0x140004086
mov r15d, 1
mov eax, r15d
xchg dword [0x14001f3e0], eax
test ebx, ebx
jne 0x14000402f
mov rdi, qword [section..data]
mov edx, edi
and edx, 0x3f
lea ecx, [rbx + 0x40]
sub ecx, edx
xor eax, eax
ror rax, cl
xor rax, rdi
mov rcx, qword [0x14001f3e8]
cmp rcx, rax
je 0x140004026
xor rdi, rcx
mov ecx, edx
ror rdi, cl
mov rcx, rdi
call qword [fcn.140003e14]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call rdi
lea rcx, [0x14001f588]
jmp 0x14000403b
cmp ebx, r15d
jne 0x140004041
lea rcx, [0x14001f5a0]
call fcn.140007080
nop
test ebx, ebx
jne 0x140004058
lea rdx, [0x140013328]
lea rcx, [0x140013308]
call fcn.140006a28
lea rdx, [0x140013338]
lea rcx, [0x140013330]
call fcn.140006a28
movzx eax, byte [0x14001f3f0]
test esi, esi
cmove eax, r15d
mov byte [0x14001f3f0], al
jmp 0x140004086
mov ecx, 2
call fcn.140007594
test esi, esi
jne 0x14000409d
mov ecx, r14d
call fcn.1400040b8
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop r15
ret
xor r8d, r8d
xor edx, edx
jmp 0x140003f4c
Function at 0x140002038
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x1400790c0], 0
je 0x14000205b
mov edx, 1
jmp 0x140002222
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
xor ebx, ebx
mov r8, qword [rax + 0x10]
xor eax, eax
mov rdx, qword [r8 + 0x30]
test rdx, rdx
je 0x1400020be
movsxd rcx, dword [rdx + 0x3c]
mov ecx, dword [rdx + rcx + 0x88]
test ecx, ecx
je 0x1400020b6
lea rax, [rcx + rdx]
mov ecx, dword [rax + 0xc]
add rcx, rdx
mov r9d, dword [rcx]
or r9d, 0x20202020
cmp r9d, 0x6c64746e
jne 0x1400020b6
mov ecx, dword [rcx + 4]
or ecx, 0x20202020
cmp ecx, 0x6c642e6c
je 0x1400020c8
mov r8, qword [r8]
mov rbx, rdx
jmp 0x140002070
test rax, rax
jne 0x1400020cb
jmp 0x140002222
mov rbx, rdx
mov ebp, dword [rax + 0x1c]
mov edi, dword [rax + 0x24]
xor esi, esi
lea r13, [0x1400790c8]
mov edx, dword [rax + 0x18]
mov eax, dword [rax + 0x20]
add rdi, rbx
add rbp, rbx
lea r10d, [rdx - 1]
add rax, rbx
lea r12, [rax + r10*4]
add r10, r10
add r10, rdi
mov ecx, dword [r12]
add rcx, rbx
cmp word [rcx], 0x775a
jne 0x140002133
call fcn.140001f80
mov r11d, esi
inc esi
shl r11, 4
add r11, r13
mov dword [r11], eax
movzx eax, word [r10]
mov eax, dword [rbp + rax*4]
mov dword [r11 + 4], eax
xor eax, eax
mov qword [r11 + 8], rax
cmp esi, 0x1f4
je 0x140002145
sub r12, 4
lea rax, [r10 - 2]
cmp rdi, r10
je 0x140002145
mov r10, rax
jmp 0x1400020f7
mov dword [0x1400790c0], esi
lea ebp, [rsi - 1]
lea r10, [0x1400790c8]
test ebp, ebp
je 0x1400021ac
lea rdx, [0x1400790c0]
xor ecx, ecx
lea eax, [rcx + 1]
mov r8d, dword [rdx + 0xc]
mov rcx, rax
shl rax, 4
add rax, r10
mov r9d, dword [rax + 4]
cmp r9d, r8d
jae 0x1400021a0
mov edi, dword [rdx + 8]
mov r11, qword [rdx + 0x10]
mov r12d, dword [rax]
mov dword [rdx + 0xc], r9d
mov r9, qword [rax + 8]
mov dword [rdx + 8], r12d
mov qword [rdx + 0x10], r9
mov dword [rax], edi
mov dword [rax + 4], r8d
mov qword [rax + 8], r11
add rdx, 0x10
cmp ecx, ebp
jb 0x140002162
dec ebp
jmp 0x140002155
mov eax, dword [0x1400790cc]
mov r13d, dword [0x1400790dc]
xor edi, edi
lea r15, [0x1400750e0]
sub r13d, eax
lea r12, [rbx + rax]
mov r14d, edi
cmp edi, r13d
jae 0x140002051
lea rdx, [r12 + rdi]
mov r8d, 3
mov rcx, r15
inc rdi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1400021c9
lea rdi, [0x1400790c0]
test r14d, r14d
je 0x140002051
add rdi, 0x10
cmp esi, ebp
je 0x140002051
mov ecx, dword [rdi - 4]
mov r8d, r13d
mov edx, r14d
inc ebp
add rcx, rbx
call fcn.140001fa8
mov qword [rdi], rax
jmp 0x1400021fe
mov eax, edx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140002e20
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140008aa0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140008aa0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140002e90
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14007b0d4]
mov rbx, rcx
test esi, esi
jle 0x140002fc0
mov rax, qword [0x14007b0d8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002edb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002f65
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002ec0
mov rcx, rbx
call fcn.1400038e0
mov rdi, rax
test rax, rax
je 0x140002fe2
mov rax, qword [0x14007b0d8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003a20
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14007b0d8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002fc7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002f5e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002f70
add dword [0x14007b0d4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
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 [0x14007b0d8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002f5e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002e20
nop dword [rax]
xor esi, esi
jmp 0x140002ee8
mov rax, qword [0x14007b0d8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002e20
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002e20
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003550
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14007b140]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14007b120]
test rbx, rbx
je 0x1400035ac
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x1400035a3
test rsi, rsi
je 0x1400035a3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003588
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400038e0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140076760]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003900
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003908
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003900
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000395d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140003954
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003900
add rax, 0x28
cmp rax, r9
jne 0x140003940
xor eax, eax
ret

Function at 0x140003960
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140076760]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000397f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003988
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000397f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140003a20
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140076760]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003a3f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003a48
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret