Function at 0x1400081f7
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.140008142
and edi, 4
mov ebp, eax
test sil, 8
je 0x14000823d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, qword [0x14000d1c0]
cmp eax, 1
adc dword [rdx + 8], 0
jmp 0x140008475
mov r14d, esi
and r14d, 1
je 0x140008263
test eax, eax
jne 0x140008259
mov rdx, r12
lea rcx, str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x140008459
test sil, 2
je 0x1400083f1
mov rdx, r12
lea rcx, [0x14004fea0]
call fcn.140007be7
test r14d, r14d
je 0x14000828c
lea rdx, str..
lea rcx, [0x14004fea0]
call sub.KERNEL32.dll_lstrcatW
jmp 0x140008294
mov rcx, r12
call fcn.1400075a5
cmp word [r12], 0
jne 0x1400082a6
cmp word [0x14004fea0], 0x5c
jne 0x1400082b5
lea rdx, [0x14000c3e0]
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, [0x14004fea0]
movsxd rbx, eax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
add rbx, rbx
add rbx, r12
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x1400083da
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 0x140008327
mov ax, word [rsp + 0x5e]
test ax, ax
je 0x1400083bc
cmp ax, 0x2e
jne 0x140008327
cmp word [rsp + 0x60], 0
je 0x1400083bc
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.140007be7
test byte [rsp + 0x30], 0x10
je 0x140008351
mov eax, esi
and eax, 3
cmp eax, 3
jne 0x1400083bc
mov edx, esi
mov rcx, r12
call fcn.1400081f7
jmp 0x1400083bc
mov rdx, r12
lea rcx, str.Delete:_DeleteFile___s__
call fcn.14000809f
mov edx, edi
mov rcx, r12
call fcn.140007748
mov rdx, r12
test eax, eax
jne 0x1400083b2
test edi, edi
je 0x14000839a
lea rcx, str.Delete:_DeleteFile_on_Reboot___s__
call fcn.14000809f
mov rdx, r12
mov ecx, 0xfffffff1
call fcn.140006de9
xor edx, edx
mov rcx, r12
call fcn.140007965
jmp 0x1400083bc
lea rcx, str.Delete:_DeleteFile_failed___s__
call fcn.14000809f
mov rax, qword [0x14000d1c0]
inc dword [rax + 8]
jmp 0x1400083bc
mov ecx, 0xfffffff2
call fcn.140006de9
mov rax, qword [rsp + 0x20]
mov rdx, r15
mov rcx, r13
call rax
test eax, eax
jne 0x1400082ff
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindClose]
test r14d, r14d
je 0x140008475
mov word [rbx - 2], 0
test ebp, ebp
je 0x14000824a
mov rcx, r12
call fcn.140008114
test rax, rax
je 0x140008475
mov rcx, r12
call fcn.140007c02
mov rdx, r12
lea rcx, str.RMDir:_RemoveDirectory___s__
call fcn.14000809f
mov edx, edi
mov rcx, r12
or edx, 1
call fcn.140007748
mov rdx, r12
test eax, eax
jne 0x14000846a
test edi, edi
je 0x140008452
lea rcx, str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.14000809f
mov rdx, r12
mov ecx, 0xfffffff1
call fcn.140006de9
xor edx, edx
mov rcx, r12
call fcn.140007965
jmp 0x140008475
lea rcx, str.RMDir:_RemoveDirectory_failed___s__
call fcn.14000809f
mov rax, qword [0x14000d1c0]
inc dword [rax + 8]
jmp 0x140008475
mov ecx, 0xffffffe5
call fcn.140006de9
nop
add rsp, 0x288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret