Function at 0x140065560
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 + 0x18], r8
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 rsi, r8
mov r15, rdx
mov r13, rcx
xor r12d, r12d
mov qword [rbp - 1], r12
mov qword [rbp + 0xf], r12
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r12w
lea r8d, [r12 + 1]
lea rdx, [0x1400bcd8c]
lea rcx, [rbp - 1]
call fcn.140060e10
nop
lea r8, [rbp - 1]
mov rdx, r13
lea rcx, [rbp - 0x39]
call fcn.140065010
nop
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x14006560e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140065609
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006594c
call fcn.14007a00c
mov rcx, qword [rbp - 0x39]
mov rbx, qword [rbp - 0x31]
cmp rcx, rbx
jne 0x140065623
xor dil, dil
jmp 0x1400658d9
mov rdx, qword [rbx - 8]
cmp rdx, 8
jb 0x140065663
mov rcx, qword [rbx - 0x20]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x14006565e
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14006594c
mov rcx, r8
call fcn.14007a00c
mov word [rbx - 0x20], r12w
mov qword [rbx - 0x10], r12
mov qword [rbx - 8], 7
mov rdi, qword [rbp - 0x31]
sub rdi, 0x20
mov qword [rbp + 0x7f], rdi
mov qword [rbp - 0x31], rdi
mov qword [rbp - 0x21], r12
mov qword [rbp - 0x11], r12
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r12w
mov r14, qword [rbp - 0x39]
cmp r14, rdi
je 0x1400657f2
movzx ebx, byte [rbp + 0x7f]
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [r14 + 0x10]
sub rax, rcx
cmp rax, 1
jb 0x140065946
mov r9, r14
cmp qword [r14 + 0x18], 8
jb 0x1400656d2
mov r9, qword [r14]
mov qword [rsp + 0x30], 1
lea rax, [0x1400bcd8c]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 1]
call fcn.140068710
nop
lea r9, [rbp - 1]
mov r15, qword [rbp - 1]
mov r12, qword [rbp + 0x17]
cmp r12, 8
cmovae r9, r15
mov rcx, qword [rbp - 0x11]
mov r8, qword [rbp - 9]
mov rax, r8
sub rax, rcx
mov rdx, qword [rbp + 0xf]
cmp rdx, rax
ja 0x140065752
lea rsi, [rdx + rcx]
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.14007c4a0
xor eax, eax
mov word [rdi + rsi*2], ax
mov rdi, qword [rbp + 0x7f]
jmp 0x14006576c
mov qword [rsp + 0x20], rdx
movzx r8d, bl
lea rcx, [rbp - 0x21]
call fcn.1400684c0
mov r12, qword [rbp + 0x17]
mov r15, qword [rbp - 1]
cmp r12, 8
jb 0x1400657a7
lea rdx, [r12*2 + 2]
mov rax, r15
cmp rdx, 0x1000
jb 0x14006579f
add rdx, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140065940
mov rcx, r15
call fcn.14007a00c
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 0x1400657c4
test al, 0x10
jne 0x1400657da
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, rdi
jne 0x1400656aa
mov rsi, qword [rbp + 0x77]
mov r15, qword [rbp + 0x6f]
xor r12d, r12d
mov rcx, r13
cmp qword [r13 + 0x18], 8
jb 0x140065800
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [r13 + 0x18], 8
jb 0x140065811
mov r13, qword [r13]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14006587d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov r8d, esi
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dil, 1
jmp 0x140065880
xor dil, dil
mov rdx, qword [rbp - 9]
cmp rdx, 8
jb 0x1400658c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400658bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006594c
call fcn.14007a00c
mov qword [rbp - 0x11], r12
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r12w
mov rbx, qword [rbp - 0x31]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x14006591b
mov rdx, rbx
call fcn.140068680
mov rdx, qword [rbp - 0x29]
mov rcx, qword [rbp - 0x39]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140065916
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006593a
call fcn.14007a00c
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.140089c44
nop
call fcn.140089c44
nop
call fcn.140006ca0
nop
call fcn.140089c44
int3