Function at 0x140078560
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, 0x118
mov ebx, edx
mov rsi, rcx
mov rax, qword [0x140162028]
xor rax, rsp
mov qword [rsp + 0x110], 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
lea rdx, str.DeleteFileAndRecordMetrics
lea rbp, str..._.._base_files_file_util_win.cc
lea rdi, [rsp + 0xc0]
mov rcx, rdi
mov r8, rbp
mov r9d, 0x187
call fcn.140063670
lea rcx, [rsp + 0x38]
xor r14d, r14d
mov rdx, rdi
xor r8d, r8d
call fcn.14006e480
lea rdx, str.DoDeleteFile
lea rdi, [rsp + 0xa0]
mov rcx, rdi
mov r8, rbp
mov r9d, 0x14f
call fcn.140063670
lea rcx, [rsp + 0xc0]
mov rdx, rdi
xor r8d, r8d
call fcn.14006e480
movzx ecx, byte [rsi + 0x17]
test cl, cl
mov rax, qword [rsi + 8]
mov rdx, rcx
cmovs rdx, rax
mov ebp, 0
test rdx, rdx
je 0x1400786e0
test cl, cl
jns 0x140078642
cmp rax, 0x103
ja 0x140078868
mov rcx, rsi
mov rdx, rdi
call fcn.1400614c0
movzx eax, byte [rsp + 0xb7]
test al, al
jns 0x140078669
mov rax, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0xa0]
mov rbp, 0xffffffffffffffff
test rax, rax
je 0x14007869b
add rax, rax
xor ecx, ecx
movzx edx, word [rdi + rcx]
cmp dx, 0x2a
je 0x1400787a7
cmp dx, 0x3f
je 0x1400787a7
add rcx, 2
cmp rax, rcx
jne 0x14007867a
lea rcx, [rsp + 0xa0]
call fcn.140060de0
cmp rbp, 0xffffffffffffffff
jne 0x140078872
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x1400786be
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400787bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
and ecx, 0xfffffffe
xor ebp, ebp
cmp ecx, 2
cmovne ebp, eax
lea rbx, [r13*2 + 0x14]
add rbx, r13
lea rdi, [rsp + 0xc0]
mov rcx, rdi
call fcn.14006e560
test ebp, ebp
jne 0x1400788bd
lea rax, str.Windows.PostOperationState.
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], 0x1b
mov qword [rsp + 0xd0], r12
mov qword [rsp + 0xd8], rbx
lea rdx, [rsp + 0x88]
mov qword [rdx], 2
mov qword [rdx + 8], rdi
lea rsi, [rsp + 0xa0]
mov rcx, rsi
call fcn.140069c30
mov rcx, rsi
mov edx, r14d
mov r8d, 8
call fcn.140067e90
cmp byte [rsi + 0x17], 0
js 0x1400787f1
mov sil, 1
test ebp, ebp
jne 0x1400788fb
lea rcx, [rsp + 0x38]
call fcn.14006e560
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.1400f0560
mov eax, esi
add rsp, 0x118
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp rax, rcx
je 0x14007869b
sar rcx, 1
mov rbp, rcx
jmp 0x14007869b
mov edi, eax
test dil, 1
jne 0x140078915
test dil, 0x10
jne 0x140078803
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x1400787d9
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, 0
test eax, eax
jne 0x1400786e0
jmp 0x1400786cd
mov rcx, qword [rsp + 0xa0]
call fcn.1400ef7cc
jmp 0x14007876c
test bl, bl
je 0x140078845
xorps xmm0, xmm0
lea rdi, [rsp + 0xa0]
movaps xmmword [rdi], xmm0
mov qword [rdi + 0x10], 0
mov byte [rdi + 0x17], 1
mov dword [rdi], 0x2a
mov rcx, rsi
mov rdx, rdi
mov r8b, 1
call fcn.140079540
mov ebp, eax
cmp byte [rdi + 0x17], 0
js 0x140078859
test ebp, ebp
jne 0x1400786e0
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x140078851
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x1400787df
mov rcx, qword [rsp + 0xa0]
call fcn.1400ef7cc
jmp 0x14007883d
mov ebp, 0xa1
jmp 0x1400786e0
lea r15, [rsp + 0xa0]
mov rcx, rsi
mov rdx, r15
call fcn.1400614c0
lea rdi, [rsp + 0x88]
mov rcx, rsi
mov rdx, rdi
call fcn.140060e80
mov rcx, rdi
mov rdx, r15
mov r8d, ebx
call fcn.140079540
mov ebp, eax
mov rcx, rdi
call fcn.140060de0
mov rcx, r15
call fcn.140060de0
jmp 0x1400786e0
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x1400788c9
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140078939
mov r14d, 7
test al, 0x10
je 0x140078703
mov rcx, rsi
call fcn.140063290
movzx eax, al
mov r14d, 6
sub r14d, eax
jmp 0x140078703
lea rcx, [rsp + 0x28]
mov qword [rcx], r12
mov qword [rcx + 8], rbx
mov edx, ebp
call fcn.1400794b0
xor esi, esi
jmp 0x140078777
mov edx, edi
and edx, 0xfffffffe
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x140078926
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1400787c7
jmp 0x1400786cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
mov r14d, 4
cmp eax, 4
jae 0x140078703
cdqe
lea rcx, [0x140136cf8]
mov r14d, dword [rcx + rax*4]
jmp 0x140078703