Function at 0x140023290
Capabilities:
Check if file exists
Create directory
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov r14, r8
mov rbx, rdx
mov r12, rcx
cmp qword [rcx], 0xffffffffffffffff
je 0x140023497
mov rdx, r8
cmp qword [r8 + 0x18], 0x10
jb 0x1400232d4
mov rdx, qword [r8]
lea rcx, [rsp + 0x40]
call fcn.140006140
nop
mov rcx, qword [rsp + 0x40]
mov r8d, 1
sub r8d, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, 0x104
or eax, r8d
jge 0x14002330f
mov edx, 0x104
lea rcx, [rsp + 0x40]
call fcn.140007db4
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov rcx, qword [rsp + 0x40]
movsxd rdx, dword [rcx - 0xc]
call fcn.1401738c0
test eax, eax
js 0x140023643
mov rcx, qword [rsp + 0x40]
cmp eax, dword [rcx - 0xc]
jg 0x140023643
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [rsp + 0x40]
mov byte [rcx + rax], 0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x140023367
xor r8d, r8d
mov rdx, qword [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbx]
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [rbx + 4]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xor edi, edi
mov qword [rsp + 0x60], rdi
xor r15d, r15d
xor ebx, ebx
test rsi, rsi
je 0x1400233fb
cmp rsi, 0x1000
jb 0x1400233c8
lea rcx, [rsi + 0x27]
cmp rcx, rsi
jbe 0x14002364e
call fcn.140133e2c
test rax, rax
je 0x140023654
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x1400233d3
mov rcx, rsi
call fcn.140133e2c
mov rbx, rax
mov r13, rbx
mov qword [rsp + 0x50], rbx
lea rdi, [rbx + rsi]
mov qword [rsp + 0x60], rdi
mov r8, rsi
xor edx, edx
mov rcx, rbx
call fcn.140137f50
mov qword [rsp + 0x58], rdi
mov r15, rdi
jmp 0x140023400
mov r13, qword [rsp + 0x50]
mov dword [rbp + 0xd0], 0
sub r15, rbx
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0xd0]
mov r8d, r15d
mov rdx, r13
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rbp + 0xd0]
cmp rax, r15
jae 0x1400234bc
test rbx, rbx
je 0x140023475
sub rdi, rbx
cmp rdi, 0x1000
jb 0x140023469
mov rcx, qword [rbx - 8]
sub rbx, rcx
add rdi, 0x27
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x140023654
mov rbx, rcx
mov rdx, rdi
mov rcx, rbx
call fcn.140133e68
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140023497
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rcx, r14
call fcn.14000d278
xor al, al
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x190
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, [rbp - 0x70]
call fcn.140016340
lea rdx, [r12 + 0x28]
cmp qword [rdx + 0x18], 0x10
jb 0x1400234d4
mov rdx, qword [rdx]
lea rcx, [rbp - 0x70]
call fcn.140016390
mov r8d, r15d
mov rdx, r13
lea rcx, [rbp - 0x70]
call fcn.140016490
test al, al
je 0x14002343c
mov rdx, r14
lea rcx, [rsp + 0x68]
call fcn.14000cca0
mov rsi, rax
xor r12b, r12b
mov rcx, rax
cmp qword [rax + 0x18], 0x10
jb 0x140023514
mov rcx, qword [rax]
xor eax, eax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x140023587
xor ecx, ecx
mov dword [rbp + 0xe8], ecx
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0xe8]
mov r8d, r15d
mov rdx, r13
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp + 0xe8]
movzx r12d, r12b
cmp rax, r15
mov eax, 1
cmove r12d, eax
mov rdx, qword [rsi + 0x18]
cmp rdx, 0x10
jb 0x1400235c1
mov rcx, qword [rsi]
inc rdx
cmp rdx, 0x1000
jb 0x1400235bc
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14002365a
mov rcx, r8
call fcn.140133e68
mov qword [rsi + 0x10], 0
mov qword [rsi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rsi], 0
test rbx, rbx
je 0x140023609
sub rdi, rbx
cmp rdi, 0x1000
jb 0x1400235fd
add rdi, 0x27
mov rcx, qword [rbx - 8]
sub rbx, rcx
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x14002363d
mov rbx, rcx
mov rdx, rdi
mov rcx, rbx
call fcn.140133e68
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14002362c
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
nop
mov rcx, r14
call fcn.14000d278
movzx eax, r12b
jmp 0x1400234a1
call fcn.1401462a8
int3
mov ecx, 0x80070057
call fcn.14000c3ac
int3
call fcn.14000f3e0
int3
call fcn.1401462a8
nop
call fcn.1401462a8
int3