joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400199f8
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14000fca8
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x140019a99
cmp ebx, dword [rsp + 0x30]
je 0x140019a92
test esi, esi
je 0x140019a92
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140019a6d
sub r8w, 0x61
cmp r8w, 0x19
ja 0x140019a7a
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x140019a57
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x140019a7e
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x140019a9b
mov eax, 1
jmp 0x140019a9b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x14001ad30
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14001ad60
xor eax, eax
jmp 0x14001ae23
mov rbp, rbx
cmp word [rax], si
je 0x14001ad85
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14001ad6c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14001ad68
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14001b028
movsxd r14, eax
test eax, eax
jne 0x14001adc3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14001ad59
mov rcx, r14
call fcn.14001072c
mov rdi, rax
test rax, rax
jne 0x14001addc
xor ecx, ecx
call fcn.14000ea5c
jmp 0x14001adb8
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14001b028
test eax, eax
jne 0x14001ae0d
mov rcx, rdi
call fcn.14000ea5c
jmp 0x14001ae17
xor ecx, ecx
call fcn.14000ea5c
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x14001ae40
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14001aec7
mov rsi, rbx
cmp word [rax], bp
je 0x14001ae86
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14001ae70
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14001ae6c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001072c
mov rdi, rax
test rax, rax
je 0x14001aeb4
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140029110
mov rbp, rdi
xor ecx, ecx
call fcn.14000ea5c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140023068
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140013c50
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400230f2
cmp byte [rbp - 0x21], r15b
je 0x1400230ed
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140023128
call fcn.1400119cc
test eax, eax
jne 0x140023114
cmp byte [rbp - 0x21], r15b
je 0x14002310c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140023128
cmp byte [rbp - 0x21], r15b
je 0x140023125
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140014cf0
test eax, eax
jne 0x1400231c8
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140013c50
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140023167
cmp byte [rbp - 0x21], r15b
je 0x14002319c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14002319c
call fcn.1400119cc
test eax, eax
jne 0x140023188
cmp byte [rbp - 0x21], r15b
je 0x140023181
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14002319c
cmp byte [rbp - 0x21], r15b
je 0x140023199
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140014cf0
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400231c8
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400231cb
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400231d9
mov rcx, rdi
call fcn.14000ea5c
cmp byte [rbp + 0x3f], r15b
je 0x1400231e8
mov rcx, qword [rbp + 0x27]
call fcn.14000ea5c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140025780
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400e6eb0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400257d7
cmp word [rdx], r13w
jne 0x1400257d7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400257dc
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140025901
mov r11d, InitCommonControls
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140025922
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140025815
mov rdx, r9
mov word [rbx], cx
jmp 0x14002583c
cmp r9, r8
jae 0x14002584c
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400257f6
jmp 0x140025901
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400258f6
cmp dword [rsp + 0x80], esi
je 0x1400258f6
lea r8, [0x1400e6eb0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400258ce
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14002589e
mov word [rbx], r13w
jmp 0x1400258fe
mov ecx, InitCommonControls
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400258ab
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400258fe
cmp word [rsp + 0x70], r13w
jne 0x1400258db
cmp rbx, r14
je 0x140025898
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140026d14
cmp word [rsp + 0x70], r13w
je 0x140025901
mov ecx, InitCommonControls
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400e6eb0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400258fb
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140025901
Function at 0x140036654
Capabilities:
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
call fcn.1400365e4
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
lea rcx, [0x1400e88e0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400e7540]
jmp 0x140036690
cmp qword [rbx + 0x18], rdi
je 0x140036697
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140036687
jmp 0x1400366b1
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbx + 0x10]
lea rcx, [0x1400e7540]
call fcn.1400606fc
lea rcx, [0x1400e88e0]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400367e8
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub rsp, 0x28
cmp qword [0x1400e7550], 0
jne 0x14003684e
lea rcx, [0x1400e7550]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x14003683a
movabs rax, 0x20c49ba5e353f7cf
lea rcx, [0x1400e7558]
imul qword [0x1400e7550]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x1400e7550], rdx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp qword [0x1400e7550], 0
jne 0x14003684e
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, eax
jmp 0x140036874
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x30]
sub rax, qword [0x1400e7558]
cqo
idiv qword [0x1400e7550]
add rsp, 0x28
ret
Function at 0x140056760
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [rcx], 1
jne 0x140056772
mov rcx, qword [rcx + 8]
test rcx, rcx
jne 0x140061700
mov ecx, edx
jmp 0x140061760
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x140061746
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], 0
jne 0x140061715
mov ecx, eax
call fcn.140061620
sub rax, rbx
nop dword [rax]
movzx ecx, word [rbx]
mov word [rax + rbx], cx
lea rbx, [rbx + 2]
test cx, cx
jne 0x140061730
add rsp, 0x20
pop rbx
ret
mov ecx, edx
add rsp, 0x20
pop rbx
jmp 0x140061760

Function at 0x140056da0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x30
mov ebx, dword [rcx + 0x10]
lea r9, [rax + 8]
mov rdx, qword [rcx + 8]
mov rdi, rcx
mov rcx, qword [rcx]
xor esi, esi
mov r8d, ebx
mov qword [rax - 0x18], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsp + 0x40], ebx
mov rbx, qword [rsp + 0x48]
mov dword [rdi + 0x10], esi
sete sil
mov eax, esi
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x140058a30
Capabilities:
Get thread local storage value

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x30
mov r14d, r9d
mov rsi, r8
mov rbx, rcx
test r8, r8
je 0x140058b2f
cmp word [r8], 0
je 0x140058b2f
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x28], r13
xor r13d, r13d
test edx, edx
mov qword [rsp + 0x20], r15
mov eax, r13d
cmovns eax, edx
test rcx, rcx
je 0x140058aa9
cmp word [rcx], r13w
je 0x140058aa9
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp word [rcx + rdi*2], r13w
jne 0x140058a90
cmp edi, eax
mov ebp, r13d
cmovg edi, eax
sub eax, edi
cmovns ebp, eax
jmp 0x140058aae
mov edi, r13d
mov ebp, eax
call fcn.140061790
movzx r12d, word [rsi]
lea ecx, [rdi + rbp]
mov edx, r14d
mov r15d, eax
call fcn.140061620
mov rsi, rax
test r15d, r15d
je 0x140058ad8
mov ecx, r15d
call fcn.1400617d0
mov rbx, rax
mov r15, qword [rsp + 0x20]
test edi, edi
movsxd rax, edi
lea rdi, [rax + rax]
jle 0x140058af6
mov r8, rdi
mov rdx, rbx
mov rcx, rsi
call fcn.140029110
add rsi, rdi
test ebp, ebp
je 0x140058b0e
mov rdi, rsi
mov edx, ebp
mov rax, r12
mov ecx, ebp
rep stosw word [rdi], ax
lea rsi, [rsi + rdx*2]
mov r12, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x50]
mov word [rsi], r13w
mov r13, qword [rsp + 0x28]
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
mov ecx, r14d
add rsp, 0x30
pop r14
pop rsi
pop rbx
jmp 0x140061760
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x1400e4754]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edx, edx
mov qword [rax + 0x10], rbx
mov rax, qword [rax]
mov word [rbx + rax], dx
add rsp, 0x20
pop rbx
ret
Function at 0x140058b90
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov esi, 0x40
mov ecx, esi
call fcn.140061620
mov rdx, rbx
mov rcx, rax
mov rdi, rax
call fcn.140061a10
mov rdx, 0xffffffffffffffff
inc rdx
cmp word [rdi + rdx*2], 0
jne 0x140058bc3
sub esi, edx
mov ecx, esi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.1400616d0

Function at 0x140058bf0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x30
mov ebp, r9d
mov rbx, rcx
test r8, r8
je 0x140058ce9
movzx r12d, word [r8]
test r12w, r12w
je 0x140058ce9
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], r13
xor r13d, r13d
test edx, edx
mov qword [rsp + 0x28], r14
mov eax, r13d
mov qword [rsp + 0x20], r15
cmovns eax, edx
test rcx, rcx
je 0x140058c69
cmp word [rcx], r13w
je 0x140058c69
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp word [rcx + rdi*2], r13w
jne 0x140058c50
cmp edi, eax
mov esi, r13d
cmovg edi, eax
sub eax, edi
cmovns esi, eax
jmp 0x140058c6e
mov edi, r13d
mov esi, eax
call fcn.140061790
lea ecx, [rdi + rsi]
mov edx, ebp
mov r15d, eax
call fcn.140061620
mov r14, rax
test r15d, r15d
je 0x140058c93
mov ecx, r15d
call fcn.1400617d0
mov rbx, rax
movsxd r15, edi
test edi, edi
je 0x140058cad
movsxd rcx, esi
lea r8, [r15 + r15]
mov rdx, rbx
lea rcx, [r14 + rcx*2]
call fcn.140029110
test esi, esi
je 0x140058cc2
mov rdi, r14
mov edx, esi
mov rax, r12
mov ecx, esi
rep stosw word [rdi], ax
lea r14, [r14 + rdx*2]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov word [r14 + r15*2], r13w
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
mov r13, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rbp
pop rbx
ret
mov ecx, ebp
add rsp, 0x30
pop r12
pop rbp
pop rbx
jmp 0x140061760

Function at 0x140059780
Capabilities:
Get thread local storage value

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov esi, edx
mov rbx, rcx
test rcx, rcx
je 0x140059852
mov qword [rsp + 0x40], rbp
mov rcx, 0xffffffffffffffff
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], r15
nop
inc rcx
cmp word [rbx + rcx*2], 0
jne 0x1400597b0
mov eax, 1
xor r15d, r15d
sub eax, esi
mov ebp, r15d
add ecx, eax
cmovns ebp, ecx
mov rcx, rbx
call fcn.140061790
mov edx, edi
mov ecx, ebp
mov r14d, eax
call fcn.140061620
mov rdi, rax
test r14d, r14d
je 0x1400597f3
mov ecx, r14d
call fcn.1400617d0
mov rbx, rax
mov r14, qword [rsp + 0x48]
mov ecx, ebp
test rbx, rbx
je 0x140059837
cmp esi, 1
jle 0x140059815
cmp word [rbx], r15w
je 0x140059815
add rbx, 2
dec esi
cmp esi, 1
jg 0x140059804
movzx eax, word [rbx]
test ax, ax
je 0x140059837
sub rbx, rdi
test ecx, ecx
je 0x140059837
mov word [rdi], ax
dec ecx
movzx eax, word [rbx + rdi + 2]
add rdi, 2
test ax, ax
jne 0x140059820
call fcn.1400616d0
mov rbp, qword [rsp + 0x40]
mov word [rdi], r15w
mov r15, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbx
ret
mov ecx, edi
add rsp, 0x20
pop rdi
pop rsi
pop rbx
jmp 0x140061760
Function at 0x140059af0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x28
xor ebp, ebp
mov r13d, r9d
mov r15d, edx
mov r12d, ebp
cmp edx, 1
jl 0x140059c5b
test rcx, rcx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
mov edi, ebp
mov qword [rsp + 0x20], r14
lea r14, [0x1400ad080]
mov rsi, r14
cmovne rsi, rcx
test r8, r8
cmovne r14, r8
movzx ecx, word [r14]
test cx, cx
je 0x140059bea
cmp word [r14 + 2], di
je 0x140059bea
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [r14 + rax*2], di
jne 0x140059b60
mov rbx, rsi
movsxd rbp, eax
mov r8, rbp
mov rdx, r14
mov rcx, rbx
call fcn.14001a8a0
test eax, eax
je 0x140059b8e
cmp word [rbx], r12w
je 0x140059b8e
add rbx, 2
jmp 0x140059b70
inc edi
cmp edi, r15d
je 0x140059ba4
cmp word [rbx], r12w
je 0x140059bad
lea rbx, [rbx + rbp*2]
mov rsi, rbx
jmp 0x140059b70
mov r12, rbx
sub r12, rsi
sar r12, 1
xor ebp, ebp
mov rcx, rbx
call fcn.140061790
mov r14, qword [rsp + 0x20]
movsxd rbx, r12d
test eax, eax
je 0x140059c20
mov ecx, r13d
call fcn.140061840
lea r8, [rbx + rbx]
mov rdx, rsi
mov rcx, rax
call fcn.140029110
mov edx, r13d
mov ecx, r12d
call fcn.140061620
mov rdi, rax
jmp 0x140059c3c
mov rbx, rsi
nop dword [rax]
movzx eax, word [rbx]
cmp ax, cx
je 0x140059c03
test ax, ax
je 0x140059c03
add rbx, 2
jmp 0x140059bf0
inc edi
cmp edi, r15d
je 0x140059c15
test ax, ax
je 0x140059baf
lea rsi, [rbx + 2]
jmp 0x140059bea
mov r12, rbx
sub r12, rsi
sar r12, 1
jmp 0x140059baf
mov edx, r13d
mov ecx, r12d
call fcn.140061620
mov r8, rbx
mov rdx, rsi
mov rcx, rax
mov rdi, rax
call fcn.140084498
mov rsi, qword [rsp + 0x58]
mov word [rdi + rbx*2], bp
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret
mov ecx, r13d
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
jmp 0x140061760
Function at 0x14005af58
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1400e3aa8]
xor rax, rsp
mov qword [rbp + 0x380], rax
or rbx, 0xffffffffffffffff
xor edi, edi
test rcx, rcx
je 0x14005b0e9
cmp word [rcx], di
je 0x14005b0e9
mov rdx, rcx
mov r8d, 0x104
lea rcx, [rbp + 0x170]
call fcn.140084498
lea rcx, [rbp + 0x170]
mov word [rbp + 0x378], di
call fcn.140018e28
mov rdx, rax
cdqe
lea rcx, [rbp + rax*2 + 0x16e]
lea eax, [rdx - 2]
cmp eax, 1
ja 0x14005b01c
cmp word [rbp + 0x172], 0x3a
jne 0x14005b01c
cmp edx, 2
jne 0x14005affa
lea rdx, [0x1400a95a8]
lea rcx, [rbp + 0x170]
call fcn.1400950dc
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x14005b0e9
mov rbx, 0xfffffffffffffffe
jmp 0x14005b0e9
cmp word [rcx], 0x5c
je 0x14005b028
cmp word [rcx], 0x2f
jne 0x14005b031
mov word [rcx], di
sub rcx, 2
jmp 0x14005b01c
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rcx, rax
cmp rax, rbx
je 0x14005b072
test byte [rsp + 0x20], 0x10
je 0x14005b05b
mov rbx, 0xfffffffffffffffe
jmp 0x14005b06a
mov ebx, dword [rsp + 0x3c]
mov eax, dword [rsp + 0x40]
shl rbx, 0x20
or rbx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14005b0e9
movzx ecx, word [rbp + 0x170]
movzx eax, word [rbp + 0x172]
cmp cx, 0x5c
jne 0x14005b08b
cmp ax, cx
je 0x14005b0a1
cmp cx, 0x2f
jne 0x14005b096
cmp ax, cx
je 0x14005b0a1
cmp cx, 0x2e
jne 0x14005b0e9
cmp ax, cx
jne 0x14005b0e9
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14005b0c8
not eax
mov rbx, 0xfffffffffffffffe
shr rax, 4
and eax, 1
or rbx, rax
jmp 0x14005b0e9
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov rcx, rbx
mov rbx, 0xfffffffffffffffe
cmp eax, 1
cmova rcx, rbx
mov rbx, rcx
mov rax, rbx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140062750
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret

Function at 0x14005b1d4
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edx, ecx
mov edi, 0x104
mov ecx, edi
call fcn.140061620
mov rdx, rax
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor ebp, ebp
movsxd rbx, eax
test eax, eax
je 0x14005b223
lea edx, [rbx - 1]
movsxd r8, edx
lea eax, [rbp + 0x5c]
cmp word [rsi + r8*2], ax
je 0x14005b223
mov word [rsi + rbx*2], ax
inc ebx
sub edi, ebx
mov ecx, edi
call fcn.1400616d0
movsxd rax, ebx
mov rbx, qword [rsp + 0x30]
mov word [rsi + rax*2], bp
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x14005b264
Capabilities:
Set current directory

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x14005b277
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cdqe
jmp 0x14005b279
xor eax, eax
add rsp, 0x28
ret
Function at 0x14005ba00
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
mov edi, r8d
mov dword [rsp + 0x48], ebx
mov rsi, rdx
test rdx, rdx
je 0x14005ba78
test r8d, r8d
je 0x14005ba78
mov rdx, rcx
mov rcx, qword [0x1400e8c20]
call fcn.14005fcbc
test rax, rax
je 0x14005ba74
mov r8d, edi
mov rdx, rsi
cmp qword [rax + 8], rbx
je 0x14005ba61
mov rcx, rax
call fcn.14005bca0
mov ebx, eax
cdqe
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x14005ba90
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x30
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
mov rcx, qword [0x1400e8c20]
jne 0x14005bab0
add rsp, 0x30
pop rdi
jmp fcn.14005fef8
mov rdx, rdi
mov qword [rsp + 0x48], rbx
call fcn.14005fcbc
mov rbx, rax
test rax, rax
je 0x14005bb25
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x14005bb0d
xor eax, eax
mov dword [rsp + 0x40], eax
cmp dword [rbx + 0x1c], eax
jne 0x14005bafa
mov r8d, dword [rbx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rbx + 0x14]
mov rcx, qword [rbx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
mov r8, qword [rbx + 8]
xor edx, edx
mov rcx, qword [0x1400e5fb0]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400e8c20]
mov rdx, rdi
call fcn.14005fc50
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x14005bb30
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
xor eax, eax
mov rbx, rcx
mov dword [rsp + 0x40], eax
cmp dword [rcx + 0x1c], eax
jne 0x14005bb74
mov r8d, dword [rcx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rdx, qword [rcx + 8]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
movsxd rax, dword [rsp + 0x40]
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret

Function at 0x14005bbc0
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov rdx, rcx
mov rcx, qword [0x1400e8c20]
call fcn.14005fcbc
mov rbx, rax
test rax, rax
je 0x14005bc13
cmp qword [rax + 8], 0
je 0x14005bbf2
cmp dword [rax + 0x1c], 0
jne 0x14005bbf2
mov rcx, rax
call fcn.14005bb30
mov rcx, qword [rbx]
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [rsp + 0x38]
shl rcx, 0x20
mov eax, eax
or rax, rcx
add rsp, 0x20
pop rbx
ret
mov rax, 0xffffffffffffffff
add rsp, 0x20
pop rbx
ret