joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002440
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x14000249c
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 0x140002493
test rsi, rsi
je 0x140002493
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002478
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 0x1400027d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400043a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400027f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400027f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400027f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000284d
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]
cmp rcx, r8
mov rdx, r8
jb 0x140002844
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400027f0
add rax, 0x28
cmp rax, r9
jne 0x140002830
xor eax, eax
ret

Function at 0x140002850
Capabilities:
Parse pe header

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

Function at 0x140002910
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400043a0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000292f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002938
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140005610
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140005638
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14000565e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140005660
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x1400056b9
test ecx, ecx
jle 0x140005699
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x1400056b9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400056b9
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x1400056e0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140005702
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140005718
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140005734
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140005736
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140005772
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14000580e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x1400057ad
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x1400057ee
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14000580e
cmp rbx, rax
ja 0x1400057c0
test rbx, rbx
je 0x14000580e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x140005c70
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140005c9d
xor eax, eax
jmp 0x140005e09
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140005cd7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140005cd7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140005e09
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140005dfc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140005d1a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140005d45
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140005e01
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140005db4
sub eax, 1
je 0x140005db4
cmp eax, 2
jne 0x140005dfc
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140005e01
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140005de2
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140005dfc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140005e01
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400092a0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140006400
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x1400064d3
cmp byte [rcx + 0x71], 0
je 0x1400064d3
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400064cf
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140006494
sub eax, 1
je 0x140006498
cmp eax, 2
jne 0x1400064cf
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400092a0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x1400064c6
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x1400064cf
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000647c
xor al, al
jmp 0x14000647c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400092a0
add rsp, 0x60
pop rbx
ret

Function at 0x140008700
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x14000873a
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x14000873f
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x140008788
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x14000b530]
cmp byte [rcx + rax], 0
je 0x140008788
dec r8
sub rdx, 1
jne 0x14000876e
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x140009c90
Capabilities:
Parse pe header

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

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
test rdx, rdx
mov rsi, rcx
mov rbx, rdx
je 0x402e4f
mov rcx, rdx
call sub.msvcrt.dll_strlen
mov r8, rax
mov rcx, rbx
mov r9, rsi
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.004112c8

Function at 0x404090
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, 2
call qword [fcn.00411350]
mov r8d, 0x3f
mov edx, 1
lea rcx, str._GC__cannot_register_global_variable__too_many_global_variables
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call fcn.004112c8
mov ecx, 1
call sub.msvcrt.dll_exit
nop

Function at 0x4040d0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, 2
call qword [fcn.00411350]
mov r8d, 0x4b
mov edx, 1
lea rcx, str._GC__cannot_register_thread_local_variable__too_many_thread_local_variables
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call fcn.004112c8
mov ecx, 1
call sub.msvcrt.dll_exit
nop
push rdi
push rsi
push rbx
sub rsp, 0x20
xor ecx, ecx
mov rdi, qword [fcn.00411350]
call rdi
mov rsi, qword [sym.imp.msvcrt.dll__fileno]
mov rcx, rax
call rsi
mov edx, 0x8000
mov rbx, qword [sym.imp.msvcrt.dll__setmode]
mov ecx, eax
call rbx
mov ecx, 1
call rdi
mov rcx, rax
call rsi
mov edx, 0x8000
mov ecx, eax
call rbx
mov ecx, 2
call rdi
mov rcx, rax
call rsi
mov edx, 0x8000
mov ecx, eax
call rbx
lea rcx, [0x00413a10]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
je 0x40418a
lea rdx, str.inet_ntop
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rax, qword [0x00420a40]
cmp rax, 0xdab
jg 0x40421f
lea rcx, [rax + 1]
lea rdx, [0x00419ce0]
cmp rcx, 0xdac
mov qword [0x00420a40], rcx
lea rbx, [0x00408d20]
mov qword [rdx + rax*8], rbx
je 0x40421f
lea rsi, [0x00408d10]
mov qword [rdx + rcx*8], rsi
lea rcx, [rax + 2]
cmp rcx, 0xdac
mov qword [0x00420a40], rcx
je 0x40421f
lea rdi, [0x00408ba0]
mov qword [rdx + rcx*8], rdi
lea rcx, [rax + 3]
cmp rcx, 0xdac
mov qword [0x00420a40], rcx
je 0x40421f
lea rdi, [0x00408b90]
add rax, 4
mov qword [rdx + rcx*8], rdi
mov qword [0x00420a40], rax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.004040d0
nop
nop
nop word cs:[rax + rax]
Function at 0x407510
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
test rcx, rcx
mov rbp, rcx
mov rbx, rdx
je 0x40770a
cmp qword [rcx + 8], 0
mov rsi, rcx
mov rdi, qword [rcx]
js 0x407683
cmp rdi, 7
mov r8d, 7
mov rax, qword [0x004277e8]
cmovl rdi, r8
cmp qword [0x004277e0], rax
jle 0x4076e1
mov rax, qword [0x004277d8]
cmp qword [0x004298d0], rax
jge 0x4076e1
lea rdx, [rdi + 0x21]
lea rcx, [0x00427838]
call fcn.00403d00
lea rsi, [0x00412020]
mov qword [rax + 8], rsi
mov qword [rax], 4
mov rdx, qword [0x004277e8]
mov rcx, qword [0x004277f8]
cmp rdx, 8
jle 0x4076f9
shl rdx, 3
lea r9, [rcx + rdx - 8]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea r9, [rcx + rdx - 0x10]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea r9, [rcx + rdx - 0x18]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea r9, [rcx + rdx - 0x20]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea r9, [rcx + rdx - 0x28]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea r9, [rcx + rdx - 0x30]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea r9, [rcx + rdx - 0x38]
mov r10, qword [r9]
mov r8, qword [r10]
cmp r8, 7
ja 0x407650
lea rcx, [rcx + rdx - 0x40]
mov r8, qword [rcx]
mov rdx, qword [r8]
cmp rdx, 7
jbe 0x40770e
and rdx, 0xfffffffffffffffb
mov qword [r8], rdx
mov qword [rcx], rax
jmp 0x40765a
and r8, 0xfffffffffffffffb
mov qword [r10], r8
mov qword [r9], rax
lea rsi, [rax + 0x10]
mov qword [rsi + 8], rdi
mov qword [rax + 0x10], 0
mov rdi, qword [rbp]
lea rcx, [rax + 0x20]
lea rdx, [rbp + 0x10]
mov qword [rax + 0x10], rdi
lea r8, [rdi + 1]
call sub.msvcrt.dll_memcpy
lea r8, [rdi + rbx]
mov rcx, rsi
sub rcx, rbx
test rdi, rdi
jle 0x4076d5
nop dword [rax]
nop word cs:[rax + rax]
mov rax, rbx
mov rdx, rbx
sar rax, 8
sar rdx, 0x10
xor eax, ebx
and edx, 0xffffffee
and eax, 0xffffffee
xor al, byte [rcx + rbx + 0x10]
xor eax, edx
mov rdx, rbx
sar rdx, 0x18
and edx, 0xffffffee
xor eax, edx
mov byte [rcx + rbx + 0x10], al
add rbx, 1
cmp rbx, r8
jne 0x4076a0
mov rax, rsi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp qword [0x00427830], 0
jne 0x40756e
call fcn.00406720
jmp 0x40756e
mov qword [rcx + rdx*8], rax
add qword [0x004277e8], 1
jmp 0x40765a
xor esi, esi
jmp 0x4076d5
lea rcx, [0x004277e8]
mov rdx, rax
mov qword [rsp + 0x28], rax
call fcn.00405c00
mov rax, qword [rsp + 0x28]
jmp 0x40765a
Function at 0x4102d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0042a984]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x410458
mov rax, qword [0x0042a988]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x41031c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4103a5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x410300
mov rcx, rbx
call fcn.00410f70
test rax, rax
mov r12, rax
je 0x41048d
mov rax, qword [0x0042a988]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.004110a0
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0042a988]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x410470
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x41039e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x410400
add dword [0x0042a984], 1
cmp edi, 8
jae 0x4103d3
test dil, 4
jne 0x410444
test edi, edi
je 0x4103c8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x41045f
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 0x4103c8
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 0x4103ec
jmp 0x4103c8
add rsi, qword [0x0042a988]
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 0x41039e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00411520
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x4103c8
xor esi, esi
jmp 0x410327
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x4103c8
mov rax, qword [0x0042a988]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00411520
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00411520
nop
nop dword [rax]

Function at 0x410be0
Capabilities:
Get thread local storage value

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

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004152e0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x410fdd
mov rcx, r8
call fcn.00410e50
test eax, eax
je 0x410fdd
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 0x410fdd
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 0x410fd4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x410fdf
add rax, 0x28
cmp rax, r9
jne 0x410fc0
xor eax, eax
add rsp, 0x28
ret

Function at 0x411520
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
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.00411350
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.00411350
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
Function at 0x140004610
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
push rcx
pop rbx
nop
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.14000a3b0
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.14000a3b0
nop
push rbx
pop rdx
push rax
pop rcx
nop
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140004680
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140011104]
push rcx
pop rbx
nop
or esi, esi
jle 0x1400047b0
mov rax, qword [0x140011108]
sub r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400046cb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140004755
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400046b0
push rbx
pop rcx
nop
call fcn.1400050d0
push rax
nop
pop rdi
or rax, rax
je 0x1400047d2
mov rax, qword [0x140011108]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140005210
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140011108]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
or rax, rax
je 0x1400047b7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000474e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140004760
add dword [0x140011104], 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 [0x140011108]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
or eax, eax
jne 0x14000474e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140004610
nop dword [rax]
sub esi, esi
jmp 0x1400046d8
mov rax, qword [0x140011108]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140004610
nop
push rbx
pop rdx
lea rcx, str.Address__p_has_no_image_section
call fcn.140004610
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140004d40
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140011160]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140011140]
or rbx, rbx
je 0x140004d9c
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
push rax
pop rsi
nop
call rdi
or eax, eax
jne 0x140004d93
or rsi, rsi
je 0x140004d93
mov rax, qword [rbx + 8]
push rsi
nop
pop rcx
call rax
mov rbx, qword [rbx + 0x10]
or rbx, rbx
jne 0x140004d78
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 0x1400050d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14000ca40]
sub eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400050f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400050f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400050f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
or r8w, r8w
je 0x14000514d
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 0x140005144
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400050f0
add rax, 0x28
cmp rax, r9
jne 0x140005130
sub eax, eax
ret

Function at 0x140005150
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14000ca40]
sub ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000516f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140005178
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000516f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140005210
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14000ca40]
sub edx, edx
cmp word [rax], 0x5a4d
jne 0x14000522f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140005238
nop
push rdx
pop rax
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
push rdx
pop rax
nop
ret