Function at 0x14001ff80
Capabilities:
Check if file exists
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
lea rbp, [rsp + 0x40]
mov qword [rbp + 8], 0xfffffffffffffffe
mov qword [rbp + 0x80], rbx
mov r13, r8
mov r15, rdx
mov r12, rcx
mov r8, qword [rdx]
or rsi, 0xffffffffffffffff
test r8, r8
je 0x14002002e
mov rcx, rsi
inc rcx
cmp byte [r8 + rcx], 0
jne 0x14001ffc3
inc ecx
cmp ecx, 0x3fffffff
jg 0x14002002e
movsxd rax, ecx
add rax, rax
lea rdx, [rax + 0xf]
cmp rdx, rax
ja 0x14001fff0
movabs rdx, 0xffffffffffffff0
and rdx, 0xfffffffffffffff0
mov rax, rdx
call fcn.14007c170
sub rsp, rdx
lea r14, [rsp + 0x40]
test r14, r14
je 0x14002002e
xor edi, edi
mov word [r14], di
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], r14
mov r9d, esi
xor edx, edx
lea ecx, [rdi + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
cmove r14, rdi
jmp 0x140020033
xor edi, edi
mov r14d, edi
call fcn.14000bcc0
mov rcx, rax
test rax, rax
jne 0x14002004b
mov ecx, 0x80004005
call fcn.14000b790
int3
mov rax, qword [rax]
call qword [rax + Ordinal_26]
lea rbx, [rax + 0x18]
mov qword [rbp], rbx
test r14, r14
je 0x14002009d
test r14, 0xffffffffffff0000
jne 0x14002008b
movzx r14d, r14w
xor edx, edx
mov ecx, r14d
call fcn.14000b6e0
test rax, rax
je 0x1400200b2
mov r8d, r14d
mov rdx, rax
lea rcx, [rbp]
call fcn.14000bf00
jmp 0x1400200ae
mov rax, rsi
nop
inc rax
cmp word [r14 + rax*2], 0
jne 0x140020090
jmp 0x14002009f
mov eax, edi
mov r8d, eax
mov rdx, r14
lea rcx, [rbp]
call fcn.1400144a0
mov rbx, qword [rbp]
mov r14, qword [r12]
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x800
or ecx, eax
jge 0x1400200dc
mov edx, 0x800
lea rcx, [rbp]
call fcn.14000c030
mov rbx, qword [rbp]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1400e5378
test eax, eax
js 0x14002033d
cmp eax, dword [rbx - 0xc]
jg 0x14002033d
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], di
mov qword [rbp + 0x10], rdi
mov qword [rbp + 0x18], rdi
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140020174
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x140020139
call fcn.1400e1944
mov qword [rbp + 0x10], rdi
mov qword [rbp + 0x18], rdi
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140020153
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [r15]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x14002016d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov al, 1
jmp 0x140020348
lea rdx, [rbp + 0x10]
mov ecx, 0x77
call fcn.14002aa20
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rdi
lea r8, [rbp + 0x20]
mov edx, dword [rbp + 0x18]
mov rcx, qword [rbp + 0x10]
call fcn.14002aab0
test al, al
je 0x14002028b
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14002028b
mov dword [rbp + 0x98], edi
mov r8, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
sub r8, rdx
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x98]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
sub rcx, rdx
mov eax, dword [rbp + 0x98]
cmp rax, rcx
jne 0x14002028f
mov byte [r13], 1
test rdx, rdx
je 0x140020123
mov rax, qword [rbp + 0x30]
sub rax, rdx
cmp rax, 0x1000
jb 0x140020272
test dl, 0x1f
je 0x140020245
call fcn.1400e463c
int3
mov rax, qword [rdx - 8]
cmp rax, rdx
jb 0x140020254
call fcn.1400e463c
int3
sub rdx, rax
cmp rdx, 8
jae 0x140020263
call fcn.1400e463c
int3
cmp rdx, 0x27
jbe 0x14002026f
call fcn.1400e463c
int3
mov rdx, rax
mov rcx, rdx
call fcn.14007b810
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rdi
jmp 0x140020123
mov rdx, qword [rbp + 0x20]
test rdx, rdx
je 0x1400202ef
mov rax, qword [rbp + 0x30]
sub rax, rdx
cmp rax, 0x1000
jb 0x1400202db
test dl, 0x1f
je 0x1400202ae
call fcn.1400e463c
int3
mov rax, qword [rdx - 8]
cmp rax, rdx
jb 0x1400202bd
call fcn.1400e463c
int3
sub rdx, rax
cmp rdx, 8
jae 0x1400202cc
call fcn.1400e463c
int3
cmp rdx, 0x27
jbe 0x1400202d8
call fcn.1400e463c
int3
mov rdx, rax
mov rcx, rdx
call fcn.14007b810
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rdi
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x140020305
call fcn.1400e1944
mov qword [rbp + 0x10], rdi
mov qword [rbp + 0x18], rdi
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14002031f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [r15]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x140020339
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
jmp 0x140020348
mov ecx, 0x80070057
call fcn.14000b790
nop
mov rbx, qword [rbp + 0x80]
lea rsp, [rbp + 0x40]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret