Function at 0x140008027
Capabilities:
Delete file

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x288
mov edi, edx
mov r12, rcx
mov esi, edx
call fcn.140007f72
and edi, 4
mov ebp, eax
test sil, 8
je 0x14000806d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, qword [0x14000d0e0]
cmp eax, 1
adc dword [rdx + 8], 0
jmp 0x1400082a5
mov r14d, esi
and r14d, 1
je 0x140008093
test eax, eax
jne 0x140008089
mov rdx, r12
lea rcx, str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x140008289
test sil, 2
je 0x140008221
mov rdx, r12
lea rcx, [0x1403ce6e0]
call fcn.140007a17
test r14d, r14d
je 0x1400080bc
lea rdx, str..
lea rcx, [0x1403ce6e0]
call sub.KERNEL32.dll_lstrcatW
jmp 0x1400080c4
mov rcx, r12
call fcn.1400073d5
cmp word [r12], 0
jne 0x1400080d6
cmp word [0x1403ce6e0], 0x5c
jne 0x1400080e5
lea rdx, [0x14000c340]
mov rcx, r12
call sub.KERNEL32.dll_lstrcatW
mov rcx, r12
lea r15, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, r15
lea rcx, [0x1403ce6e0]
movsxd rbx, eax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
add rbx, rbx
add rbx, r12
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x14000820a
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x28], rax
mov rax, qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov qword [rsp + 0x20], rax
cmp word [rsp + 0x5c], 0x2e
jne 0x140008157
mov ax, word [rsp + 0x5e]
test ax, ax
je 0x1400081ec
cmp ax, 0x2e
jne 0x140008157
cmp word [rsp + 0x60], 0
je 0x1400081ec
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.140007a17
test byte [rsp + 0x30], 0x10
je 0x140008181
mov eax, esi
and eax, 3
cmp eax, 3
jne 0x1400081ec
mov edx, esi
mov rcx, r12
call fcn.140008027
jmp 0x1400081ec
mov rdx, r12
lea rcx, str.Delete:_DeleteFile___s__
call fcn.140007ecf
mov edx, edi
mov rcx, r12
call fcn.140007578
mov rdx, r12
test eax, eax
jne 0x1400081e2
test edi, edi
je 0x1400081ca
lea rcx, str.Delete:_DeleteFile_on_Reboot___s__
call fcn.140007ecf
mov rdx, r12
mov ecx, 0xfffffff1
call fcn.140006c19
xor edx, edx
mov rcx, r12
call fcn.140007795
jmp 0x1400081ec
lea rcx, str.Delete:_DeleteFile_failed___s__
call fcn.140007ecf
mov rax, qword [0x14000d0e0]
inc dword [rax + 8]
jmp 0x1400081ec
mov ecx, 0xfffffff2
call fcn.140006c19
mov rax, qword [rsp + 0x20]
mov rdx, r15
mov rcx, r13
call rax
test eax, eax
jne 0x14000812f
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindClose]
test r14d, r14d
je 0x1400082a5
mov word [rbx - 2], 0
test ebp, ebp
je 0x14000807a
mov rcx, r12
call fcn.140007f44
test rax, rax
je 0x1400082a5
mov rcx, r12
call fcn.140007a32
mov rdx, r12
lea rcx, str.RMDir:_RemoveDirectory___s__
call fcn.140007ecf
mov edx, edi
mov rcx, r12
or edx, 1
call fcn.140007578
mov rdx, r12
test eax, eax
jne 0x14000829a
test edi, edi
je 0x140008282
lea rcx, str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.140007ecf
mov rdx, r12
mov ecx, 0xfffffff1
call fcn.140006c19
xor edx, edx
mov rcx, r12
call fcn.140007795
jmp 0x1400082a5
lea rcx, str.RMDir:_RemoveDirectory_failed___s__
call fcn.140007ecf
mov rax, qword [0x14000d0e0]
inc dword [rax + 8]
jmp 0x1400082a5
mov ecx, 0xffffffe5
call fcn.140006c19
nop
add rsp, 0x288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret