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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xa8]
sub rsp, 0x1a8
mov r14, r8
mov rbx, rdx
mov r15, rcx
cmp qword [rcx + 0x18], 0
je 0x14001ed6f
cmp qword [rcx], 0xffffffffffffffff
je 0x14001efaf
mov rdx, r14
cmp qword [r8 + 0x18], 0x10
jb 0x14001ed7c
mov rdx, qword [r8]
lea rcx, [rbp + 0x108]
call fcn.14000644c
nop
mov rcx, qword [rbp + 0x108]
mov r8d, 1
sub r8d, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, 0x104
or eax, r8d
jge 0x14001edbf
mov edx, 0x104
lea rcx, [rbp + 0x108]
call fcn.14000816c
mov rcx, qword [rbp + 0x108]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov rcx, qword [rbp + 0x108]
movsxd rdx, dword [rcx - 0xc]
call fcn.140173a1c
test eax, eax
js 0x14001f11d
mov rcx, qword [rbp + 0x108]
cmp eax, dword [rcx - 0xc]
jg 0x14001f11d
mov dword [rcx - 0x10], eax
movsxd rcx, eax
xor r12d, r12d
mov rax, qword [rbp + 0x108]
mov word [rax + rcx*2], r12w
mov rcx, qword [rbp + 0x108]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14001ee25
xor r8d, r8d
mov rdx, qword [rbp + 0x108]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov esi, dword [rbx + 4]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x40], xmm0
mov rdi, r12
mov qword [rsp + 0x50], r12
mov rax, r12
mov rbx, r12
test rsi, rsi
je 0x14001eeac
cmp rsi, 0x1000
jb 0x14001ee76
lea rcx, [rsi + 0x27]
cmp rcx, rsi
jbe 0x14001f128
call fcn.140133e2c
test rax, rax
je 0x14001f134
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x14001ee81
mov rcx, rsi
call fcn.140133e2c
mov rbx, rax
mov r13, rbx
mov qword [rsp + 0x40], rbx
lea rdi, [rbx + rsi]
mov qword [rsp + 0x50], rdi
mov r8, rsi
xor edx, edx
mov rcx, rbx
call fcn.140137f50
mov r12, rdi
mov qword [rsp + 0x48], rdi
mov rax, rdi
jmp 0x14001eeb6
mov r12, qword [rsp + 0x48]
mov r13, qword [rsp + 0x40]
sub rax, rbx
mov r9d, eax
mov r8, r13
mov rax, qword [rbp + 0xf8]
mov edx, dword [rax]
mov rcx, r15
call fcn.14001ccc0
test al, al
je 0x14001ef52
lea rcx, [rbp - 0x60]
call fcn.140016340
lea rcx, [rsp + 0x60]
call fcn.14001c800
nop
cmp qword [rax + 0x18], 0x10
jb 0x14001eef2
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.140016390
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x14001ef3c
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001ef37
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001f12e
call fcn.140133e68
sub r12, rbx
mov r8d, r12d
mov rdx, r13
lea rcx, [rbp - 0x60]
call fcn.140016490
test al, al
jne 0x14001efcd
test rbx, rbx
je 0x14001ef8b
sub rdi, rbx
cmp rdi, 0x1000
jb 0x14001ef7f
add rdi, 0x27
mov rcx, qword [rbx - 8]
sub rbx, rcx
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x14001f134
mov rbx, rcx
mov rdx, rdi
mov rcx, rbx
call fcn.140133e68
nop
mov rdx, qword [rbp + 0x108]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001efaf
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
add rsp, 0x1a8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rdx, r14
lea rcx, [rbp - 0x80]
call fcn.14000cca0
mov rsi, rax
xor r15b, r15b
mov rcx, rax
cmp qword [rax + 0x18], 0x10
jb 0x14001efec
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 + 0x58], rax
cmp rax, 0xffffffffffffffff
je 0x14001f05f
xor ecx, ecx
mov dword [rbp + 0xf0], ecx
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0xf0]
mov r8d, r12d
mov rdx, r13
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp + 0xf0]
movzx r15d, r15b
cmp rax, r12
mov eax, 1
cmove r15d, eax
mov rdx, qword [rsi + 0x18]
cmp rdx, 0x10
jb 0x14001f099
mov rcx, qword [rsi]
inc rdx
cmp rdx, 0x1000
jb 0x14001f094
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14001f13a
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 0x14001f0e1
sub rdi, rbx
cmp rdi, 0x1000
jb 0x14001f0d5
add rdi, 0x27
mov rcx, qword [rbx - 8]
sub rbx, rcx
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x14001f117
mov rbx, rcx
mov rdx, rdi
mov rcx, rbx
call fcn.140133e68
nop
mov rdx, qword [rbp + 0x108]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001f106
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, r15b
jmp 0x14001efb9
call fcn.1401462a8
int3
mov ecx, 0x80070057
call fcn.14000c3ac
int3
call fcn.14000f3e0
nop
call fcn.1401462a8
nop
call fcn.1401462a8
nop
call fcn.1401462a8
int3