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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x128
movaps xmmword [rsp + 0x110], xmm6
mov r14d, edx
mov r15, rcx
mov rax, qword [0x14016c028]
xor rax, rsp
mov qword [rsp + 0x108], rax
lea rax, str.DeleteFile.Recursive
lea r12, str.DeleteFile.NonRecursive
test dl, dl
cmovne r12, rax
mov eax, edx
xor al, 1
movzx r13d, al
movaps xmm6, xmmword [0x140146a10]
lea rbx, [rsp + 0x20]
movaps xmmword [rbx + 0x40], xmm6
movaps xmmword [rbx + 0x30], xmm6
movaps xmmword [rbx + 0x20], xmm6
movaps xmmword [rbx + 0x10], xmm6
movaps xmmword [rbx], xmm6
lea rdx, str.DeleteFileAndRecordMetrics
lea rbp, str..._.._base_files_file_util_win.cc
lea rsi, [rsp + 0xb0]
mov rcx, rsi
mov r8, rbp
mov r9d, 0x18b
call fcn.140003270
xor edi, edi
mov rcx, rbx
mov rdx, rsi
xor r8d, r8d
call fcn.140014670
movaps xmmword [rsi + 0x40], xmm6
movaps xmmword [rsi + 0x30], xmm6
movaps xmmword [rsi + 0x20], xmm6
movaps xmmword [rsi + 0x10], xmm6
movaps xmmword [rsi], xmm6
lea rdx, str.DoDeleteFile
lea rsi, [rsp + 0x90]
mov rcx, rsi
mov r8, rbp
mov r9d, 0x150
call fcn.140003270
lea rcx, [rsp + 0xb0]
mov rdx, rsi
xor r8d, r8d
call fcn.140014670
movzx eax, byte [r15 + 0x17]
test al, al
jns 0x140018478
mov rax, qword [r15 + 8]
test rax, rax
je 0x14001853b
cmp rax, 0x103
ja 0x140018768
mov rcx, r15
mov rdx, rsi
call fcn.140024e20
movzx eax, byte [rsp + 0xa7]
test al, al
mov rdx, rax
cmovs rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
cmovs rsi, rcx
test rdx, rdx
je 0x140018772
lea rbp, [rsi + rdx*2]
add rdx, rdx
mov rbx, rsi
movzx edi, word [rbx]
cmp di, 0x3f
je 0x1400184e9
cmp di, 0x2a
je 0x1400184e9
add rbx, 2
add rdx, 0xfffffffffffffffe
jne 0x1400184cd
mov rbx, rbp
cmp rbx, rbp
sete dl
sub rbx, rsi
cmp rbx, 0xfffffffffffffffe
sete bl
or bl, dl
test al, al
jns 0x140018504
call fcn.14010b880
test bl, bl
je 0x140018784
cmp byte [r15 + 0x17], 0
mov rcx, r15
jns 0x140018519
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14001861e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
and ecx, 0xfffffffe
xor edi, edi
cmp ecx, 2
cmovne edi, eax
lea r13, [r13 + r13*2 + 0x14]
lea r14, [rsp + 0xb0]
mov rcx, r14
call fcn.14000a640
xor ebp, ebp
test edi, edi
jne 0x1400186b1
movabs rbx, 0xaaaaaaaaaaaaaaaa
lea rsi, [rsp + 0x90]
mov qword [rsi + 0x10], rbx
movaps xmmword [rsi], xmm6
lea rax, str.Windows.PostOperationState.
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], 0x1b
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xc8], r13
lea rdx, [rsp + 0x78]
mov qword [rdx], 2
mov qword [rdx + 8], r14
mov rcx, rsi
call fcn.1400189b0
mov rcx, rsi
mov edx, ebp
mov r8d, 8
call fcn.140018850
cmp byte [rsi + 0x17], 0
jns 0x1400185d9
mov rcx, qword [rsp + 0x90]
call fcn.14010b880
test edi, edi
jne 0x1400186ec
test edi, edi
sete bl
lea rcx, [rsp + 0x20]
call fcn.14000a640
mov rcx, qword [rsp + 0x108]
xor rcx, rsp
call fcn.14010e4a0
mov eax, ebx
movaps xmm6, xmmword [rsp + 0x110]
add rsp, 0x128
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov edi, eax
test dil, 1
jne 0x1400187e7
test dil, 0x10
jne 0x140018655
cmp byte [r15 + 0x17], 0
mov rcx, r15
jns 0x14001863d
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, 0
test eax, eax
jne 0x14001853b
jmp 0x140018528
test r14b, r14b
je 0x14001869c
xorps xmm0, xmm0
lea rsi, [rsp + 0x90]
movaps xmmword [rsi], xmm0
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x17], 1
mov dword [rsi], 0x2a
mov rcx, r15
mov rdx, rsi
mov r8b, 1
call fcn.140018ee0
mov edi, eax
cmp byte [rsi + 0x17], 0
js 0x14001880c
test edi, edi
jne 0x14001853b
cmp byte [r15 + 0x17], 0
mov rcx, r15
jns 0x1400186a9
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x140018643
cmp byte [r15 + 0x17], 0
mov rcx, r15
jns 0x1400186be
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001881e
test al, 0x10
je 0x140018846
mov rcx, r15
call fcn.140018df0
movzx eax, al
mov ebp, 6
sub ebp, eax
jmp 0x14001855a
lea rsi, [rsp + 0x90]
mov qword [rsi + 0x10], rbx
movaps xmmword [rsi], xmm6
lea rax, str.Windows.FilesystemError.
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], 0x18
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xc8], r13
lea rdx, [rsp + 0x78]
mov qword [rdx], 2
mov qword [rdx + 8], r14
mov rcx, rsi
call fcn.1400189b0
mov rcx, rsi
mov edx, edi
call fcn.140018dc0
cmp byte [rsi + 0x17], 0
jns 0x14001875b
mov rcx, qword [rsp + 0x90]
call fcn.14010b880
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400185e1
mov edi, 0xa1
jmp 0x14001853b
test al, al
jns 0x14001850c
call fcn.14010b880
jmp 0x14001850c
lea rsi, [rsp + 0x90]
mov rcx, r15
mov rdx, rsi
call fcn.140024e20
lea rbx, [rsp + 0x78]
mov rcx, r15
mov rdx, rbx
call fcn.14004ea10
mov rcx, rbx
mov rdx, rsi
mov r8d, r14d
call fcn.140018ee0
mov edi, eax
cmp byte [rbx + 0x17], 0
jns 0x1400187c7
mov rcx, qword [rsp + 0x78]
call fcn.14010b880
cmp byte [rsp + 0xa7], 0
jns 0x14001853b
mov rcx, qword [rsp + 0x90]
call fcn.14010b880
jmp 0x14001853b
mov edx, edi
and edx, 0xfffffffe
cmp byte [r15 + 0x17], 0
mov rcx, r15
jns 0x1400187f9
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x14001862a
jmp 0x140018528
mov rcx, qword [rsp + 0x90]
call fcn.14010b880
jmp 0x140018694
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
mov ebp, 4
cmp eax, 4
jae 0x14001855a
cdqe
lea rcx, [0x14014d578]
mov ebp, dword [rcx + rax*4]
jmp 0x14001855a
mov ebp, 7
jmp 0x14001855a