Function at 0x140021c78
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1b8]
sub rsp, 0x280
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x1400c5a08]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov qword [rsp + 0x50], r8
mov r13, rdx
xor r12d, r12d
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov esi, r12d
mov qword [rsp + 0x30], r12
mov r14d, r12d
mov r15d, r12d
mov qword [rsp + 0x38], r12
mov ebx, r12d
mov qword [rsp + 0x20], rbx
mov edi, r12d
test rdx, rdx
jne 0x140021cfb
mov ecx, 0x80070057
mov edi, ecx
call fcn.140025d30
jmp 0x140021fb1
test r8, r8
je 0x140021cea
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x60]
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
nop dword [rax + rax]
test eax, eax
jne 0x140021d55
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x140021d43
mov edi, 0x80004005
jmp 0x140021d51
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov ecx, edi
jmp 0x140021cf1
lea r12, [rsp + 0x60]
xor eax, eax
cmp word [rsp + 0x60], ax
je 0x140021f35
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
nop dword [rax + rax]
add eax, 0xfffffffe
cmp eax, 1
ja 0x140021f0e
xor esi, esi
test rbx, rbx
je 0x140021db6
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [rbx - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x20]
lea rdx, str._Windows.LS
mov rcx, r12
call fcn.140024234
mov edi, eax
test eax, eax
js 0x140022059
mov rbx, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
mov esi, eax
cmp eax, 0xffffffff
je 0x140021df7
shr esi, 4
and esi, 1
jmp 0x140021dfb
xor eax, eax
mov esi, eax
xor ecx, ecx
call fcn.140025d50
xor ecx, ecx
call fcn.140025d50
xor ecx, ecx
mov edi, ecx
test esi, esi
je 0x140021f10
mov esi, ecx
mov rcx, rbx
call fcn.14002e5f8
test eax, eax
jne 0x140021e3d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.1400250dc
mov edi, eax
test eax, eax
js 0x140022059
movsxd rbx, r14d
test r14d, r14d
jns 0x140021e69
mov esi, 0x8000ffff
mov edi, esi
mov ecx, esi
jmp 0x140021e7e
lea r8, [rsp + 0x28]
mov ecx, r14d
call fcn.14002a2fc
mov edi, eax
test eax, eax
jns 0x140021e85
mov ecx, eax
call fcn.140025d30
jmp 0x140021ef6
mov edx, dword [rsp + 0x28]
lea rcx, [rsp + 0x30]
call fcn.140029acc
mov edi, eax
xor eax, eax
test edi, edi
jns 0x140021eae
mov ecx, edi
call fcn.140025d30
mov r15, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x34]
jmp 0x140021ef6
mov r15, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x34]
cmp ebx, r14d
jge 0x140021ee3
test r15, r15
je 0x140021ec5
mov rax, r15
mov rdi, rbx
lea rdx, [rax + rbx*4]
mov eax, r14d
sub eax, ebx
movsxd r8, eax
shl r8, 2
lea rcx, [rdx + 4]
call sub.msvcrt.dll_memmove
jmp 0x140021ee6
mov rdi, rbx
xor eax, eax
mov dword [r15 + rdi*4], esi
inc r14d
mov dword [rsp + 0x34], r14d
mov edi, eax
mov ecx, edi
call fcn.140025d50
xor ecx, ecx
test edi, edi
js 0x140022055
mov rbx, qword [rsp + 0x20]
jmp 0x140021f10
xor ecx, ecx
or rax, 0xffffffffffffffff
inc rax
cmp word [r12 + rax*2], cx
jne 0x140021f14
lea r12, [r12 + rax*2]
add r12, 2
cmp word [r12], cx
jne 0x140021d67
mov esi, dword [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.140024fe0
mov rcx, qword [rsp + 0x50]
mov r13d, dword [rcx]
mov eax, dword [rcx + 4]
mov dword [rsp + 0x28], eax
mov r12, qword [rcx + 8]
xor edx, edx
mov qword [rcx + 8], rdx
mov dword [rcx], esi
mov dword [rcx + 4], r14d
mov rsi, qword [rcx + 8]
test rsi, rsi
je 0x140021f95
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov eax, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x50]
xor edx, edx
mov qword [rcx + 8], r15
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x34], eax
mov rax, rdx
test r12, r12
cmovne rax, r12
mov qword [rsp + 0x38], rax
mov ecx, edi
call fcn.140025d50
nop
test rbx, rbx
je 0x140021fe7
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [rbx - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
nop
lea rcx, [rsp + 0x30]
call fcn.140022618
nop
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.140027c4c
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x140022028
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov eax, edi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.140094220
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, edi
jmp 0x14002205b
mov ecx, eax
call fcn.140025d30
mov rbx, qword [rsp + 0x20]
jmp 0x140021fb1