joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14007f1a0
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Hash data with crc32

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x1400b9f89], 0
mov r12, rcx
mov r13, rdx
mov rdi, r8
je 0x14007f228
lea rdx, [0x1400a75a2]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x14007f340
mov rsi, qword [0x1400b9e48]
jmp 0x14007f1e5
lea rsi, [rdx + rax + 4]
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rsi
mov ebx, eax
call sub.msvcrt.dll_strlen
lea rdx, [rsi + rax + 1]
mov eax, dword [rdx]
test ebx, ebx
jne 0x14007f1e0
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, r12
mov rdx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp fcn.14006cd70
mov r8d, 0xa
mov edx, 3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x1400b9e48], rax
mov rdx, rax
mov r9d, dword [rax]
lea rax, [rax + 4]
mov qword [0x1400b9e48], rax
mov eax, dword [rdx + 4]
lea rcx, [rdx + 8]
mov qword [0x1400b9e48], rcx
test eax, eax
je 0x14007f328
sub eax, 1
lea r8, [rdx + rax + 9]
mov eax, 0xffffffff
nop word [rax + rax]
movzx edx, byte [rcx]
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
shr eax, 1
and edx, 1
add rcx, 1
neg edx
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor eax, edx
cmp r8, rcx
jne 0x14007f290
not eax
cmp r9d, eax
jne 0x14007f3c7
mov byte [0x1400b9f89], 1
jmp 0x14007f1bd
cmp byte [0x1400b9f88], 0
jne 0x14007f1d4
mov rbx, qword [sym.imp.python39.dll_PyDict_New]
call rbx
mov qword [0x1400ba8c8], rax
call rbx
mov qword [0x1400ba8c0], rax
call rbx
mov qword [0x1400ba8b8], rax
call rbx
mov qword [0x1400ba8b0], rax
call rbx
mov qword [0x1400ba8a8], rax
call rbx
mov qword [0x1400ba8a0], rax
call rbx
mov qword [0x1400ba898], rax
call rbx
mov byte [0x1400b9f88], 1
mov qword [0x1400ba890], rax
mov rax, qword [sym.imp.python39.dll__PyRuntime]
mov rax, qword [rax + 0x1f0]
mov rax, qword [rax + 0x10]
add rax, 0xdc0
mov qword [0x1400b9e40], rax
jmp 0x14007f1d4
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x140088eb0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.14009a210
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.14009a210
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x140089b62
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400bad28]
test eax, eax
je 0x140089bfa
lea rax, [0x1400bad00]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400bad30]
mov qword [rbp - 8], rax
jmp 0x140089bde
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140089bd2
cmp qword [rbp - 0x10], 0
je 0x140089bd2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140089b98
lea rax, [0x1400bad00]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140089bfb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140089d00
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140089d28
mov eax, 0
jmp 0x140089d76
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140089d51
mov eax, 0
jmp 0x140089d76
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140089d71
mov eax, 0
jmp 0x140089d76
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140089d7c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140089dfa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140089df1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140089df1
mov rax, qword [rbp - 8]
jmp 0x140089e0f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140089dc4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400016b0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
cmp byte [0x140606f18], 0
jne 0x140001771
lea rcx, str.UMASK
mov byte [0x140606f18], 1
mov dword [0x14033f5f0], 0x1a0
mov dword [0x14033f5f4], 0x1e8
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001701
mov rcx, rax
call fcn.140001510
or eax, 0x180
mov dword [0x14033f5f0], eax
lea rcx, str.UMASK_DIR
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001726
mov rcx, rax
call fcn.140001510
or eax, 0x1c0
mov dword [0x14033f5f4], eax
call fcn.140006c60
test al, al
jne 0x140001778
call fcn.1400070a0
test al, al
jne 0x140001778
lea rcx, str.HOME
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov qword [0x140606f88], rax
test rax, rax
je 0x140001767
mov rdx, rax
lea rcx, [0x1406071b0]
call fcn.1400038e0
mov qword [0x140606f88], rax
call fcn.140001870
call fcn.1400097b0
xor al, al
add rsp, 0x28
ret
mov al, 1
add rsp, 0x28
ret

Function at 0x1400018b0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x38
lea rax, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesTcpipParameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140001957
lea rax, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesWinsock2Parameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140001957
lea rax, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesWinsockParameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140001957
lea rcx, str.HAVE_TCPIP
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001950
cmp byte [0x140606f19], 0
je 0x140001957
xor al, al
add rsp, 0x38
ret
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
add rsp, 0x38
ret

Function at 0x140001970
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x140606c18]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
call fcn.1400018b0
test al, al
je 0x1400019f7
mov qword [rsp + 0x1d0], rbx
lea rdx, [rsp + 0x20]
mov ebx, 0x202
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400019b7
cmp word [rsp + 0x20], bx
je 0x1400019ce
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, ebx
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400019d5
mov byte [0x140606f19], 1
mov rbx, qword [rsp + 0x1d0]
xor al, al
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140063810
add rsp, 0x1d8
ret
xor al, al
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140063810
add rsp, 0x1d8
ret
Function at 0x140001a20
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
lea rbp, [rsp - 0x980]
sub rsp, 0xa80
mov rax, qword [0x140606c18]
xor rax, rsp
mov qword [rbp + 0x970], rax
lea rax, [rsp + 0x50]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMySQL
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140001b9e
mov rcx, qword [rsp + 0x50]
lea r9, [rsp + 0x44]
mov qword [rsp + 0xa90], rbx
lea r8, [rsp + 0x60]
lea ebx, [rax + 1]
mov qword [rsp + 0xa98], rdi
lea rax, [rsp + 0x40]
mov dword [rsp + 0x44], 0xff
mov qword [rsp + 0x38], rax
xor edi, edi
lea rax, [rbp + 0x60]
mov dword [rsp + 0x40], 0x3ff
mov qword [rsp + 0x30], rax
xor edx, edx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
je 0x140001b83
nop word [rax + rax]
cmp eax, 0xea
je 0x140001b2d
test eax, eax
jne 0x140001b83
cmp dword [rsp + 0x48], 1
jne 0x140001b2d
lea r9, [rbp + 0x60]
mov qword [rsp + 0x20], rdi
lea r8, [0x140066df0]
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x460]
call fcn.14002d0f0
lea rcx, [rbp + 0x460]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x44]
lea rax, [rbp + 0x60]
mov dword [rsp + 0x44], 0xff
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x60]
lea rax, [rsp + 0x48]
mov dword [rsp + 0x40], 0x3ff
mov qword [rsp + 0x28], rax
mov edx, ebx
mov qword [rsp + 0x20], rdi
inc ebx
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x140001ae0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rsp + 0xa98]
mov rbx, qword [rsp + 0xa90]
mov rcx, qword [rbp + 0x970]
xor rcx, rsp
call fcn.140063810
add rsp, 0xa80
pop rbp
ret

Function at 0x140005300
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x48
mov rax, qword [0x140606c18]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rax, qword [0x14060b438]
test rax, rax
jne 0x1400053b7
movzx eax, word [0x140067200]
lea r8, [rsp + 0x22]
mov word [rsp + 0x20], ax
mov edx, 0x1004
movzx eax, byte [0x140067202]
mov ecx, 0x800
mov byte [rsp + 0x22], al
xor eax, eax
mov dword [rsp + 0x23], eax
mov word [rsp + 0x27], ax
mov byte [rsp + 0x29], al
lea r9d, [rax + 7]
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
xor edx, edx
lea r8, [rsp + 0x20]
mov eax, edx
lea r9, str.cp932
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8 + rax]
inc rax
cmp cl, byte [r9 + rax - 1]
jne 0x140005397
cmp rax, 6
jne 0x140005380
jmp 0x14000539c
sbb edx, edx
or edx, 1
test edx, edx
lea rcx, [0x14046b650]
lea rax, [0x1403416c0]
cmove rax, rcx
mov qword [0x14060b438], rax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140063810
add rsp, 0x48
ret
Function at 0x14000e160
Capabilities:
Terminate process

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x20
test rcx, rcx
mov r14d, edx
mov esi, 1
lea rdx, [0x14000eae0]
cmovne rsi, rcx
lea rcx, [0x14060b680]
call fcn.140004150
mov rcx, rsi
test r14b, 0x20
je 0x14000e1a4
mov rax, qword [0x14060b668]
mov edx, 1
call rax
jmp 0x14000e1ad
mov rax, qword [0x14060b660]
call rax
mov rdi, rax
test rax, rax
jne 0x14000e22e
mov qword [rsp + 0x50], rbp
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call fcn.140007030
mov ebp, r14d
and ebp, 8
je 0x14000e201
lea rax, [fcn.140003240]
mov qword [rsp + 0x48], rbx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
call fcn.14000cd80
lea rcx, fcn.140003240
mov rbx, rax
call fcn.14000cd70
xchg qword [rax], rbx
mov rbx, qword [rsp + 0x48]
test r14b, 0x18
je 0x14000e219
mov r8, rsi
mov edx, 0x440
mov ecx, 5
call fcn.1400070d0
test ebp, ebp
mov rbp, qword [rsp + 0x50]
je 0x14000e22e
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rax, rdi
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret

Function at 0x14000e240
Capabilities:
Terminate process

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x20
test rcx, rcx
mov edi, 1
mov r14d, edx
cmovne rdi, rcx
mov rcx, rdi
test dl, 0x20
je 0x14000e26d
mov edx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
jmp 0x14000e273
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x14000e2f4
mov qword [rsp + 0x50], rbp
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call fcn.140007030
mov ebp, r14d
and ebp, 8
je 0x14000e2c7
lea rax, [fcn.140003240]
mov qword [rsp + 0x48], rbx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
call fcn.14000cd80
lea rcx, fcn.140003240
mov rbx, rax
call fcn.14000cd70
xchg qword [rax], rbx
mov rbx, qword [rsp + 0x48]
test r14b, 0x18
je 0x14000e2df
mov r8, rdi
mov edx, 0x440
mov ecx, 5
call fcn.1400070d0
test ebp, ebp
mov rbp, qword [rsp + 0x50]
je 0x14000e2f4
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rax, rsi
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret

Function at 0x14000fa60
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movsx ebx, cl
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, ebx
mov edi, eax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_toupper]
lea ecx, [rax - 0x41]
cmp cl, 0x19
ja 0x14000faa0
movsx ecx, al
sub ecx, 0x41
movzx edx, cl
bt edi, edx
jae 0x14000faa0
mov al, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x30]
xor al, al
add rsp, 0x20
pop rdi
ret
Function at 0x1400111ef
Capabilities:
Terminate process

Disassembly:
jmp 0x140012f70
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x140011276
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400142c0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400142e0
xor al, al
jmp 0x140014361
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400142f3
xor al, al
jmp 0x140014361
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001431d
xor al, al
jmp 0x140014361
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014331
xor al, al
jmp 0x140014361
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014343
xor al, al
jmp 0x140014361
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001435f
xor al, al
jmp 0x140014361
mov al, 1
add rsp, 0x38
ret
Function at 0x140003830
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000b010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000385d
xor eax, eax
jmp 0x1400039c9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140003897
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140003897
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 0x1400039c9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400039bc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400038da
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 0x140003905
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 0x1400039c1
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 0x140003974
sub eax, 1
je 0x140003974
cmp eax, 2
jne 0x1400039bc
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 0x1400039c1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400039a2
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 0x1400039bc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400039c1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140004e00
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140003e80
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000b010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003f53
cmp byte [rcx + 0x71], 0
je 0x140003f53
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140003f4f
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 0x140003f14
sub eax, 1
je 0x140003f18
cmp eax, 2
jne 0x140003f4f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140004e00
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140003f46
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 0x140003f4f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140003efc
xor al, al
jmp 0x140003efc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140004e00
add rsp, 0x60
pop rbx
ret

Function at 0x140005974
Capabilities:
Parse pe header

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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d88d5e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d86c8d8
mov rax, qword [0x6d88d5e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d86c79c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d86c825
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d86c780
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d86c90d
mov rax, qword [0x6d88d5e8]
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 [0x6d88d5e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d86c8f0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d86c81e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d86c880
add dword [0x6d88d5e4], 1
cmp edi, 8
jae 0x6d86c853
test dil, 4
jne 0x6d86c8c4
test edi, edi
je 0x6d86c848
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d86c8df
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 0x6d86c848
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 0x6d86c86c
jmp 0x6d86c848
add rsi, qword [0x6d88d5e8]
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 0x6d86c81e
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 0x6d86c848
xor esi, esi
jmp 0x6d86c7a7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d86c848
mov rax, qword [0x6d88d5e8]
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 0x6d86d060
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d88d8c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d88d8a0]
test rbx, rbx
je 0x6d86d0b4
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 0x6d86d0ab
test rsi, rsi
je 0x6d86d0ab
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d86d090
lea rcx, [0x6d88d8c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]