Function at 0x14005fd80
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov r13, r8
mov rdi, rdx
mov r12, rcx
xor esi, esi
mov qword [rbp - 1], rsi
mov qword [rbp + 0xf], rsi
mov qword [rbp + 0x17], 7
mov word [rbp - 1], si
lea r8d, [rsi + 1]
lea rdx, [0x1400b4b8c]
lea rcx, [rbp - 1]
call fcn.14005b980
nop
lea r8, [rbp - 1]
mov rdx, r12
lea rcx, [rbp - 0x39]
call fcn.14005f810
nop
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x14005fe26
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005fe21
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140060112
call fcn.14006efcc
mov rcx, qword [rbp - 0x39]
mov rbx, qword [rbp - 0x31]
cmp rcx, rbx
jne 0x14005fe3b
xor dil, dil
jmp 0x1400600a5
mov rdx, qword [rbx - 8]
cmp rdx, 8
jb 0x14005fe7b
mov rcx, qword [rbx - 0x20]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x14005fe76
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140060112
mov rcx, r8
call fcn.14006efcc
mov word [rbx - 0x20], si
mov qword [rbx - 0x10], rsi
mov qword [rbx - 8], 7
mov r15, qword [rbp - 0x31]
sub r15, 0x20
mov qword [rbp - 0x31], r15
mov qword [rbp - 0x21], rsi
mov qword [rbp - 0x11], rsi
mov qword [rbp - 9], 7
mov word [rbp - 0x21], si
mov r14, qword [rbp - 0x39]
cmp r14, r15
je 0x14005ffbd
movzx ebx, byte [rbp + 0x7f]
nop dword [rax]
lea r8, [0x1400b4b8c]
mov rdx, r14
lea rcx, [rbp - 1]
call fcn.1400629e0
mov r9, rax
mov rdx, qword [rax + 0x10]
cmp qword [rax + 0x18], 8
jb 0x14005fee4
mov r9, qword [rax]
mov rcx, qword [rbp - 0x11]
mov r8, qword [rbp - 9]
mov rax, r8
sub rax, rcx
cmp rdx, rax
ja 0x14005ff24
lea rsi, [rcx + rdx]
mov qword [rbp - 0x11], rsi
lea rdi, [rbp - 0x21]
cmp r8, 8
cmovae rdi, qword [rbp - 0x21]
lea rcx, [rdi + rcx*2]
lea r8, [rdx + rdx]
mov rdx, r9
call fcn.140071620
xor eax, eax
mov word [rdi + rsi*2], ax
jmp 0x14005ff37
mov qword [rsp + 0x20], rdx
movzx r8d, bl
lea rcx, [rbp - 0x21]
call fcn.140062f30
nop
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x14005ff77
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005ff72
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006010c
call fcn.14006efcc
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14005ff94
test al, 0x10
jne 0x14005ffaa
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae rcx, qword [rbp - 0x21]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add r14, 0x20
cmp r14, r15
jne 0x14005fec0
mov rdi, qword [rbp + 0x6f]
xor esi, esi
mov rcx, r12
cmp qword [r12 + 0x18], 8
jb 0x14005ffcc
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [r12 + 0x18], 8
jb 0x14005ffde
mov r12, qword [r12]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14006004a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], rsi
xor r9d, r9d
mov r8d, r13d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dil, 1
jmp 0x14006004d
xor dil, dil
mov rdx, qword [rbp - 9]
cmp rdx, 8
jb 0x14006008d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140060088
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140060112
call fcn.14006efcc
mov qword [rbp - 0x11], rsi
mov qword [rbp - 9], 7
mov word [rbp - 0x21], si
mov rbx, qword [rbp - 0x31]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x1400600e7
mov rdx, rbx
call fcn.1400630f0
mov rdx, qword [rbp - 0x29]
mov rcx, qword [rbp - 0x39]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400600e2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140060106
call fcn.14006efcc
movzx eax, dil
mov rbx, qword [rsp + 0xe0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.14007ebb4
nop
call fcn.14007ebb4
nop
call fcn.14007ebb4
int3