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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x338
mov ebx, r8d
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x330], rax
lea r14, [rsp + 0x68]
mov r8d, 0x2c8
mov rcx, r14
mov dl, 0xaa
call fcn.1401808d0
xor ebp, ebp
mov dword [rsp + 0x30], ebp
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rsi
mov rcx, r14
mov rdx, rdi
xor r8d, r8d
mov r9d, 3
call fcn.140031670
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rdi, [rsp + 0x50]
mov qword [rdi + 0x10], rax
movaps xmm0, xmmword [0x140270690]
movaps xmmword [rdi], xmm0
mov rcx, r14
mov rdx, rdi
call fcn.1400319e0
movzx eax, byte [rdi + 0x17]
test al, al
jns 0x14003146d
mov rcx, qword [rsp + 0x58]
jmp 0x140031472
mov ecx, eax
and ecx, 0x7f
test rcx, rcx
jne 0x140031502
test al, al
jns 0x140031489
mov rcx, qword [rsp + 0x50]
call fcn.14017b254
mov rcx, qword [rsp + 0x2c0]
cmp rcx, 0xffffffffffffffff
jne 0x140031625
lea rsi, [rsp + 0x310]
mov rdx, qword [rsi + 0x10]
mov r8, qword [rsi + 0x18]
mov rcx, rsi
call fcn.1400345a0
mov rcx, qword [rsi]
call fcn.14017b220
cmp byte [rsi - 0x11], 0
js 0x1400315c2
cmp byte [rsp + 0x2df], 0
jns 0x1400314dc
mov rcx, qword [rsp + 0x2c8]
call fcn.14017b254
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.14017e7b0
mov eax, ebp
add rsp, 0x338
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r14, [rsp + 0x68]
lea r15, [rsp + 0x38]
xor r12d, r12d
cmp byte [rsp + 0x68], 0
je 0x140031533
mov r13d, dword [rsp + 0x6c]
test r13b, 1
jne 0x140031630
test r13b, 0x10
jne 0x1400315d8
mov al, byte [rsp + 0x67]
mov rcx, rdi
test al, al
jns 0x14003153f
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400315d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
and eax, 0xfffffffe
cmp eax, 2
mov eax, 0
cmove ebp, eax
test r12d, r12d
cmovne ebp, r12d
mov rcx, r14
mov rdx, r15
call fcn.1400319e0
cmp byte [rsp + 0x67], 0
js 0x1400315b6
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x60], rax
movups xmm0, xmmword [rsp + 0x38]
movaps xmmword [rsp + 0x50], xmm0
movzx eax, byte [rsp + 0x67]
test al, al
jns 0x1400315a0
mov rcx, qword [rsp + 0x58]
jmp 0x1400315a5
mov ecx, eax
and ecx, 0x7f
mov r12d, ebp
test rcx, rcx
je 0x14003147b
jmp 0x14003150f
mov rcx, qword [rsp + 0x50]
call fcn.14017b254
jmp 0x14003157c
mov rcx, qword [rsp + 0x2e8]
call fcn.14017b254
jmp 0x1400314c5
xor ebp, ebp
jmp 0x140031563
xor ebp, ebp
test bl, bl
je 0x140031563
mov rcx, rdi
mov rdx, rsi
mov r8b, 1
call fcn.1400313d0
test eax, eax
jne 0x140031663
cmp byte [rsp + 0x67], 0
mov rcx, rdi
jns 0x1400315ff
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140031563
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
and ecx, 0xfffffffe
xor ebp, ebp
cmp ecx, 2
cmovne ebp, eax
jmp 0x140031563
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14003149b
test bl, bl
jne 0x140031642
xor ebp, ebp
mov ecx, r13d
and ecx, 0x10
jne 0x140031563
mov edx, r13d
and edx, 0xfffffffe
test al, al
jns 0x140031653
mov rcx, qword [rsp + 0x50]
jmp 0x140031658
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x140031525
mov ebp, eax
jmp 0x140031563