joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14006ab30
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, qword [rcx]
mov r11, rcx
movsxd r10, edx
mov r9, qword [rax + 0x198]
mov r8d, dword [r9 + r10*4 + 0xc08]
sub r8d, 1
je 0x14006abc0
sub r8d, 1
je 0x14006ab91
cmp r8d, 1
jne 0x14006abd7
mov ecx, dword [r9 + r10*4 + 0x1008]
test ecx, ecx
je 0x14006abb5
cmp ecx, r8d
jne 0x14006abd7
xor eax, eax
mov dword [r9 + r10*4 + 0xc08], 2
mov r8d, edx
mov dword [r9 + r10*4 + 0x1008], eax
mov edx, 0xfd
mov rcx, r11
jmp fcn.14006abe0
mov ecx, dword [r9 + r10*4 + 0x1008]
test ecx, ecx
je 0x14006abb5
cmp ecx, 1
jne 0x14006abd7
xor eax, eax
mov dword [r9 + r10*4 + 0xc08], eax
mov dword [r9 + r10*4 + 0x1008], eax
ret
xor eax, eax
mov dword [r9 + r10*4 + 0xc08], eax
ret
xor eax, eax
mov r8d, edx
mov edx, 0xfe
mov dword [r9 + r10*4 + 0xc08], eax
jmp fcn.14006abe0
ret

Function at 0x14006abe0
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
xor r9d, r9d
mov byte [rax + 0x11], dl
mov esi, edx
mov byte [rax + 0x10], 0xff
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x1d0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x14006ac3e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14004c020
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.14006a3e0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x14006ad90
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x14006af3e
push rbp
push rdi
push r14
sub rsp, 0x30
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], r15
mov rdi, qword [rbp + 0x198]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x14006add9
mov byte [rsi], 0xff
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x14006ade7
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x14006adf5
mov byte [rax], Ordinal_32
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 + 0x58], ax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rbx]
movzx r8d, ax
mov word [rsp + 0x50], ax
cmp rcx, rbx
jae 0x14006ae2f
mov byte [rcx], r15b
inc qword [rbx]
mov rdx, qword [rbx]
mov r15, qword [rsp + 0x20]
cmp rdx, rbx
jae 0x14006ae46
movzx ecx, byte [rsp + 0x59]
mov byte [rdx], cl
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x14006ae54
mov byte [rax], r8b
inc qword [rbx]
mov rcx, qword [rbx]
cmp rcx, rbx
jae 0x14006ae66
movzx eax, byte [rsp + 0x51]
mov byte [rcx], al
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x14006ae74
mov byte [rax], 0xff
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x14006ae82
mov byte [rax], 0xf0
inc qword [rbx]
mov rax, qword [rbx]
lea r8, [rdi + 0x1cba]
mov r9, rax
mov qword [rdi + 0x1ec0], rax
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.14006a520
mov rcx, qword [r14 + 0x1d0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x60]
test eax, eax
jns 0x14006aeea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14004c020
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.14006ac70
mov rcx, qword [r14 + 0x1d0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x14006af36
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14004c020
add rsp, 0x30
pop r14
pop rdi
pop rbp
ret
Function at 0x14006c160
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1400a70c0]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0x710]
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 0x14006c1fc
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 + 0xe8], rsi
cmp r8d, 4
jge 0x14006c257
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.14004c020
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1400777e0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
mov rcx, qword [rbx + 0x168]
movzx eax, byte [rcx]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 1]
or edx, eax
mov dword [rbx + 0xc], edx
sub edx, 3
je 0x14006c2ed
sub edx, 1
je 0x14006c364
sub edx, 1
je 0x14006c2c1
cmp edx, 1
je 0x14006c2a4
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x14007c778]
call fcn.14004c020
jmp 0x14006c364
lea rdx, [rcx + 2]
add r8d, 0xfffffffe
mov rcx, rbx
call fcn.14006be90
test eax, eax
je 0x14006c364
jmp 0x14006c229
movzx eax, byte [rcx + 2]
mov rdx, rcx
shl ax, 8
movzx ecx, ax
movzx eax, byte [rdx + 3]
lea r8, [rdx + 4]
or ecx, eax
lea rdx, [0x14007bafc]
mov dword [rbx + 8], ecx
mov rcx, rdi
call fcn.14004c0e0
jmp 0x14006c364
cmp r8d, 4
jle 0x14006c364
movzx eax, byte [rcx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 3]
or edx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, edx
jne 0x14006c364
lea eax, [r8 - 4]
mov edx, 1
lea r8, [rcx + 4]
movsxd r9, eax
mov rcx, r14
call fcn.14004bea0
mov esi, eax
test eax, eax
je 0x14006c343
mov edx, 5
mov rcx, rbx
call fcn.14006cd30
mov eax, esi
jmp 0x14006c229
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xb0], rax
mov rdx, qword [rdi + 0xb0]
call fcn.140056c30
mov rcx, r14
call fcn.140056e50
test eax, eax
je 0x14006c227
mov edx, 5
mov rcx, rbx
call fcn.14006cd30
mov eax, Ordinal_46
jmp 0x14006c229
Function at 0x14006d2f0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x148
mov rax, qword [0x1400a70c0]
xor rax, rsp
mov qword [rsp + 0x130], rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14006d357
mov r8d, 0x104
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14006d357
lea rcx, [rsp + 0x20]
call qword [case.0x140042747.0]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400777e0
add rsp, 0x148
ret
xor eax, eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400777e0
add rsp, 0x148
ret
jmp 0x14006d2f0

Function at 0x14006d380
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x148
mov rax, qword [0x1400a70c0]
xor rax, rsp
mov qword [rsp + 0x130], rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14006d357
mov r8d, 0x104
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14006d357
lea rcx, [rsp + 0x20]
call qword [case.0x140042747.0]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400777e0
add rsp, 0x148
ret
xor eax, eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400777e0
add rsp, 0x148
ret
jmp 0x14006d2f0
Function at 0x140070e50
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rdi, r8
mov rcx, qword [rcx]
mov rsi, rdx
cmp dword [rcx + 8], 2
jne 0x140070e9a
mov rax, qword [rbx + 0x18]
test rax, rax
jne 0x140070e8a
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov r9, qword [rcx + 0x10]
mov edx, 1
mov rcx, rsi
call rax
jmp 0x140070ee4
cmp qword [rbx + 0x10], 0
jne 0x140070ecf
mov rcx, qword [rcx + 0x10]
lea rdx, [0x14007bd8c]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x140070ecf
or rax, 0xffffffffffffffff
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov r9, qword [rbx + 0x10]
mov r8, rdi
mov edx, 1
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rdi, rax
test rax, rax
jne 0x140070f08
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140070eff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rbx + 0x10], rdi
mov rax, qword [rbx]
mov rcx, qword [rax]
mov qword [rbx], rcx
mov rbx, qword [rsp + 0x30]
mov rax, rdi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140072910
Capabilities:
Hash data using md4
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rbp, r8
mov rsi, rdx
or rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rdx + rbx], 0
jne 0x140072930
lea rcx, [rbx + rbx]
call qword [section..data]
mov rdi, rax
test rax, rax
jne 0x140072953
lea eax, [rdi + 0x1b]
jmp 0x140072a22
xor ecx, ecx
test rbx, rbx
je 0x140072974
nop word [rax + rax]
movzx eax, byte [rcx + rsi]
mov byte [rdi + rcx*2], al
mov byte [rdi + rcx*2 + 1], 0
inc rcx
cmp rcx, rbx
jb 0x140072960
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000000
xor r8d, r8d
lea rcx, [rsp + 0x38]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x140072a0f
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x8002
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140072a02
mov rcx, qword [rsp + 0x30]
lea r8d, [rbx + rbx]
xor r9d, r9d
mov dword [rsp + 0x68], reloc.WS2_32.dll_recv
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x68]
mov r8, rbp
mov dword [rsp + 0x20], 0
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x38]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
mov rcx, rdi
mov dword [rbp + 0x10], eax
mov byte [rbp + 0x14], al
call qword [case.0x14005980b.0]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
Function at 0x140073770
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov ebx, edx
mov byte [rcx], 0
mov rdi, rcx
call qword [sym.imp.WS2_32.dll_gethostname]
lea edx, [rbx - 1]
movsxd r8, edx
mov byte [r8 + rdi], 0
test eax, eax
jne 0x1400737ad
lea edx, [rax + 0x2e]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_strchr]
test rax, rax
je 0x1400737ab
mov byte [rax], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140077020
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 [section..data]
mov rdi, rax
test rax, rax
jne 0x140077062
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 0x1400770a5
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 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 0x140077102
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 0x1400770c0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x140077143
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400848ab]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400848ac]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x140077110
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 0x140077e58
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140077ea2
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140077ea2
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140077ea2
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140077ea2
cmp dword [rcx + 0x84], 0xe
jbe 0x140077ea2
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140077ea4
xor al, al
add rsp, 0x28
ret
Function at 0x40b170
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004cd624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40b2f8
mov rax, qword [0x004cd628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40b1bc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40b245
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40b1a0
mov rcx, rbx
call fcn.0040be10
test rax, rax
mov r12, rax
je 0x40b32d
mov rax, qword [0x004cd628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.0040bf40
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004cd628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40b310
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40b23e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40b2a0
add dword [0x004cd624], 1
cmp edi, 8
jae 0x40b273
test dil, 4
jne 0x40b2e4
test edi, edi
je 0x40b268
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40b2ff
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 0x40b268
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 0x40b28c
jmp 0x40b268
add rsi, qword [0x004cd628]
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 0x40b23e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004a0e50
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40b268
xor esi, esi
jmp 0x40b1c7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40b268
mov rax, qword [0x004cd628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.004a0e50
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.004a0e50
nop
nop dword [rax]

Function at 0x40ba80
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004cd900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004cd8e0]
test rbx, rbx
je 0x40bad4
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 0x40bacb
test rsi, rsi
je 0x40bacb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40bab0
lea rcx, [0x004cd900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40be10
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004a9410]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40be7d
mov rcx, r8
call fcn.0040bcf0
test eax, eax
je 0x40be7d
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 0x40be7d
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 0x40be74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40be7f
add rax, 0x28
cmp rax, r9
jne 0x40be60
xor eax, eax
add rsp, 0x28
ret

Function at 0x418780
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x004a1148], eax
je 0x41879a
add rsp, 0x28
ret
call sub.msvcrt.dll_abort
nop

Function at 0x418ca0
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x418cc3
call fcn.00418640
cmp eax, 1
je 0x418cce
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x418d45
mov eax, 0x28
jmp 0x418d2a
add rax, 1
cmp rax, 0x6b
je 0x418d37
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x418d20
cmp eax, 0x6a
jne 0x418d4a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x418d37
Function at 0x418df0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x004ce3e0], 1
je 0x418e06
call fcn.00418d60
mov ecx, dword [0x004a1148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x418e30
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.00418be0
cmp qword [0x004d1050], 0
mov rsi, rax
je 0x418e1a
test rax, rax
je 0x418e1a
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 [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call fcn.00418ca0
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x418f20
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a1148]
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x418f20
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
Function at 0x46c110
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rbp, rcx
mov rdi, rdx
mov esi, r8d
jmp 0x46c138
call r12
cmp dword [rax], 4
jne 0x46c156
mov rcx, rbp
call fcn.0046c010
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x46c130
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x4a0e50
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp fcn.00401510
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 fcn.00416e30
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.00416e30
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530