joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800ba770
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], r8
mov qword [rax + 0x20], r9
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x48
mov rbx, rcx
lea rdx, [rax + 0x18]
xor ebp, ebp
lea rcx, [rax - 0x38]
mov qword [rax - 0x38], rbp
call fcn.18000d71c
mov rsi, qword [rsp + 0x30]
mov edi, eax
test rsi, rsi
mov eax, 0x80070057
cmove edi, eax
test edi, edi
jne 0x1800ba7ff
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1800ba7b7
mov r8, qword [rsp + 0x78]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov r9d, 1
mov rdx, rbx
mov qword [rsp + 0x20], rsi
mov ecx, 0x40000000
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
test eax, eax
jns 0x1800ba7f6
mov ecx, eax
call fcn.18000ba18
mov edi, eax
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov eax, edi
add rsp, 0x48
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x1800ba80c
Capabilities:
Query or enumerate registry key

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor r13d, r13d
mov r15, r8
mov esi, r13d
mov qword [r8], r13
mov r12d, edx
mov rbx, rcx
mov r14d, 0x104
mov ecx, r14d
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemAlloc]
mov rdi, rax
test rax, rax
je 0x1800ba8b2
lea rax, [rsp + 0x70]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, r12d
mov dword [rsp + 0x20], r14d
mov rcx, rbx
call qword [sym.imp.ntdll.dll_ZwEnumerateKey]
mov ebp, eax
cmp eax, 0x80000005
je 0x1800ba8a4
cmp eax, 0xc0000023
je 0x1800ba8a4
cmp eax, 0x8000001a
je 0x1800ba8bd
test eax, eax
je 0x1800ba8c9
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov ecx, ebp
mov rdi, r13
call fcn.18000ba18
mov esi, eax
jmp 0x1800ba8b7
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
add r14d, r14d
jmp 0x1800ba8b7
mov esi, 0x8007000e
test esi, esi
je 0x1800ba840
jmp 0x1800ba8c9
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov rdi, r13
test esi, esi
jne 0x1800ba921
test rdi, rdi
je 0x1800ba92f
mov ecx, dword [rdi + 0xc]
or edx, 0xffffffff
lea eax, [rcx + 2]
cmp eax, ecx
cmovae edx, eax
sbb esi, esi
and esi, 0x80070216
cmp eax, ecx
jb 0x1800ba921
mov ecx, edx
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemAlloc]
mov rbx, rax
test rax, rax
je 0x1800ba91c
mov r8d, dword [rdi + 0xc]
lea rdx, [rdi + 0x10]
mov rcx, rax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov ecx, dword [rdi + 0xc]
shr rcx, 1
mov qword [r15], rbx
mov word [rbx + rcx*2], r13w
jmp 0x1800ba921
mov esi, 0x8007000e
test rdi, rdi
je 0x1800ba92f
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov rbx, qword [rsp + 0x60]
mov eax, esi
mov rsi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1800bbbdc
Capabilities:
Query service status
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x180122658]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor esi, esi
xor edx, edx
xor ecx, ecx
lea r8d, [rsi + 1]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x1800bbc24
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x1800bbcca
mov r8d, 0x14
lea rdx, str.AppInfo
mov rcx, rbp
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x1800bbc4c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x1800bbcc1
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_StartServiceW]
test eax, eax
jne 0x1800bbc6d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
cmp eax, 0x420
jne 0x1800bbcb8
mov ebx, 0x5b4
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
test eax, eax
je 0x1800bbcb0
cmp dword [rsp + 0x24], 4
je 0x1800bbcac
cmp dword [rsp + 0x24], 1
je 0x1800bbca6
mov ecx, 0x1f4
call qword [sym.imp.KERNELBASE.dll_Sleep]
inc esi
cmp esi, 0xa
jbe 0x1800bbc72
jmp 0x1800bbcb8
mov ebx, dword [rsp + 0x2c]
jmp 0x1800bbcb8
xor ebx, ebx
jmp 0x1800bbcb8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov eax, ebx
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.180023ec0
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x1800bc124
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x150]
sub rsp, 0x250
mov rax, qword [0x180122658]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov rbx, qword [rcx + 0x10]
lea rax, [rsp + 0x40]
mov rdi, qword [rcx]
xor r14d, r14d
add rdi, rbx
mov dword [rsp + 0x38], 0xc00000e5
mov qword [rsp + 0x30], rax
mov rsi, rdx
mov qword [rsp + 0x28], 0x200
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], r14
cmp rbx, rdi
jae 0x1800bc2e2
lea r13d, [r14 + 0x3d]
lea r15, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_RtlInitializeSmartLUnicodeStringWritingContext
lea rax, [rbp + 0x140]
mov rcx, rbx
sub rax, rdx
and rax, 0xfffffffffffffffe
cmp rax, 8
jl 0x1800bc2b2
mov r11b, byte [rbx]
mov r10b, r14b
inc rbx
mov r9b, r14b
cmp rbx, rdi
je 0x1800bc1ce
mov r10b, byte [rbx]
cmp rbx, rdi
mov r8, rbx
mov eax, r14d
cmove r8, rcx
cmove ax, r13w
mov word [rdx + 4], ax
lea rcx, [r8 + 1]
cmp rcx, rdi
je 0x1800bc1f0
mov r9b, byte [rcx]
cmp rcx, rdi
mov rbx, rcx
mov eax, r14d
cmove rbx, r8
movzx r8d, r10b
inc rbx
cmp rcx, rdi
movzx ecx, r11b
cmove ax, r13w
and ecx, 3
mov word [rdx + 6], ax
shl ecx, 4
movzx eax, r11b
shr rax, 2
movzx eax, byte [rax + r15]
mov word [rdx], ax
mov eax, r8d
shr rax, 4
or rcx, rax
movzx eax, byte [rcx + r15]
mov word [rdx + 2], ax
cmp word [rdx + 4], r14w
jne 0x1800bc263
and r8d, 0xf
movzx eax, r9b
shl r8d, 2
shr rax, 6
mov ecx, r8d
or rcx, rax
movzx eax, byte [rcx + r15]
mov word [rdx + 4], ax
cmp word [rdx + 6], r14w
jne 0x1800bc27a
movzx eax, r9b
and eax, 0x3f
movzx eax, byte [rax + r15]
mov word [rdx + 6], ax
add rdx, 8
lea rax, [rbp + 0x140]
cmp rdx, rax
jne 0x1800bc2a9
mov r9, rsi
mov qword [rsp + 0x20], 0x200
lea rdx, [rsp + 0x20]
call fcn.1800bd01c
test eax, eax
js 0x1800bc2e5
lea rdx, [rsp + 0x40]
cmp rbx, rdi
jb 0x1800bc19f
lea rax, [rsp + 0x40]
cmp rdx, rax
je 0x1800bc2da
lea rax, [rsp + 0x40]
mov r9, rsi
sub rdx, rax
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x20]
call fcn.1800bd01c
test eax, eax
js 0x1800bc2e5
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x1800bc2e5
mov eax, r14d
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.180023ec0
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret
Function at 0x1800bdb74
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r13, rcx
mov ebp, r8d
xor ecx, ecx
mov r12, rdx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
bt ebp, 8
jae 0x1800bdbdf
mov r14d, 0x103
lea r8, [r12 + 4]
mov edx, r14d
xor r9d, r9d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp eax, r14d
jbe 0x1800bdbd2
mov ecx, 0xd
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
or rdi, 0xffffffffffffffff
jmp 0x1800bdd66
xor ebx, ebx
mov dword [r12], ebx
mov edi, ebx
jmp 0x1800bdd66
mov edi, 1
mov r15d, ebp
not r15d
mov ecx, 0xc0000000
and r15d, edi
mov eax, ebp
add r15d, edi
shl r15d, 0x1e
test bpl, 2
cmovne r15d, ecx
and eax, 0x70
xor ebx, ebx
cmp eax, 0x10
je 0x1800bdc27
cmp eax, 0x20
je 0x1800bdc20
cmp eax, 0x30
mov esi, ebx
setne sil
add esi, 6
jmp 0x1800bdc29
mov esi, 5
jmp 0x1800bdc29
mov esi, ebx
mov eax, ebp
and eax, 0x1000
cmovne r15d, ecx
neg eax
sbb edx, edx
add edx, 3
mov dword [rsp + 0x90], edx
lea rdx, [r12 + 4]
bt ebp, 0xf
jb 0x1800bdcbc
mov qword [rsp + 0x28], rbx
mov r14d, 0x103
mov qword [rsp + 0x20], rdx
mov r9d, r14d
mov rdx, r13
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SearchPathA]
mov ecx, eax
cmp eax, r14d
ja 0x1800bdbbe
mov eax, ebp
and eax, 0x4000
test ecx, ecx
jne 0x1800bdcb4
test eax, eax
je 0x1800bdc92
mov ecx, 2
jmp 0x1800bdbc3
xor r9d, r9d
lea r8, [r12 + 4]
mov edx, r14d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
dec eax
cmp eax, 0x102
jbe 0x1800bdcbc
jmp 0x1800bdbbe
test eax, eax
jne 0x1800bdd66
mov eax, dword [rsp + 0x90]
lea rcx, [r12 + 4]
mov qword [rsp + 0x30], rbx
and ebp, 0xffff0000
mov dword [rsp + 0x28], ebp
xor r9d, r9d
mov r8d, esi
mov dword [rsp + 0x20], eax
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1800bdd66
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r14d, eax
cmp eax, 2
jne 0x1800bdd66
cmp dword [0x18012368c], ebx
je 0x1800bdd66
lea rcx, [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
test eax, eax
je 0x1800bdd5d
mov eax, dword [rsp + 0x90]
lea rcx, [r12 + 4]
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], ebp
mov r8d, esi
mov edx, r15d
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x88]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
mov ecx, r14d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rbx, qword [rsp + 0x80]
movzx ecx, ax
mov eax, edi
mov dword [r12], ecx
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1800bf374
Capabilities:
Query or enumerate registry key

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x40
and qword [rax - 0x10], 0
and qword [rax - 0x18], 0
and qword [rax - 0x20], 0
mov rcx, qword [rcx]
and qword [rax - 0x28], 0
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
mov ebx, eax
test eax, eax
jle 0x1800bf3a8
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
jns 0x1800bf417
cmp ebx, 0x80070103
je 0x1800bf417
cmp ebx, 0x800700ea
je 0x1800bf417
xor r8d, r8d
lea rcx, [0x1801220f0]
xor edx, edx
call fcn.18000e778
test al, al
jne 0x1800bf3e7
cmp dword [0x180122f00], 0
je 0x1800bf417
mov rax, qword [section..data]
test byte [rax + 0x1c], 1
je 0x1800bf417
lea rax, str.hr:__HRESULT_
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x28], rax
lea r8, str.RegistryKey::EnumSubKey
and dword [rsp + 0x20], 0
lea rdx, str.internalonecorecominccombase_registrykey.hpp
mov r9d, 0x5ff
mov ecx, ebx
call fcn.1800107c0
mov eax, ebx
add rsp, 0x40
pop rbx
ret
Function at 0x1800bf4b0
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r13d, r13d
lea rax, [r11 + 0x18]
mov qword [r11 - 0x38], rax
mov r15, r8
mov qword [r8], r13
mov rbp, rdx
mov qword [r11 - 0x40], r13
xor r8d, r8d
lea r9d, [r13 + 2]
mov dword [r11 + 0x18], r13d
mov r12, rcx
mov qword [r11 - 0x48], r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
test eax, eax
je 0x1800bf51d
mov rcx, qword [rsp + 0x68]
lea r8, str.comole32oleregistrationenumerationoleregistrationenumeration.cpp
mov r9d, eax
lea edx, [r13 + 0x39]
call fcn.1800a4694
jmp 0x1800bf623
mov al, byte [rsp + 0x80]
mov sil, 1
not al
test sil, al
jne 0x1800bf551
mov rcx, qword [rsp + 0x68]
lea r8, str.comole32oleregistrationenumerationoleregistrationenumeration.cpp
mov ebx, 0x8000ffff
mov edx, 0x3a
mov r9d, ebx
call fcn.18000deb0
jmp 0x1800bf621
mov r14d, dword [rsp + 0x80]
and r14, 0xfffffffffffffffe
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
lea r8, [r14 + 2]
mov edx, 8
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1800bf589
mov word [rax], r13w
mov sil, r13b
mov word [r14 + rax], r13w
test sil, sil
je 0x1800bf595
mov edx, 0x3f
jmp 0x1800bf5f6
lea rax, [rsp + 0x80]
mov r9d, 2
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov rdx, rbp
mov rcx, r12
mov qword [rsp + 0x20], r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
test eax, eax
je 0x1800bf5e2
mov rcx, qword [rsp + 0x68]
lea r8, str.comole32oleregistrationenumerationoleregistrationenumeration.cpp
mov r9d, eax
mov edx, 0x41
call fcn.1800a4694
mov ebx, eax
jmp 0x1800bf614
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [r15], rax
test rax, rax
jne 0x1800bf611
lea edx, [rax + 0x42]
mov rcx, qword [rsp + 0x68]
lea r8, str.comole32oleregistrationenumerationoleregistrationenumeration.cpp
mov ebx, 0x8007000e
mov r9d, ebx
call fcn.18000deb0
jmp 0x1800bf614
mov ebx, r13d
test rdi, rdi
je 0x1800bf621
mov rcx, rdi
call fcn.18003cab8
mov eax, ebx
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1800c1c8c
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
mov dword [r11 + 0x18], r8d
mov qword [r11 + 8], rcx
push rbx
sub rsp, 0x50
and dword [rsp + 0x70], 0
lea rax, [r11 + 0x18]
mov qword [r11 - 0x18], rax
mov rbx, r9
lea rax, [r11 + 8]
xor r9d, r9d
mov qword [r11 - 0x20], rax
xor r8d, r8d
and qword [r11 - 0x28], 0
mov dword [rsp + 0x28], 0x20006
and dword [rsp + 0x20], 0
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x1800c1d0d
mov eax, dword [rsp + 0x80]
mov r9d, 1
mov rcx, qword [rsp + 0x60]
add eax, eax
mov dword [rsp + 0x28], eax
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
add rsp, 0x50
pop rbx
ret
Function at 0x140001844
Capabilities:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp - 0x10], 0
mov rax, qword [0x1403ef698]
test rax, rax
je 0x14000187a
mov rax, qword [0x1403ef698]
mov rcx, rax
call sub.msvcrt.dll_free
mov qword [0x1403ef698], 0
lea rax, str.HOME
mov rcx, rax
call sub.msvcrt.dll_getenv
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x1400018b5
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x10]
lea r9, str._.magic_magic.mgc
mov r8, rdx
lea rdx, [0x1402c0469]
mov rcx, rax
call fcn.1400015a4
lea rax, str.LOCALAPPDATA
mov rcx, rax
call sub.msvcrt.dll_getenv
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x1400018f0
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x10]
lea r9, str._.magic_magic.mgc
mov r8, rdx
lea rdx, [0x1402c0469]
mov rcx, rax
call fcn.1400015a4
lea rax, str.USERPROFILE
mov rcx, rax
call sub.msvcrt.dll_getenv
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x14000192b
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x10]
lea r9, str._.magic_magic.mgc
mov r8, rdx
lea rdx, str._s_Local_Settings_Application_Data_s
mov rcx, rax
call fcn.1400015a4
lea rax, str.COMMONPROGRAMFILES
mov rcx, rax
call sub.msvcrt.dll_getenv
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x140001966
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x10]
lea r9, str._.magic_magic.mgc
mov r8, rdx
lea rdx, [0x1402c0469]
mov rcx, rax
call fcn.1400015a4
lea rax, [rbp - 0x10]
mov edx, 0
mov rcx, rax
call fcn.140001683
mov rdx, qword [0x1403ef690]
lea rax, [rbp - 0x10]
mov rcx, rax
call fcn.140001683
mov rax, qword [rbp - 0x10]
mov qword [0x1403ef698], rax
mov rax, qword [0x1403ef698]
add rsp, 0x30
pop rbp
ret

Function at 0x1400019a2
Capabilities:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
cmp qword [rbp + 0x10], 0
je 0x1400019be
mov rax, qword [rbp + 0x10]
jmp 0x1400019f2
lea rax, str.MAGIC
mov rcx, rax
call sub.msvcrt.dll_getenv
mov qword [rbp + 0x10], rax
cmp qword [rbp + 0x10], 0
je 0x1400019de
mov rax, qword [rbp + 0x10]
jmp 0x1400019f2
cmp dword [rbp + 0x18], 0
jne 0x1400019eb
call fcn.140001844
jmp 0x1400019f2
lea rax, str._opt_mxe_usr_x86_64_w64_mingw32.static_share_misc_magic
add rsp, 0x20
pop rbp
ret
Function at 0x14000868c
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x90]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
mov dword [rbp - 4], 0xffffffff
mov edx, 0x30
mov ecx, 1
call sub.msvcrt.dll_calloc
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x1400086e9
mov edx, 0x30
mov rcx, qword [rbp + 0x20]
call fcn.14000cce0
jmp 0x1400088a3
mov rax, qword [rbp - 0x20]
mov dword [rax + 0x10], 0
mov rax, qword [rbp + 0x28]
mov r8d, 0
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.140008e21
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x14000889c
mov rax, qword [rbp - 0x10]
mov edx, 0x8000
mov rcx, rax
call sub.msvcrt.dll__open
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0xffffffff
je 0x14000889f
lea rdx, [rbp - 0x60]
mov eax, dword [rbp - 4]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__fstat64]
call rax
cmp eax, 0xffffffff
jne 0x140008777
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov rdx, qword [rbp - 0x10]
mov r9, rdx
lea r8, [0x1402c1e77]
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.14000cc45
jmp 0x1400088a3
mov rax, qword [rbp - 0x48]
cmp rax, 7
jle 0x14000878f
mov rbx, qword [rbp - 0x48]
call fcn.14000276b
cmp rbx, rax
jle 0x1400087cf
mov rax, qword [rbp - 0x48]
cmp rax, 7
jg 0x1400087a2
lea rax, str.small
jmp 0x1400087a9
lea rax, str.large
mov rdx, qword [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9, rdx
lea r8, str.file___s_is_too__s
mov edx, 0
mov rcx, qword [rbp + 0x20]
call fcn.14000cc45
jmp 0x1400088a3
mov rax, qword [rbp - 0x48]
mov rdx, rax
mov rax, qword [rbp - 0x20]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 0x20]
mov dword [rax + 0x10], 1
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov rcx, rax
call sub.msvcrt.dll_malloc
mov rdx, rax
mov rax, qword [rbp - 0x20]
mov qword [rax], rdx
mov rax, qword [rbp - 0x20]
mov rax, qword [rax]
test rax, rax
jne 0x140008825
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.14000cce0
jmp 0x1400088a3
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov ecx, eax
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax]
mov eax, dword [rbp - 4]
mov r8d, ecx
mov ecx, eax
call sub.msvcrt.dll__read_1
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
cmp rdx, rax
je 0x14000885e
mov rcx, qword [rbp + 0x20]
call fcn.14000cd4b
jmp 0x1400088a3
mov eax, dword [rbp - 4]
mov ecx, eax
call sub.msvcrt.dll__close
mov dword [rbp - 4], 0xffffffff
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r8, rdx
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.1400088d9
test eax, eax
jne 0x1400088a2
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp - 0x20]
jmp 0x1400088cf
nop
jmp 0x1400088a3
nop
jmp 0x1400088a3
nop
cmp dword [rbp - 4], 0xffffffff
je 0x1400088b3
mov eax, dword [rbp - 4]
mov ecx, eax
call sub.msvcrt.dll__close
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.140002f0c
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp - 0x18]
add rsp, 0x98
pop rbx
pop rbp
ret
Function at 0x140031730
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov word [rsp + 0x88], ax
mov byte [rsp + 0x8a], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x140031842
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14003181a
add rax, 1
cmp rax, 0x6b
je 0x140031837
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x140031810
cmp edx, 0x6a
je 0x140031837
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x14003182b

Function at 0x140031be0
Capabilities:
Allocate thread local storage

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
lea rsi, [0x1403f1940]
mov rcx, rsi
call fcn.1400314a0
lea r13, [rax + 8]
mov r12, rax
mov rcx, r13
call fcn.140030000
mov ebx, dword [0x1403f1940]
test ebx, ebx
jne 0x140031c50
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140276218], eax
cmp eax, 0xffffffff
je 0x14022b036
mov dword [0x1403f1940], 1
mov rcx, r13
call fcn.140030320
test r12, r12
je 0x140031c82
mov rcx, r12
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
jmp fcn.140031860
cmp ebx, 1
je 0x140031c31
mov ecx, 2
call qword [fcn.1400440e0]
mov r9d, ebx
mov r8, rsi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov rcx, r13
call fcn.140030320
test r12, r12
jne 0x140031c3e
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
call sub.msvcrt.dll_abort
nop