Function at 0x140008cf0
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x1f8]
sub rsp, 0x2d0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14004e748]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov r12, rdx
mov r14, rcx
mov qword [rbp - 0x60], 7
xor ebx, ebx
mov qword [rbp - 0x68], rbx
mov word [rbp - 0x78], bx
lea rsi, [rcx + 8]
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rsi
lea rcx, [rbp - 0x78]
call fcn.140001bb0
nop
mov word [r14 + 0x28], bx
xor dil, dil
mov rdx, r12
lea rcx, [rsp + 0x48]
call fcn.140001370
nop
cmp qword [rsp + 0x58], 0x104
jae 0x140008f91
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140008e33
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [rbx + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140008f91
mov rdx, r12
mov rcx, r14
call fcn.140008bf0
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r14], r15
lea r9d, [rbx + 2]
xor r8d, r8d
mov edx, ebx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea rax, [rsp + 0x48]
cmp rsi, rax
je 0x140008e2b
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140001bb0
mov dil, 1
jmp 0x140008f91
mov qword [rbp - 0x80], 7
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x68], bx
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
test eax, eax
jne 0x140008ed9
lea r8, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae r8, qword [rsp + 0x48]
mov edx, 0x104
lea rcx, [rbp - 0x50]
call fcn.140019940
lea rcx, [rbp - 0x50]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea rcx, [rbp - 0x50]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x140008ed9
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
jne 0x140008ed9
cmp word [rbp - 0x50], ax
jne 0x140008eb2
mov r8, rbx
jmp 0x140008ecb
lea rax, [rbp - 0x50]
or r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140008ec0
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x68]
call fcn.140001750
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140008f60
mov byte [r14 + 0x28], 1
lea rax, [rsp + 0x48]
cmp rsi, rax
je 0x140008f3d
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140001bb0
mov dil, 1
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [rsp + 0x78], 0
je 0x140008f7f
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], 8
cmovae rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
nop
cmp qword [rbp - 0x80], 8
jb 0x140008f91
mov rcx, qword [rsp + 0x68]
call fcn.140018320
nop
cmp qword [rsp + 0x60], 8
jb 0x140008fa3
mov rcx, qword [rsp + 0x48]
call fcn.140018320
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], rbx
mov word [rsp + 0x48], bx
cmp qword [rbp - 0x60], 8
jb 0x140008fc6
mov rcx, qword [rbp - 0x78]
call fcn.140018320
movzx eax, dil
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.140017c70
lea r11, [rsp + 0x2d0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret