Function at 0x14005be70
Capabilities:
Check if file exists
Clear file content
Delete file
Get file attributes

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1400c5a08]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0xd8]
xor ebp, ebp
mov r14, qword [rsp + 0xd0]
xor ebx, ebx
mov qword [rsp + 0x48], rax
mov esi, r9d
mov r15d, r8d
mov rdi, rdx
mov r13, rcx
test rdx, rdx
je 0x14005c175
test rax, rax
je 0x14005c175
cmp r9d, 2
jne 0x14005bef0
bt r8d, 8
jb 0x14005bef0
mov rcx, qword [rdx + 8]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14005bef0
mov rcx, qword [rdi + 8]
call fcn.140065fbc
mov rdx, qword [rdi + 8]
or r15d, 0x2200000
cmp qword [r13 + 0x40], rbx
mov ecx, 0xc0110100
mov r8d, 0xc11d0100
mov dword [rsp + 0x30], r15d
mov rax, r13
mov dword [rsp + 0x28], esi
cmovne rax, qword [r13 + 0x40]
mov eax, dword [rax + 0x24]
mov dword [rsp + 0x40], eax
and eax, 0x30000
cmp eax, 0x10000
cmovne r8d, ecx
mov rcx, r13
call fcn.1400662b0
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14005c0e2
test r14, r14
je 0x14005bfa5
mov rdx, qword [r14]
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
test eax, eax
je 0x14005c076
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
nop dword [rax + rax]
test eax, eax
je 0x14005c076
mov rdx, qword [0x1400c99f8]
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
test eax, eax
je 0x14005c076
mov ebp, 1
bt r15d, 9
jb 0x14005bfd5
test r14, r14
je 0x14005c0c5
test dword [rsp + 0x40], 0x1000000
je 0x14005c0c5
test r15d, 0x4000100
jne 0x14005c0c5
cmp dword [rdi + 0x20], ebx
jne 0x14005c0c5
and qword [rsp + 0x38], rbx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
xor r9d, r9d
and dword [rsp + 0x28], ebx
xor r8d, r8d
and qword [rsp + 0x20], rbx
mov edx, 0x900c4
mov rcx, rsi
xor ebp, ebp
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
nop dword [rax + rax]
test eax, eax
je 0x14005c06a
and qword [rsp + 0x50], rbx
test r14, r14
je 0x14005c061
and qword [rsp + 0x38], rbx
lea r9d, [rbp + 0x10]
mov rax, qword [r14]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x58], rax
mov edx, 0x980c8
lea rax, [rsp + 0x40]
mov rcx, rsi
mov qword [rsp + 0x30], rax
and dword [rsp + 0x28], ebx
and qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
nop dword [rax + rax]
mov ebp, eax
jmp 0x14005c066
mov ebp, 1
test ebp, ebp
jne 0x14005c0c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp dword [rsp + 0xe0], 0
mov ebx, eax
je 0x14005c13a
mov dword [rsp + 0x30], 0xde6
lea rcx, str.CreateDestinationFileEx
movzx r8d, ax
lea r9, str.SetFileSize_failed
or r8d, 0x80070000
mov qword [rsp + 0x28], rcx
test eax, eax
cmovle r8d, eax
mov dword [rsp + 0x20], r8d
jmp 0x14005c125
mov rax, qword [rsp + 0x48]
mov rdx, rsi
mov rcx, r13
mov qword [rax], rsi
mov r9, qword [rdi + 0x18]
mov r8, qword [rdi + 8]
call fcn.140065af0
jmp 0x14005c136
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp dword [rsp + 0xe0], ebp
je 0x14005c15f
mov dword [rsp + 0x30], 0xdf1
lea rcx, str.CreateDestinationFileEx
movzx eax, bx
lea r9, str.CreateFile_failed
or eax, 0x80070000
mov qword [rsp + 0x28], rcx
test ebx, ebx
cmovle eax, ebx
mov dword [rsp + 0x20], eax
mov r8, qword [rdi + 8]
mov rdx, r13
mov ecx, 1
call fcn.140052bb0
test ebp, ebp
jne 0x14005c15f
cmp rsi, 0xffffffffffffffff
je 0x14005c15f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop dword [rax + rax]
test ebx, ebx
je 0x14005c171
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov eax, ebp
jmp 0x14005c188
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140094220
add rsp, 0x70
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret