Function at 0x140037be0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x198
mov ebx, edx
mov rdi, rcx
mov rax, qword [0x1401e3a38]
xor rax, rsp
mov qword [rsp + 0x190], rax
lea rax, str.DeleteFile.Recursive
lea r13, str.DeleteFile.NonRecursive
test dl, dl
cmovne r13, rax
lea rcx, [rsp + 0x40]
xor r12d, r12d
xor edx, edx
call fcn.14004f370
lea rcx, [rsp + 0x58]
xor edx, edx
call fcn.14004f370
mov rax, qword [rdi + 0x10]
mov ebp, 0
test rax, rax
je 0x140037e8a
mov ebp, 0xa1
cmp rax, 0x103
ja 0x140037e8a
lea rsi, [rsp + 0x70]
mov rcx, rdi
mov rdx, rsi
call fcn.140033740
mov rax, qword [rsp + 0x80]
cmp qword [rsp + 0x88], 7
jbe 0x140037c84
mov rsi, qword [rsp + 0x70]
test rax, rax
je 0x140037d64
pxor xmm0, xmm0
movdqa xmmword [rsp + 0xb0], xmm0
movdqa xmmword [rsp + 0xc0], xmm0
movdqa xmmword [rsp + 0x180], xmm0
movdqa xmmword [rsp + 0x170], xmm0
movdqa xmmword [rsp + 0x160], xmm0
movdqa xmmword [rsp + 0x150], xmm0
movdqa xmmword [rsp + 0x140], xmm0
movdqa xmmword [rsp + 0x130], xmm0
movdqa xmmword [rsp + 0x120], xmm0
movdqa xmmword [rsp + 0x110], xmm0
movdqa xmmword [rsp + 0x100], xmm0
movdqa xmmword [rsp + 0xf0], xmm0
movdqa xmmword [rsp + 0xe0], xmm0
movdqa xmmword [rsp + 0xd0], xmm0
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmmword [rsp + 0x90], xmm0
mov byte [rsp + 0xba], 1
mov byte [rsp + 0xcf], 1
test rax, rax
jle 0x140037d64
lea rax, [rsi + rax*2]
mov rbp, rsi
nop dword [rax]
movzx ecx, word [rbp]
cmp rcx, 0xff
ja 0x140037d5b
cmp byte [rsp + rcx + 0x90], 0
jne 0x14003808d
add rbp, 2
cmp rbp, rax
jb 0x140037d40
lea rcx, [rsp + 0x70]
call fcn.140032460
cmp qword [rdi + 0x18], 7
mov rcx, rdi
jbe 0x140037d7b
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140037e77
mov ebp, eax
test bpl, 1
je 0x140037db2
mov edx, ebp
and edx, 0xfffffffe
cmp qword [rdi + 0x18], 7
mov rcx, rdi
jbe 0x140037da4
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x140037e77
test bpl, 0x10
jne 0x140037dd0
cmp qword [rdi + 0x18], 7
mov rcx, rdi
jbe 0x140037dc5
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x140037e6e
test bl, bl
je 0x140037e5b
movdqa xmm0, xmmword [0x14019dd20]
movdqu xmmword [rsp + 0xa0], xmm0
mov dword [rsp + 0x90], 0x2a
lea rdx, [rsp + 0x90]
mov rcx, rdi
mov r8b, 1
call fcn.140039d50
mov ebp, eax
mov rax, qword [rsp + 0xa8]
cmp rax, 8
jb 0x140037e57
mov rcx, qword [rsp + 0x90]
lea rdx, [rax + rax]
add rdx, 2
cmp rdx, 0x1000
jb 0x140037e52
mov rdx, rcx
add rdx, 0xfffffffffffffff8
mov rcx, qword [rcx - 8]
sub rdx, rcx
cmp rdx, 0x20
jae 0x1400380ec
add rax, rax
add rax, 0x29
mov rdx, rax
call fcn.14014b210
test ebp, ebp
jne 0x140037e8a
cmp qword [rdi + 0x18], 7
mov rcx, rdi
jbe 0x140037e68
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ebp, 0
test eax, eax
jne 0x140037e8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
or ecx, 1
xor ebp, ebp
cmp ecx, 3
cmovne ebp, eax
xor bl, 1
movzx eax, bl
lea rbx, [rax + rax*2]
add rbx, 0x14
lea rcx, [rsp + 0x58]
call fcn.14004f470
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x38], rbx
test ebp, ebp
je 0x140037f09
cmp qword [rdi + 0x18], 7
mov rcx, rdi
jbe 0x140037ebd
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140037ee8
mov r12d, 7
test al, 0x10
je 0x140037f09
mov rcx, rdi
call fcn.140036400
movzx eax, al
mov r12d, 6
sub r12d, eax
jmp 0x140037f09
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
mov r12d, 4
cmp eax, 4
jae 0x140037f09
cdqe
lea rcx, [0x14019e260]
mov r12d, dword [rcx + rax*4]
mov eax, 0xf
movq xmm0, rax
pslldq xmm0, 8
movdqu xmmword [rsp + 0xa0], xmm0
mov byte [rsp + 0x90], 0
lea r9, str.Windows.PostOperationState.
lea rdi, [rsp + 0x90]
mov edx, 0x1b
mov rcx, rdi
call fcn.140006900
lea rcx, [rsp + 0x30]
mov rdx, rdi
call fcn.1400472b0
mov rcx, rdi
mov edx, r12d
mov r8d, 8
call fcn.1400421d0
mov rax, qword [rsp + 0xa8]
cmp rax, 0x10
jb 0x140037faa
mov rcx, qword [rsp + 0x90]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140037fa5
mov rdi, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rdi
cmp rcx, 0x20
jae 0x1400380ec
add rax, 0x28
mov rdx, rax
mov rcx, rdi
call fcn.14014b210
test ebp, ebp
je 0x14003805a
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x28], rbx
mov eax, 0xf
movq xmm0, rax
pslldq xmm0, 8
movdqu xmmword [rsp + 0xa0], xmm0
mov byte [rsp + 0x90], 0
lea r9, str.Windows.FilesystemError.
lea rsi, [rsp + 0x90]
mov edx, 0x18
mov rcx, rsi
call fcn.140006900
lea rcx, [rsp + 0x20]
mov rdx, rsi
call fcn.1400472b0
mov rcx, rsi
mov edx, ebp
call fcn.140042210
mov rax, qword [rsp + 0xa8]
cmp rax, 0x10
jb 0x140038056
mov rcx, qword [rsp + 0x90]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140038051
mov rbp, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbp
cmp rcx, 0x20
jae 0x1400380ec
add rax, 0x28
mov rdx, rax
mov rcx, rbp
call fcn.14014b210
xor esi, esi
jmp 0x14003805d
mov sil, 1
lea rcx, [rsp + 0x40]
call fcn.14004f470
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.14014b5e0
mov eax, esi
add rsp, 0x198
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
sub rbp, rsi
lea rcx, [rsp + 0x70]
call fcn.140032460
cmp rbp, 0xfffffffffffffffe
je 0x140037d6e
lea r14, [rsp + 0x90]
mov rcx, rdi
mov rdx, r14
call fcn.140033740
lea r15, [rsp + 0x70]
mov rcx, rdi
mov rdx, r15
call fcn.1400332a0
mov rcx, r15
mov rdx, r14
mov r8d, ebx
call fcn.140039d50
mov ebp, eax
mov rcx, r15
call fcn.140032460
mov rcx, r14
call fcn.140032460
jmp 0x140037e8a
call fcn.140179190
ud2