Function at 0x140008720
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
sub rsp, 0x80
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov rdi, rcx
xor esi, esi
mov dword [rsp + 0xa8], esi
mov rcx, qword [rcx]
mov eax, dword [rcx - 0x10]
test eax, eax
je 0x140008b80
test eax, eax
je 0x140008b7b
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140008b7b
test al, 0x10
je 0x140008b7b
mov rdi, qword [rdi]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], 0
jl 0x140008798
cmp rax, qword [rdi - 0x18]
jne 0x140008798
lea rbx, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x1400087d5
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x1400087b3
call fcn.140003050
mov eax, dword [rdi - 0x10]
mov dword [rbx + 8], eax
mov eax, dword [rdi - 0x10]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.1400525a0
add rbx, 0x18
mov qword [rsp + 0xb8], rbx
mov edx, dword [rbx - 0x10]
mov dword [rsp + 0xb0], edx
lea eax, [rdx - 1]
test eax, eax
js 0x140008b65
cmp eax, edx
jg 0x140008b65
cdqe
cmp word [rbx + rax*2], 0x5c
je 0x1400088c0
xor eax, eax
or rcx, 0xffffffffffffffff
lea r8, [0x14007e0bc]
mov rdi, r8
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov r9, rcx
mov qword [rsp + 0x28], rcx
mov rcx, r8
sub rcx, rbx
sar rcx, 1
mov qword [rsp + 0x20], rcx
lea edi, [rdx + r9]
mov edx, 1
sub edx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, edx
jge 0x140008878
mov edx, edi
lea rcx, [rsp + 0xb8]
call fcn.140003380
mov rbx, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x20]
lea r8, [0x14007e0bc]
mov r9, qword [rsp + 0x28]
mov eax, dword [rsp + 0xb0]
cmp rcx, rax
ja 0x140008888
lea r8, [rbx + rcx*2]
movsxd rdx, r9d
add rdx, rdx
lea rcx, [rbx + rax*2]
mov r9, rdx
call fcn.1400525a0
test edi, edi
js 0x1400088b6
cmp edi, dword [rbx - 0xc]
jg 0x1400088b6
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], 0
mov edx, 1
jmp 0x1400088c5
mov ecx, 0x80070057
call fcn.140003280
mov edx, 1
xor eax, eax
or rcx, 0xffffffffffffffff
lea r8, [0x14007e478]
mov rdi, r8
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov r9, rcx
mov qword [rsp + 0x20], rcx
mov rcx, r8
sub rcx, rbx
sar rcx, 1
mov qword [rsp + 0x28], rcx
mov eax, dword [rbx - 0x10]
mov dword [rsp + 0xb0], eax
lea edi, [rax + r9]
sub edx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, edx
jge 0x140008937
mov edx, edi
lea rcx, [rsp + 0xb8]
call fcn.140003380
mov rbx, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x28]
lea r8, [0x14007e478]
mov r9, qword [rsp + 0x20]
mov eax, dword [rsp + 0xb0]
cmp rcx, rax
ja 0x140008947
lea r8, [rbx + rcx*2]
movsxd rdx, r9d
add rdx, rdx
lea rcx, [rbx + rax*2]
mov r9, rdx
call fcn.1400525a0
test edi, edi
js 0x140008b5b
cmp edi, dword [rbx - 0xc]
jg 0x140008b5b
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], 0
lea rcx, [rsp + 0x48]
call fcn.140028abc
nop
xor r8d, r8d
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.140028bdc
mov edi, eax
cmp edi, 1
jne 0x140008ae1
lea rcx, [rsp + 0x48]
call fcn.1400287ec
mov edi, eax
mov dword [rsp + 0xb0], eax
lea rcx, [rsp + 0x48]
call fcn.140028a68
cmp eax, 1
je 0x140008993
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rcx, [rsp + 0x48]
mov rax, qword [rsp + 0x48]
call qword [rax + 0x70]
test eax, eax
jne 0x140008a7d
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x48]
call fcn.1400290c4
mov rdi, rax
mov rcx, qword [rax]
cmp dword [rcx - 0x10], 0
je 0x140008a10
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140008a10
test al, 1
je 0x140008a10
and eax, 0xfffffffe
mov edx, eax
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or rdi, 0xffffffffffffffff
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x140008a33
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x48]
call fcn.1400290c4
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
mov dword [rsp + 0xa8], eax
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov ecx, edi
lock xadd dword [rdx + 0x10], ecx
add ecx, 0xffffffff
test ecx, ecx
jg 0x140008ac1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edi, dword [rsp + 0xb0]
jmp 0x140008ac8
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x48]
call fcn.1400290c4
nop
mov rcx, rax
call fcn.140008720
mov esi, eax
mov dword [rsp + 0xa8], eax
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140008ac8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140008ac8
mov edi, dword [rsp + 0xb0]
test esi, esi
je 0x140008ad9
mov rbx, qword [rsp + 0xb8]
jmp 0x140008993
mov rbx, qword [rsp + 0xb8]
lea rcx, [rsp + 0x48]
call fcn.140028718
mov rdi, qword [rsp + 0xa0]
mov rcx, qword [rdi]
cmp dword [rcx - 0x10], 0
je 0x140008b19
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140008b19
test al, 1
je 0x140008b19
and eax, 0xfffffffe
mov edx, eax
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp esi, 1
jne 0x140008b30
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
mov dword [rsp + 0xa8], eax
lea rcx, [rsp + 0x48]
call fcn.140028b14
nop
lea rdx, [rbx - 0x18]
or rax, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140008b59
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
jmp 0x140008b77
mov ecx, 0x80070057
call fcn.140003280
mov ecx, 0x80070057
call fcn.140003280
nop
mov esi, dword [rsp + 0xa8]
mov eax, esi
jmp 0x140008b80
mov eax, 1
add rsp, 0x80
pop rdi
pop rsi
pop rbx
ret