joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140050720
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x50
mov rax, qword [0x140067040]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rsi, rcx
lea r9, [rsp + 0x20]
xor r14d, r14d
mov ecx, 0xb
xor r8d, r8d
mov dword [rsp + 0x20], r14d
xor edx, edx
mov ebx, r14d
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x1400507b2
test rbx, rbx
je 0x140050778
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rsp + 0x20]
xor ecx, ecx
mov r9d, 4
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rdx, rax
mov ecx, 0xb
mov rbx, rax
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140050762
test eax, eax
jns 0x1400507d3
test rbx, rbx
je 0x1400507d8
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x1400508d7
test rbx, rbx
jne 0x1400507df
xor eax, eax
jmp 0x1400508d7
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x80], rdi
mov edi, r14d
cmp dword [rbx], r14d
jbe 0x1400508b7
nop dword [rax + rax]
mov eax, edi
xorps xmm0, xmm0
imul rcx, rax, 0x128
movups xmmword [rsp + 0x28], xmm0
movzx edx, word [rcx + rbx + 0x2e]
lea rbp, [rcx + rbx]
add rdx, 0x30
mov qword [rsp + 0x38], r14
add rdx, rcx
mov qword [rsp + 0x40], r14
add rdx, rbx
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r14b
jne 0x140050835
lea rcx, [rsp + 0x28]
call fcn.14002c350
cmp qword [rsi + 0x18], 0xf
mov rdx, rsi
jbe 0x140050855
mov rdx, qword [rsi]
cmp qword [rsp + 0x40], 0xf
lea rcx, [rsp + 0x28]
cmova rcx, qword [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1400508ed
mov rdx, qword [rsp + 0x40]
cmp rdx, 0xf
jbe 0x1400508ad
mov rcx, qword [rsp + 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400508a8
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050936
call fcn.1400509d0
inc edi
cmp edi, dword [rbx]
jb 0x140050800
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rbp, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140050960
add rsp, 0x50
pop r14
pop rsi
pop rbx
ret
mov rdi, qword [rbp + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rsp + 0x40]
cmp rdx, 0xf
jbe 0x140050942
mov rcx, qword [rsp + 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005093d
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005093d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400509d0
mov rax, rdi
jmp 0x1400508ca
Function at 0x140051704
Capabilities:
Parse pe header

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

Function at 0x140051a34
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 0x140051a6e
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x140051a73
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 0x140051abc
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140053900]
cmp byte [rcx + rax], 0
je 0x140051abc
dec r8
sub rdx, 1
jne 0x140051aa2
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400cee70]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400cee80]
mov dword [rax], 1
mov rax, qword [0x1400cee90]
mov dword [rax], 1
mov rax, qword [0x1400cee60]
mov dword [rax], 1
mov rax, qword [0x1400ced00]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x1400cee50]
mov dword [0x1400f800c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400cee10]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400cedf0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400ce100]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067
Function at 0x140001c8e
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
sub rsp, 0x98
lea rbp, [rsp + 0x90]
call sym.isRunningAsAdmin__
xor eax, 1
test al, al
je 0x140001d46
lea rdx, [rbp - 0x70]
mov eax, 0
mov ecx, 0xe
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp - 0x70], 0x70
lea rax, str.runas
mov qword [rbp - 0x60], rax
mov rax, qword [dbg.__p___argv]
call rax
mov rax, qword [rax]
mov rax, qword [rax]
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x68], 0
mov dword [rbp - 0x40], 1
lea rax, [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.SHELL32.dll_ShellExecuteExA]
call rax
test eax, eax
sete al
test al, al
je 0x140001d3c
lea rdx, str.Failed_to_elevate_process_to_admin.
mov rcx, qword [0x1400ce6e0]
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rdx, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rcx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov ecx, 1
call sym.exit
mov ecx, 0
call sym.exit
nop
add rsp, 0x98
pop rdi
pop rbp
ret
Function at 0x14000b670
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x14000b6e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400f80b4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x14000b890
mov rax, qword [0x1400f80b8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000b72c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x14000b7b7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x14000b710
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x14000b8ed
mov rax, qword [0x1400f80b8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400f80b8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000b8d2
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000b7b0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000b840
add dword [0x1400f80b4], 1
cmp ebx, 8
jae 0x14000b7e8
test bl, 4
jne 0x14000b8a0
test ebx, ebx
je 0x14000b7d9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x14000b8c0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x14000b7d9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x14000b81a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1400f80b8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000b7b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor edi, edi
jmp 0x14000b737
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x14000b7d9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x14000b7d9
mov rax, qword [0x1400f80b8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop dword [rax]
Function at 0x14000be00
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x1400f8120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400f8100]
test rbx, rbx
je 0x14000be54
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x14000be4b
test r12, r12
je 0x14000be4b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000be30
lea rcx, [0x1400f8120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x14000c080
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x14000c090
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x14000c0a0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x14000c0e5
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x14000c0dc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x14000c0e7
add rax, 0x28
cmp rax, r9
jne 0x14000c0c8
xor eax, eax
ret

Function at 0x14000c190
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x1400ced00]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x14000c209
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14000c209
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x14000c206
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x14000c1fd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x14000c209
add r8, 0x28
cmp r8, r9
jne 0x14000c1e8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x14000c2f0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x1400ced00]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14000c35f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14000c35f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x14000c35d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000c354
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000c368
add rax, 0x28
cmp rax, r9
jne 0x14000c340
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x14000c380
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x1400ced00]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x14000c3f8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14000c3f8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x14000c3f8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x14000c3f8
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x14000c3ec
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x14000c400
add rdx, 0x28
cmp rdx, r10
jne 0x14000c3d8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x14000c410
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x14000c41e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000c3f5
test r8d, r8d
jg 0x14000c408
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x14000c500
Capabilities:
Allocate thread local storage

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x14000c530
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp dbg.__mingwthr_key_dtor
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x14000c570
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x14000c5b0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000c5c8
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x14000dc10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r14
push r13
push r12
push rdi
sub rsp, 0x238
mov r12, rcx
call sym._errno
mov dword [rax], 0
test r12, r12
je 0x14000dd80
cmp word [r12], 0
je 0x14000dd70
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000dd90
test al, 0x10
je 0x14000dd70
lea r13, [rsp + 0x20]
mov rdx, r12
mov r8d, 0x104
mov rcx, r13
call sym._wfullpath
mov rcx, r13
call sym.wcslen
lea rcx, [0x1400cdb60]
mov r12, rax
call sym.wcslen
lea rcx, [0x1400cdb64]
add r12, rax
call sym.wcslen
lea rcx, [r12 + rax + 0x229]
add rcx, rcx
call sym.malloc
mov r12, rax
test rax, rax
je 0x14000dda3
lea r14, [rax + 0x44c]
mov rdx, r13
mov rcx, r14
call sym.wcscpy
cmp word [r12 + 0x44c], 0
jne 0x14000dd30
lea rdx, [0x1400cdb64]
mov rcx, r14
call sym.wcscat
lea rdx, [r12 + 0x238]
mov ecx, 0x41
xor eax, eax
mov qword [r12 + 0x440], 0xffffffffffffffff
mov rdi, rdx
mov dword [r12 + 0x448], 0
mov qword [r12 + 0x230], 0
rep stosq qword [rdi], rax
mov rax, r12
add rsp, 0x238
pop rdi
pop r12
pop r13
pop r14
ret
mov rcx, r14
call sym.wcslen
cmp word [r12 + rax*2 + 0x44a], 0x2f
je 0x14000dcd1
mov rcx, r14
call sym.wcslen
cmp word [r12 + rax*2 + 0x44a], 0x5c
je 0x14000dcd1
lea rdx, [0x1400cdb60]
mov rcx, r14
call sym.wcscat
jmp 0x14000dcd1
call sym._errno
xor r12d, r12d
mov dword [rax], 0x14
jmp 0x14000dd19
call sym._errno
mov dword [rax], 0xe
jmp 0x14000dd19
call sym._errno
xor r12d, r12d
mov dword [rax], 2
jmp 0x14000dd19
call sym._errno
mov dword [rax], 0xc
jmp 0x14000dd19
Function at 0x14000e310
Capabilities:
Enumerate disk volumes
Get disk information
Get disk size
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov r13d, ecx
mov rbx, rdx
cmp ecx, 0xffffffff
je 0x14000e3c6
test rdx, rdx
js 0x14000e3c6
call sym._get_osfhandle
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14000e560
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x14000e560
mov ecx, r13d
call sym._telli64
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x14000e3c6
lea rdx, [rsp + 0x58]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14000e560
cmp rbx, qword [rsp + 0x58]
ja 0x14000e420
xor r9d, r9d
mov qword [rsp + 0x60], rbx
lea r8, [rsp + 0x64]
mov edx, ebx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14000e3e0
cmp dword [rsp + 0x60], 0xffffffff
je 0x14000e3e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
je 0x14000e528
mov ecx, 0x16
call dbg._set_errno
mov eax, 0xffffffff
jmp 0x14000e403
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x14000e3c6
xor r8d, r8d
mov rdx, r15
mov ecx, r13d
call sym._lseeki64
cmp rax, 0xffffffffffffffff
je 0x14000e3c6
xor eax, eax
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsp + 0x60]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x14000e3c6
mov edx, 2
mov ecx, 0x33
call sym.calloc
mov edx, 2
mov ecx, 0x106
mov r14, rax
call sym.calloc
mov rsi, rax
test r14, r14
je 0x14000e560
test rax, rax
je 0x14000e560
mov edx, 0x32
mov rcx, r14
lea rbp, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
mov rdi, rax
jmp 0x14000e49a
mov r8d, 0x32
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
je 0x14000e540
mov dword [rsp + 0x38], 0
mov r9, rbp
mov rdx, rsi
mov r8d, 0x105
mov qword [rsp + 0x30], 0
mov rcx, r14
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov eax, dword [rsp + 0x4c]
cmp dword [rsp + 0x7c], eax
jne 0x14000e480
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov rcx, rsi
call sym.free
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov rcx, r14
mov esi, eax
call sym.free
test esi, esi
je 0x14000e528
mov rax, rbx
sub rax, qword [rsp + 0x58]
cmp rax, qword [rsp + 0x50]
jbe 0x14000e391
nop word [rax + rax]
mov ecx, 0x1b
call dbg._set_errno
mov eax, 0xffffffff
jmp 0x14000e403
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov rcx, r14
xor r14d, r14d
call sym.free
jmp 0x14000e4e5
mov ecx, 9
call dbg._set_errno
mov eax, 0xffffffff
jmp 0x14000e403
Function at 0x140018140
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov r12, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rbx
test rax, rax
je 0x140018188
mov rcx, r12
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop r12
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rbx
mov qword [0x1400f8ba0], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x14001816f

Function at 0x1400190e0
Capabilities:
Create directory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov r12, rcx
mov rbx, rdx
mov rcx, qword [rcx]
call qword [sym.imp.msvcrt.dll__wmkdir]
test eax, eax
jne 0x140019120
call method.std::_V2.system_category__
mov dword [rbx], 0
mov qword [rbx + 8], rax
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
call qword [sym.imp.msvcrt.dll__errno]
mov esi, dword [rax]
cmp esi, 0x11
je 0x140019148
call method.std::_V2.generic_category__
mov dword [rbx], esi
mov qword [rbx + 8], rax
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
mov rdx, rbx
mov rcx, r12
call method.std::experimental::filesystem::v1.status_std::experimental::filesystem::v1::__cxx11::path_const__std::error_code_
cmp al, 2
jne 0x14001912d
xor eax, eax
jmp 0x14001910f

Function at 0x14001a580
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x14001a5ac
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x14001b230
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x30
cmp byte [0x1400c8f60], 0
jne 0x14001b33a
mov byte [0x1400c8f60], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x14001b310
mov r12, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [r12], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add r12, rax
mov rcx, r12
call sym.__cxa_demangle
mov ecx, 2
mov rbx, qword [dbg.__acrt_iob_func]
mov r13, rax
call rbx
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x14001b301
call rbx
mov rcx, r12
mov rdx, rax
call sym.fputs
mov ecx, 2
call rbx
mov r8d, 2
mov edx, 1
lea rcx, [0x1400c9871]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x14001b2fc
mov rcx, r13
call sym.free
call sym.__cxa_rethrow
call rbx
mov rcx, r13
mov rdx, rax
call sym.fputs
jmp 0x14001b2cb
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
call sym.abort
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
sub rdx, 1
mov rcx, rax
jne 0x14001b3cf
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov r12, rax
call rbx
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rbx
mov rdx, rax
mov rcx, r12
call sym.fputs
mov ecx, 2
call rbx
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x14001b335
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x14001b335

Function at 0x140077060
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
jmp 0x140077087
call rbp
cmp dword [rax], 4
jne 0x1400770a4
mov rcx, rdi
call method.std::__basic_file_char_.fd__
mov r8d, ebx
mov rdx, rsi
mov ecx, eax
call sym.read
movsxd r12, eax
cmp eax, 0xffffffff
je 0x140077080
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140079f40
Capabilities:
Create directory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov r12, rcx
mov rbx, rdx
mov rcx, qword [rcx]
call qword [sym.imp.msvcrt.dll__wmkdir]
test eax, eax
jne 0x140079f80
call method.std::_V2.system_category__
mov dword [rbx], 0
mov qword [rbx + 8], rax
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
call qword [sym.imp.msvcrt.dll__errno]
mov esi, dword [rax]
cmp esi, 0x11
je 0x140079fa8
call method.std::_V2.generic_category__
mov dword [rbx], esi
mov qword [rbx + 8], rax
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
mov rdx, rbx
mov rcx, r12
call method.std::experimental::filesystem::v1.status_std::experimental::filesystem::v1::__cxx11::path_const__std::error_code_
cmp al, 2
jne 0x140079f8d
xor eax, eax
jmp 0x140079f6f