joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400c4a00
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r14
sub rsp, 0x250
mov rax, qword [0x14010e040]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov eax, dword [rcx + 0x58]
lea rbx, [rsp + 0x30]
mov dword [rsp + 0x40], eax
mov ebp, r9d
mov eax, dword [rcx + 0x5c]
mov rsi, rcx
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x290]
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x3c], r8d
mov dword [rsp + 0x30], r9d
mov qword [rsp + 0x278], rdi
nop dword [rax]
mov r10d, dword [rbx + 0x14]
mov eax, r10d
mov r14d, dword [rbx + 4]
cmp r10d, r14d
mov r9d, dword [rbx + 0xc]
cmovg eax, r14d
cmp r9d, eax
jl 0x1400c4b9c
cmp r10d, r14d
mov eax, r14d
cmovg eax, r10d
cmp r9d, eax
jg 0x1400c4b9c
cmp r10d, r14d
jne 0x1400c4aa0
sub rbx, 0x10
jmp 0x1400c4be4
mov edx, dword [rsi + 0x88]
xor r9d, r9d
cmp r10d, r14d
setge r9b
inc r9d
cmp edx, r9d
je 0x1400c4b12
mov eax, dword [rsi + 4]
mov ecx, eax
mov r8d, dword [rsi + 8]
neg ecx
cmp r10d, r14d
jge 0x1400c4ad4
dec eax
add eax, r10d
and eax, ecx
sub eax, r10d
jmp 0x1400c4adc
and ecx, r10d
mov eax, r10d
sub eax, ecx
cmp eax, r8d
setge r11b
test edx, edx
je 0x1400c4afb
movzx edx, r11b
mov rcx, rsi
call fcn.1400c5bb0
test al, al
jne 0x1400c4bf5
movzx r8d, r11b
mov edx, r9d
mov rcx, rsi
call fcn.1400c6220
test al, al
jne 0x1400c4bf5
mov edx, dword [rsi + 0x64]
lea r9, [0x1400c6580]
mov ecx, dword [rsi + 0x60]
mov r8, rbx
cmp r10d, r14d
jge 0x1400c4b3e
mov dword [rsp + 0x28], edx
mov edx, 2
mov dword [rsp + 0x20], ecx
mov rcx, rsi
call fcn.1400c4880
jmp 0x1400c4b92
mov eax, dword [rbx + 4]
neg ecx
movzx edi, byte [rsi + 0x6a]
neg eax
mov dword [rbx + 4], eax
neg edx
mov eax, dword [rbx + 0xc]
neg eax
mov dword [rsp + 0x28], ecx
mov dword [rbx + 0xc], eax
mov rcx, rsi
mov eax, dword [rbx + 0x14]
neg eax
mov dword [rsp + 0x20], edx
mov edx, 2
mov dword [rbx + 0x14], eax
call fcn.1400c4880
test dil, dil
je 0x1400c4b8a
cmp byte [rsi + 0x6a], 0
jne 0x1400c4b8a
mov rdx, qword [rsi + 0x70]
mov ecx, dword [rdx + 0x20]
neg ecx
mov dword [rdx + 0x20], ecx
mov ecx, dword [rbx + 4]
neg ecx
mov dword [rbx + 4], ecx
test al, al
jne 0x1400c4bf5
sub rbx, 0x10
jmp 0x1400c4be4
mov eax, dword [rbx + 8]
mov ecx, dword [rbx + 0x10]
mov dword [rbx + 0x20], ecx
add ecx, eax
mov dword [rbx + 0x24], r10d
lea edx, [rax + rbp]
mov eax, ecx
sar eax, 1
mov dword [rbx + 0x18], eax
lea eax, [rcx + rdx]
sar eax, 2
lea ecx, [r10 + r9]
mov dword [rbx + 0x10], eax
mov eax, ecx
sar edx, 1
sar eax, 1
mov dword [rbx + 8], edx
lea edx, [r14 + r9]
mov dword [rbx + 0x1c], eax
lea eax, [rcx + rdx]
sar eax, 2
sar edx, 1
mov dword [rbx + 0x14], eax
mov dword [rbx + 0xc], edx
add rbx, 0x10
lea rax, [rsp + 0x30]
cmp rbx, rax
jb 0x1400c4bf9
mov ebp, dword [rbx]
jmp 0x1400c4a60
mov al, 1
jmp 0x1400c4c02
mov dword [rsi + 0x58], ebp
xor al, al
mov dword [rsi + 0x5c], r14d
mov rdi, qword [rsp + 0x278]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1400d09e0
mov rbx, qword [rsp + 0x280]
add rsp, 0x250
pop r14
pop rsi
pop rbp
ret
Function at 0x1400caf50
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
push rbx
push rbp
sub rsp, 0x48
mov rbp, rdx
mov rbx, rcx
test rcx, rcx
jne 0x1400caf6c
lea eax, [rcx + 0x28]
add rsp, 0x48
pop rbp
pop rbx
ret
mov qword [rsp + 0x68], rsi
xor r9d, r9d
mov qword [rsp + 0x40], r14
mov edx, 0x80000000
xor r14d, r14d
mov rcx, rbp
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea r8d, [r14 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400cafc0
mov r14, qword [rsp + 0x40]
lea eax, [rsi + 2]
mov rsi, qword [rsp + 0x68]
add rsp, 0x48
pop rbp
pop rbx
ret
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x78], rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400cb0e5
mov rax, qword [rsp + 0x70]
cmp rax, 0x7fffffff
jg 0x1400cb0e5
test rax, rax
je 0x1400cb0e5
xor r9d, r9d
mov qword [rsp + 0x28], r14
xor edx, edx
mov dword [rsp + 0x20], r14d
mov rcx, rsi
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rdi, rax
test rax, rax
je 0x1400cb0e5
mov ecx, dword [rsp + 0x70]
xor r9d, r9d
mov dword [rbx + 8], ecx
xor r8d, r8d
mov rcx, rax
mov dword [rbx + 0xc], r14d
mov qword [rsp + 0x20], r14
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rcx, rdi
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rbx], r14
je 0x1400cb05a
lea rax, [0x1400cb140]
jmp 0x1400cb0b3
mov rcx, qword [rbx + 0x30]
xor edx, edx
movsxd r8, dword [rbx + 8]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1400cb0e5
mov edi, r14d
nop dword [rax + rax]
mov r8d, dword [rbx + 8]
lea r9, [rsp + 0x60]
mov edx, edi
sub r8d, edi
add rdx, qword [rbx]
mov rcx, rsi
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400cb0d3
add edi, dword [rsp + 0x60]
cmp edi, dword [rbx + 8]
jne 0x1400cb080
lea rax, [0x1400cb110]
mov rcx, rsi
mov qword [rbx + 0x28], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx]
mov qword [rbx + 0x10], rax
xor eax, eax
mov qword [rbx + 0x18], rbp
mov qword [rbx + 0x20], r14
jmp 0x1400cb0fa
mov rcx, qword [rbx + 0x30]
xor edx, edx
mov r8, qword [rbx]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x51
mov qword [rbx], r14
mov qword [rbx + 8], r14
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x68]
mov r14, qword [rsp + 0x40]
add rsp, 0x48
pop rbp
pop rbx
ret
Function at 0x1400cc6d0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov r9, rdx
test rdx, rdx
jne 0x1400cc6db
xor eax, eax
ret
lea r11, [0x1400f11f0]
not ecx
cmp r8d, 8
jb 0x1400cc7b1
mov r10d, r8d
shr r10, 3
nop word [rax + rax]
movzx edx, byte [r9]
mov eax, ecx
xor rdx, rax
shr ecx, 8
movzx eax, dl
add r8d, 0xfffffff8
movzx edx, byte [r9 + 1]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 2]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 3]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 4]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 5]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 6]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 7]
add r9, 8
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
sub r10, 1
jne 0x1400cc700
test r8d, r8d
je 0x1400cc7dd
nop word [rax + rax]
movzx edx, byte [r9]
lea r9, [r9 + 1]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
add r8d, 0xffffffff
jne 0x1400cc7c0
not ecx
mov eax, ecx
ret
Function at 0x1400d03ac
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 0x1400d03e6
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x1400d03eb
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 0x1400d0434
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1400f1940]
cmp byte [rcx + rax], 0
je 0x1400d0434
dec r8
sub rdx, 1
jne 0x1400d041a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x1400d17e0
Capabilities:
Parse pe header

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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140017380]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140017390]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x14001a008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x1400172f0]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call fcn.14000dca0
mov rcx, qword [0x140017410]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140017370]
lea rcx, section..text
mov qword [rdx], rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.14000dab0
mov ebx, dword [0x14001a028]
lea r12d, [rbx + 1]
movsxd r12, r12d
shl r12, 3
mov rcx, r12
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rdi, qword [0x14001a020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub r12, 8
xor ebx, ebx
nop dword [rax]
mov rcx, qword [rdi + rbx]
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
lea rsi, [rax + rax + 2]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [rdi + rbx]
mov rcx, rax
add rbx, 8
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp rbx, r12
jne 0x140001288
add rbx, rbp
mov qword [rbx], 0
mov qword [0x14001a020], rbp
call fcn.14000d7f0
mov rax, qword [0x140017300]
mov r8, qword [0x14001a018]
mov ecx, dword [0x14001a028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x14001a020]
call fcn.14000d810
mov ecx, dword [0x14001a00c]
mov dword [0x14001a010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x14001a008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140017390]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call fcn.14000f1e0
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x1400173b0]
mov rcx, qword [0x1400173a0]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x14001a010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x1400173d0]
mov rcx, qword [0x1400173c0]
mov dword [rsi], 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x1400011f5
mov rbx, rax
jmp 0x1400012be
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop
Function at 0x140001880
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
lea rcx, [rcx + 0x70]
lea rdx, [0x140011129]
call fcn.1400042a0
mov rbp, rax
test rax, rax
je 0x1400019b0
mov edx, dword [r12 + 4]
xor r8d, r8d
add edx, dword [rbx]
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
test eax, eax
js 0x140001990
mov esi, dword [r12 + 0xc]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r13, rax
test rax, rax
je 0x1400019c6
cmp byte [r12 + 0x10], 1
je 0x140001970
mov rdi, rax
test rsi, rsi
jne 0x140001908
jmp 0x140001950
add rdi, rbx
sub rsi, rbx
je 0x140001950
mov ebx, 0x2000
mov r9, rbp
mov r8d, 1
mov rcx, rdi
cmp rsi, rbx
cmovbe rbx, rsi
mov rdx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
jne 0x140001900
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
call fcn.140002d30
mov rcx, r13
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r13d, r13d
mov rcx, rbp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rax, r13
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor r8d, r8d
mov r9, rax
mov rdx, r12
mov rcx, rbp
call fcn.140001490
test eax, eax
je 0x140001950
jmp 0x140001945
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
lea rcx, str.fseek
call fcn.140002d30
jmp 0x14000194d
lea rdx, [r12 + 0x12]
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
xor r13d, r13d
call fcn.140002bb0
jmp 0x140001958
mov r9d, esi
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
lea rcx, str.malloc
call fcn.140002d30
jmp 0x14000194d
Function at 0x140001a90
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [rcx + 0x5074], 1
mov rsi, rcx
mov rbx, rdx
jne 0x140001c90
cmp byte [rdx + 0x11], 0x6e
je 0x140001bb0
lea r13, [rdx + 0x12]
lea rcx, [rcx + 0x3070]
mov rdx, r13
call fcn.1400081c0
mov r12, rax
test rax, rax
je 0x140001ca6
lea rcx, [rsi + 0x70]
lea rdx, [0x140011129]
call fcn.1400042a0
mov rbp, rax
test rax, rax
je 0x140001c20
mov edx, dword [rbx + 4]
xor r8d, r8d
add edx, dword [rsi]
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
test eax, eax
js 0x140001c70
cmp byte [rbx + 0x10], 1
je 0x140001bd0
mov ecx, 0x2000
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rdi, rax
test rax, rax
je 0x140001cbe
mov esi, dword [rbx + 0xc]
test rsi, rsi
jne 0x140001b66
jmp 0x140001c40
mov r9, r12
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
test rax, rax
je 0x140001c50
sub rsi, rbx
je 0x140001c40
mov ebx, 0x2000
mov r9, rbp
mov r8d, 1
mov rcx, rdi
cmp rsi, rbx
cmovbe rbx, rsi
mov rdx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
jne 0x140001b40
mov r8, r13
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
call fcn.140002d30
mov esi, 0xffffffff
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x140001be3
call fcn.1400019f0
mov esi, eax
test eax, eax
js 0x140001c08
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor r9d, r9d
mov r8, r12
mov rdx, rbx
mov rcx, rbp
call fcn.140001490
mov esi, eax
mov rcx, rbp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, r12
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea rdx, [rbx + 0x12]
lea rcx, str.Failed_to_create_symbolic_link__s__n
call fcn.140002bb0
jmp 0x140001bbb
mov rdx, r13
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov esi, 0xffffffff
call fcn.140002bb0
jmp 0x140001beb
xor esi, esi
jmp 0x140001ba6
mov r8, r13
lea rdx, str.Failed_to_extract__s:_failed_to_write_data_chunk__n
lea rcx, str.fwrite
call fcn.140002d30
jmp 0x140001ba1
mov r8, r13
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
lea rcx, str.fseek
call fcn.140002d30
mov esi, 0xffffffff
jmp 0x140001be3
lea rcx, str.pyi_arch_extract2fs_was_called_before_temporary_directory_was_initialized__n
call fcn.140002bb0
mov esi, 0xffffffff
jmp 0x140001bbb
mov r8, r13
lea rdx, str.Failed_to_extract__s:_failed_to_open_target_file__n
lea rcx, str.fopen
call fcn.140002d30
jmp 0x140001c9c
mov r8, r13
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
lea rcx, str.malloc
call fcn.140002d30
jmp 0x140001c86
Function at 0x140001ce0
Capabilities:
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
lea rdx, [0x140011129]
mov rbx, rcx
lea rcx, [rcx + 0x70]
call fcn.1400042a0
mov rsi, rax
test rax, rax
je 0x140001ee1
mov rax, qword [0x140016e60]
lea rdx, [rsp + 0x28]
mov r8d, 8
mov rcx, rsi
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
shr rax, 0x18
add eax, 0xc
mov byte [rsp + 0x2b], al
call fcn.1400087e0
mov rdi, rax
test rax, rax
jne 0x140001d58
mov edi, 0xffffffff
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov eax, edi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
xor r8d, r8d
mov edx, eax
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
test eax, eax
js 0x140001e90
lea rcx, [rbx + 0x18]
mov r9, rsi
mov r8d, 1
mov edx, 0x58
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
je 0x140001eb0
mov eax, dword [rbx + 0x20]
mov ecx, dword [rbx + 0x28]
add rdi, 0x58
xor r8d, r8d
mov dword [rbx + 0x5078], 0
mov edx, dword [rbx + 0x24]
bswap eax
bswap ecx
mov dword [rbx + 0x20], eax
mov eax, eax
mov dword [rbx + 0x28], ecx
mov ecx, dword [rbx + 0x2c]
sub rdi, rax
bswap edx
mov qword [rbx], rdi
bswap ecx
mov dword [rbx + 0x24], edx
add edx, edi
mov dword [rbx + 0x2c], ecx
mov dword [0x14001a040], ecx
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
movsxd rdi, dword [rbx + 0x28]
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rbx + 8], rax
mov rcx, rax
test rax, rax
je 0x140001eeb
mov r9, rsi
mov r8d, 1
mov rdx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
je 0x140001e70
movsxd rax, dword [rbx + 0x28]
add rax, qword [rbx + 8]
mov rcx, rsi
mov qword [rbx + 0x10], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
mov edi, eax
test eax, eax
jne 0x140001ed0
mov rax, qword [rbx + 8]
mov r8, qword [rbx + 0x10]
cmp rax, r8
jae 0x140001d40
nop word [rax + rax]
mov ecx, dword [rax + 4]
mov edx, dword [rax]
bswap ecx
mov dword [rax + 4], ecx
mov ecx, dword [rax + 8]
bswap edx
mov dword [rax], edx
movsxd rdx, edx
bswap ecx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0xc]
bswap ecx
mov dword [rax + 0xc], ecx
add rax, rdx
cmp rax, r8
jb 0x140001e40
jmp 0x140001d40
lea rdx, str.Could_not_read_full_TOC__n
lea rcx, str.fread
call fcn.140002d30
jmp 0x140001d3b
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.140002d30
jmp 0x140001d3b
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
call fcn.140002d30
jmp 0x140001d3b
lea rcx, str.Error_on_file._n
call fcn.140002bb0
jmp 0x140001d3b
mov edi, 0xffffffff
jmp 0x140001d48
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, str.malloc
call fcn.140002d30
jmp 0x140001d3b
Function at 0x140007a60
Capabilities:
Query environment variable

Disassembly:
push rbx
mov eax, 0x4020
call fcn.14000e880
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
lea rbx, [rsp + 0x20]
call fcn.140008e20
mov r8d, 0x2000
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x140007aa8
xor eax, eax
add rsp, 0x4020
pop rbx
ret
lea rdx, [rsp + 0x2020]
mov r8d, 0x2000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
xor r8d, r8d
mov rdx, rbx
call fcn.140008c50
mov rcx, rax
test rax, rax
je 0x140007a96
cmp byte [rax], 0
je 0x140007a96
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
add rsp, 0x4020
pop rbx
ret

Function at 0x140007b50
Capabilities:
Set environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.140008e20
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
mov esi, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x140007e90
Capabilities:
Delete directory

Disassembly:
push r15
mov eax, 0x44b8
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000e880
sub rsp, rax
mov r8d, 0x1000
lea rax, [rsp + 0x24a0]
mov rdx, rcx
lea r12, [rsp + 0x490]
mov rsi, rax
mov rcx, rax
mov qword [rsp + 0x28], rax
call fcn.140008e20
mov rdx, rsi
mov rcx, r12
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscpy
mov rcx, r12
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov r13, rax
movzx eax, word [rsp + rax*2 + 0x48e]
cmp ax, 0x2f
je 0x140007efc
cmp ax, 0x5c
jne 0x140007f50
lea rdx, [0x1400134ca]
mov rcx, r12
lea rbx, [rsp + 0x260]
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscat
mov rdx, rbx
mov rcx, r12
call fcn.14000ec30
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140007f68
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrmdir]
nop
add rsp, 0x44b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [0x1400134c6]
mov rcx, r12
add r13, 1
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscat
jmp 0x140007efc
lea rdi, [rsp + 0x30]
mov ecx, 0x46
mov rsi, rbx
mov rdx, r13
rep movsq qword [rdi], qword [rsi]
lea rbp, [rsp + 0x30]
mov rcx, r12
mov r8, rbp
mov r15, rbp
call fcn.140007fd0
jmp 0x140007faf
mov rdi, rbp
mov ecx, 0x46
mov rsi, rbx
mov r8, r15
rep movsq qword [rdi], qword [rsi]
mov rdx, r13
mov rcx, r12
mov rbp, r15
call fcn.140007fd0
mov rdx, rbx
mov rcx, r14
call fcn.14000ed00
test eax, eax
je 0x140007f90
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__findclose]
jmp 0x140007f27

Function at 0x140007fd0
Capabilities:
Delete directory
Delete file

Disassembly:
push rbp
mov eax, 0x1038
push rdi
push rsi
push rbx
call fcn.14000e880
sub rsp, rax
lea rsi, [r8 + 0x24]
mov rbp, rcx
mov rdi, rdx
mov rbx, r8
lea rdx, [0x1400134ce]
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
test eax, eax
jne 0x140008010
add rsp, 0x1038
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rdx, [0x1400134d2]
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
test eax, eax
je 0x140008001
xor eax, eax
mov rcx, rbp
mov rdx, rsi
mov word [rbp + rdi*2], ax
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscat
mov rcx, rbp
test byte [rbx], 0x10
je 0x140008070
call fcn.140009100
test eax, eax
jne 0x140008098
lea rbx, [rsp + 0x20]
mov r8d, 0x1000
mov rdx, rbp
mov rcx, rbx
call fcn.140008c50
mov rcx, rbx
call fcn.140007e90
jmp 0x140008001
mov rbx, qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
call rbx
test eax, eax
je 0x140008001
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rbp
call rbx
jmp 0x140008001
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrmdir]
jmp 0x140008001
Function at 0x1400082e0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rdi
mov eax, 0x1020
push rsi
push rbx
call fcn.14000e880
sub rsp, rax
mov rdi, r8
mov rsi, rdx
lea rdx, [0x14001356c]
call fcn.1400042a0
mov rdx, rdi
mov rcx, rsi
mov rbx, rax
call fcn.1400081c0
mov rdi, rax
test rbx, rbx
je 0x1400083d9
test rax, rax
je 0x1400083cc
lea rsi, [rsp + 0x20]
nop word [rax + rax]
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
test eax, eax
jne 0x1400083c8
mov r8d, 0x1000
mov r9, rbx
mov edx, 1
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov r8, rax
test rax, rax
jne 0x140008378
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140008330
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_clearerr
jmp 0x1400083a1
mov r9, rdi
mov edx, 1
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
test rax, rax
je 0x140008399
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140008330
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_clearerr
mov esi, 0xffffffff
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov eax, esi
add rsp, 0x1020
pop rbx
pop rsi
pop rdi
ret
xor esi, esi
jmp 0x1400083a6
test rbx, rbx
je 0x1400083d9
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
test rdi, rdi
je 0x1400083e6
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov esi, 0xffffffff
jmp 0x1400083b6