Function at 0x1400652b0
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, [0x1400b9cac]
lea rcx, [rbp - 1]
call fcn.140060b60
nop
lea r8, [rbp - 1]
mov rdx, r13
lea rcx, [rbp - 0x39]
call fcn.140064d60
nop
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x14006535e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140065359
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006569c
call fcn.140077488
mov rcx, qword [rbp - 0x39]
mov rbx, qword [rbp - 0x31]
cmp rcx, rbx
jne 0x140065373
xor dil, dil
jmp 0x140065629
mov rdx, qword [rbx - 8]
cmp rdx, 8
jb 0x1400653b3
mov rcx, qword [rbx - 0x20]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x1400653ae
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14006569c
mov rcx, r8
call fcn.140077488
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 0x140065542
movzx ebx, byte [rbp + 0x7f]
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [r14 + 0x10]
sub rax, rcx
cmp rax, 1
jb 0x140065696
mov r9, r14
cmp qword [r14 + 0x18], 8
jb 0x140065422
mov r9, qword [r14]
mov qword [rsp + 0x30], 1
lea rax, [0x1400b9cac]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 1]
call fcn.140068460
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 0x1400654a2
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.140079910
xor eax, eax
mov word [rdi + rsi*2], ax
mov rdi, qword [rbp + 0x7f]
jmp 0x1400654bc
mov qword [rsp + 0x20], rdx
movzx r8d, bl
lea rcx, [rbp - 0x21]
call fcn.140068210
mov r12, qword [rbp + 0x17]
mov r15, qword [rbp - 1]
cmp r12, 8
jb 0x1400654f7
lea rdx, [r12*2 + 2]
mov rax, r15
cmp rdx, 0x1000
jb 0x1400654ef
add rdx, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140065690
mov rcx, r15
call fcn.140077488
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 0x140065514
test al, 0x10
jne 0x14006552a
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 0x1400653fa
mov rsi, qword [rbp + 0x77]
mov r15, qword [rbp + 0x6f]
xor r12d, r12d
mov rcx, r13
cmp qword [r13 + 0x18], 8
jb 0x140065550
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [r13 + 0x18], 8
jb 0x140065561
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 0x1400655cd
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 0x1400655d0
xor dil, dil
mov rdx, qword [rbp - 9]
cmp rdx, 8
jb 0x140065610
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14006560b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006569c
call fcn.140077488
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 0x14006566b
mov rdx, rbx
call fcn.1400683d0
mov rdx, qword [rbp - 0x29]
mov rcx, qword [rbp - 0x39]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140065666
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006568a
call fcn.140077488
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.1400870b4
nop
call fcn.1400870b4
nop
call fcn.140006b20
nop
call fcn.1400870b4
int3