Function at 0x14006ccc0
Capabilities:
Delete file
Set file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x970]
sub rsp, 0xa70
mov rax, qword [0x1400d1608]
xor rax, rsp
mov qword [rbp + 0x960], rax
lea r13, [rcx + 0x100]
mov r15, rdx
mov rdi, rcx
lea rdx, [rbp + 0x160]
xor esi, esi
mov rcx, r13
mov r8d, 0x400
mov r14d, esi
mov r12d, 0x40000
call fcn.14004fdf0
mov ebx, eax
test eax, eax
jns 0x14006cd9b
mov ecx, eax
lea rdx, [rbp + 0x60]
neg ecx
mov r8d, 0x100
call fcn.140044d90
lea r8, str.EXP_Path2WinW:__s
mov r9, rax
lea rcx, [rsp + 0x60]
mov edx, 0x100
call fcn.140044c10
mov r10, qword [rdi + 0x18]
test r10, r10
je 0x14006cd94
mov rax, qword [rdi + 0x80]
mov r9d, ebx
mov r8d, dword [rdi + 0x88]
mov rdx, r13
mov rcx, qword [rdi + 0x58]
mov qword [rsp + 0x38], rax
mov rax, qword [rdi + 0x78]
mov qword [rsp + 0x30], rax
mov rax, qword [rdi + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call r10
mov eax, ebx
jmp 0x14006d239
mov rax, qword [rdi + 0x40]
test rax, rax
je 0x14006cdfc
mov r9, qword [r15 + 0x10]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
xor r8d, r8d
lea rcx, [rsp + 0x48]
mov rdx, r13
mov qword [rsp + 0x20], rcx
mov rcx, qword [rdi + 0x58]
call rax
mov ebx, eax
test eax, eax
jns 0x14006cf37
cmp byte [rsp + 0x60], sil
jne 0x14006cd4f
mov ecx, eax
lea rdx, [rbp + 0x60]
neg ecx
mov r8d, 0x100
call fcn.140044d90
lea r8, [0x1400d0e98]
jmp 0x14006cd3d
mov qword [rsp + 0x30], rsi
lea rcx, [rbp + 0x160]
mov dword [rsp + 0x28], 0x8000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
jne 0x14006cf37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
neg ebx
cmp ebx, 0xfffffffb
jne 0x14006ceb4
mov edx, 0x80
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x14006ceb4
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x14006ceb4
mov qword [rsp + 0x30], rsi
lea rcx, [rbp + 0x160]
mov dword [rsp + 0x28], 0x8000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
jne 0x14006ceb2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
neg ebx
jmp 0x14006ceb4
mov ebx, esi
cmp qword [rsp + 0x48], 0xffffffffffffffff
jne 0x14006cf37
mov ecx, ebx
lea rdx, [rbp + 0x60]
neg ecx
mov r8d, 0x100
call fcn.140044d90
mov r9, rax
lea r8, str.CreateFile:__s
mov edx, 0x100
lea rcx, [rsp + 0x60]
call fcn.140044c10
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x14006cd94
mov rcx, qword [rdi + 0x80]
mov r9d, ebx
mov r8d, dword [rdi + 0x88]
mov rdx, r13
mov qword [rsp + 0x38], rcx
mov rcx, qword [rdi + 0x78]
mov qword [rsp + 0x30], rcx
mov rcx, qword [rdi + 0x68]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rdi + 0x58]
call rax
mov eax, ebx
jmp 0x14006d239
cmp qword [r15 + 8], rsi
jbe 0x14006d060
mov ebx, 0x80000
cmp dword [rdi + 0xec], 0
jne 0x14006cfae
mov rcx, qword [rdi + 0x60]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x58]
xor edx, edx
call fcn.14004b850
cmp eax, 0xfffffff4
jne 0x14006cfb8
lea rdx, [rdi + 0xc0]
mov dword [rsp + 0x20], esi
mov r9d, 0xffffffff
lea ecx, [rax + 0xd]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
test eax, eax
je 0x14006cfa1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
neg esi
js 0x14006d080
xor esi, esi
jmp 0x14006d056
cmp dword [rdi + 0xec], 0
je 0x14006d056
mov esi, 0xfffffc1d
jmp 0x14006d080
test eax, eax
js 0x14006d1e6
mov r8d, dword [rsp + 0x40]
cmp r8d, ebx
mov rcx, qword [r15 + 8]
cmovg r8d, ebx
movsxd rax, r8d
add rax, r14
mov dword [rsp + 0x40], r8d
cmp rax, rcx
jbe 0x14006cfeb
mov r8d, ecx
sub r8d, r14d
mov dword [rsp + 0x40], r8d
mov rdx, qword [rsp + 0x58]
lea r9, [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14006d162
mov edx, dword [rsp + 0x50]
mov rcx, qword [rdi + 0x60]
call fcn.14004ac90
test eax, eax
js 0x14006d146
cdqe
add r14, rax
cmp r14, r12
jle 0x14006d056
lea rcx, [rdi + 0x90]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [rdi + 0x90]
mov qword [rdi + 0x70], r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea r12, [r14 + 0x40000]
mov ebx, 0x80000
cmp r14, qword [r15 + 8]
jb 0x14006cf46
cmp word [r15 + 4], 0
lea r9, [r15 + 0x20]
mov rdx, qword [rsp + 0x48]
mov r8, r15
cmove r9, rsi
mov rcx, rdi
call fcn.14006e5c0
mov esi, eax
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x14006d202
mov r9, qword [r15 + 8]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x30], rcx
mov r8, r14
mov rcx, qword [rsp + 0x48]
mov rdx, r13
mov qword [rsp + 0x28], rcx
mov rcx, qword [rdi + 0x58]
mov dword [rsp + 0x20], esi
call rax
mov ebx, eax
test eax, eax
jns 0x14006d20d
cmp byte [rsp + 0x60], 0
jne 0x14006d0f2
mov ecx, eax
lea rdx, [rbp + 0x60]
neg ecx
mov r8d, 0x100
call fcn.140044d90
mov r9, rax
lea r8, str.openwrite:__s
mov edx, 0x100
lea rcx, [rsp + 0x60]
call fcn.140044c10
mov r10, qword [rdi + 0x18]
test r10, r10
je 0x14006d137
mov rax, qword [rdi + 0x80]
mov r9d, ebx
mov r8d, dword [rdi + 0x88]
mov rdx, r13
mov rcx, qword [rdi + 0x58]
mov qword [rsp + 0x38], rax
mov rax, qword [rdi + 0x78]
mov qword [rsp + 0x30], rax
mov rax, qword [rdi + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call r10
test esi, esi
js 0x14006d20d
mov esi, ebx
jmp 0x14006d20d
mov r8d, eax
lea rdx, str.SEQ_Discard
mov rcx, rdi
call fcn.14006e810
mov esi, 0xffffff93
jmp 0x14006d080
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov esi, eax
neg esi
mov ecx, esi
neg ecx
call fcn.140044d90
mov r9, rax
lea r8, str.WriteFile:__s
mov edx, 0x100
lea rcx, [rsp + 0x60]
call fcn.140044c10
mov r10, qword [rdi + 0x18]
test r10, r10
je 0x14006d080
mov rax, qword [rdi + 0x80]
mov r9d, esi
mov r8d, dword [rdi + 0x88]
mov rdx, r13
mov rcx, qword [rdi + 0x58]
mov qword [rsp + 0x38], rax
mov rax, qword [rdi + 0x78]
mov qword [rsp + 0x30], rax
mov rax, qword [rdi + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call r10
jmp 0x14006d080
mov r8d, eax
lea rdx, str.SEQ_Peek
mov rcx, rdi
call fcn.14006e810
mov esi, 0xffffff93
jmp 0x14006d080
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rdi + 0x90]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add qword [rdi + 0x68], r14
lea rcx, [rdi + 0x90]
inc qword [rdi + 0x78]
mov qword [rdi + 0x70], 0
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov rcx, qword [rbp + 0x960]
xor rcx, rsp
call fcn.14006f1f0
mov rbx, qword [rsp + 0xac0]
add rsp, 0xa70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret