Function at 0x140066620
Capabilities:
Check if file exists
Delete directory
Delete file
Get disk information

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
movsxd rsi, edx
mov rdi, rcx
xor r15b, r15b
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x80], rbx
mov rax, qword [rdi + 0xb0]
sub rax, qword [rdi + 0xa8]
sar rax, 6
or r12d, 0xffffffff
cmp eax, esi
jl 0x14006698d
mov rcx, rsi
shl rcx, 6
mov rax, qword [rdi + 0xa8]
mov r13, qword [rcx + rax + 0x28]
lea rcx, [r13 - 0x18]
lea rdi, [rbx - 0x18]
xor r14d, r14d
lea ebp, [r12 + 2]
cmp rcx, rdi
je 0x1400667f5
cmp dword [rdi + 0x10], r14d
jl 0x1400666e8
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400666e8
call fcn.140001b90
mov rbx, rax
mov ecx, r12d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400666df
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [r8 + 8]
add rbx, 0x18
jmp 0x1400667ed
movsxd rsi, dword [r13 - 0x10]
test esi, esi
jne 0x14006674d
mov rsi, qword [rdi]
cmp dword [rdi + 8], r14d
je 0x1400667f5
cmp dword [rdi + 0x10], r14d
jge 0x140066721
cmp dword [rbx - 0xc], r14d
jge 0x140066714
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rbx - 0x10], r14d
mov word [rbx], r14w
jmp 0x1400667f5
mov eax, r12d
lock xadd dword [rdi + 0x10], eax
dec eax
test eax, eax
jg 0x14006673b
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
jmp 0x1400667ed
test r13, r13
jne 0x14006675d
mov ecx, 0x80070057
call fcn.140001000
int3
mov r14d, dword [rbx - 0x10]
mov rbp, r13
sub rbp, rbx
sar rbp, 1
test esi, esi
jns 0x140066779
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, 1
sub ecx, dword [rdi + 0x10]
mov eax, dword [rdi + 0xc]
sub eax, esi
or eax, ecx
jge 0x1400667a1
mov edx, esi
lea rcx, [rsp + 0x80]
call fcn.140001c20
mov rbx, qword [rsp + 0x80]
lea rdi, [rsi + rsi]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
mov r9, rdi
add rdx, rdx
cmp rbp, r14
ja 0x1400667c3
lea r8, [rbx + rbp*2]
call qword [sym.imp.MSVCR100.dll_memmove_s]
jmp 0x1400667cc
mov r8, r13
call qword [sym.imp.MSVCR100.dll_memcpy_s]
cmp esi, dword [rbx - 0xc]
jg 0x1400667e2
mov dword [rbx - 0x10], esi
xor r14d, r14d
mov word [rdi + rbx], r14w
lea ebp, [r14 + 1]
jmp 0x1400667f5
mov ecx, 0x80070057
call fcn.140001000
int3
mov qword [rsp + 0x80], rbx
mov rsi, rbx
mov rdi, r14
cmp word [rbx], 0
je 0x140066883
movzx ecx, word [rsi]
call qword [sym.imp.MSVCR100.dll_iswspace]
test eax, eax
je 0x14006681c
test rdi, rdi
jne 0x14006681f
mov rdi, rsi
jmp 0x14006681f
mov rdi, r14
add rsi, 2
cmp word [rsi], 0
jne 0x140066805
test rdi, rdi
je 0x140066883
sub rdi, rbx
sar rdi, 1
test edi, edi
jns 0x140066843
mov ecx, 0x80070057
call fcn.140001000
int3
sub ebp, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ebp
jge 0x140066866
mov edx, edi
lea rcx, [rsp + 0x80]
call fcn.140001c20
mov rbx, qword [rsp + 0x80]
cmp edi, dword [rbx - 0xc]
jg 0x140066878
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], r14w
jmp 0x140066883
mov ecx, 0x80070057
call fcn.140001000
int3
lea rcx, [rsp + 0x80]
call fcn.140002140
mov rbx, qword [rsp + 0x80]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14006698d
mov r8d, 3
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x80]
call fcn.140001d30
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov edi, eax
mov rdx, qword [rsp + 0x88]
add rdx, 0xffffffffffffffe8
mov ecx, r12d
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400668f3
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov rbx, qword [rsp + 0x80]
cmp edi, 2
je 0x14006698a
cmp edi, 5
je 0x14006698a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x14006698a
mov edx, 0x5c
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_wcsrchr]
test rax, rax
jne 0x140066932
mov eax, r12d
jmp 0x140066938
sub rax, rbx
sar rax, 1
mov r8d, eax
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x80]
call fcn.140001d30
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ebx, eax
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
mov ecx, r12d
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140066979
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
test ebx, ebx
mov rbx, qword [rsp + 0x80]
je 0x14006698d
mov r15b, 1
jmp 0x14006698d
xor r15b, r15b
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x1400669a9
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
movzx eax, r15b
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret