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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
lea rbp, [rsp + 0x40]
mov r13, r8
mov r12, rdx
mov r14, rcx
mov r8, qword [rdx]
mov rsi, 0xffffffffffffffff
test r8, r8
je 0x140038260
mov rax, rsi
nop
inc rax
cmp byte [r8 + rax], 0
jne 0x1400381f0
lea edx, [rax + 1]
cmp edx, 0x3fffffff
jg 0x140038260
cdqe
lea rax, [rax*2 + 2]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140038222
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.140134690
sub rsp, rcx
lea r15, [rsp + 0x40]
test r15, r15
je 0x140038260
xor edi, edi
mov word [r15], di
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], r15
mov r9d, esi
xor edx, edx
lea ecx, [rdi + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
cmove r15, rdi
jmp 0x140038265
xor edi, edi
mov r15d, edi
call fcn.14000bfcc
mov rcx, rax
test rax, rax
je 0x14003866d
mov rax, qword [rax]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rbp], rax
mov rdx, r15
lea rcx, [rbp]
call fcn.140007020
mov ecx, 1
test al, al
jne 0x1400385bc
test r15, r15
je 0x14003855d
mov r14, rsi
nop dword [rax]
inc r14
cmp word [r15 + r14*2], 0
jne 0x1400382b0
test r14d, r14d
je 0x14003855d
mov rbx, qword [rbp]
mov r13d, dword [rbx - 0x10]
mov r12, r15
sub r12, rbx
sar r12, 1
test r14d, r14d
js 0x14003867e
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, r14d
or eax, ecx
jge 0x1400382fb
mov edx, r14d
lea rcx, [rbp]
call fcn.14000816c
mov rbx, qword [rbp]
movsxd r8, r14d
add r8, r8
cmp r12, r13
ja 0x140038337
lea rdx, [rbx + r12*2]
test r8, r8
je 0x14003836f
test rdx, rdx
jne 0x140038321
call fcn.140146434
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x14003836a
movsxd rax, dword [rbx - 0xc]
add rax, rax
cmp rax, r8
jb 0x14003835f
mov rcx, rbx
call fcn.1401378a0
jmp 0x14003836f
movsxd rax, dword [rbx - 0xc]
add rax, rax
test r8, r8
je 0x14003836f
mov rcx, rbx
cmp rax, r8
jb 0x140038355
mov rdx, r15
call fcn.1401378a0
jmp 0x14003836f
mov r8, rax
xor edx, edx
call fcn.140137f50
call fcn.140146434
mov dword [rax], Ordinal_35
call fcn.140146288
cmp r14d, dword [rbx - 0xc]
jg 0x14003867e
mov dword [rbx - 0x10], r14d
movsxd rax, r14d
mov word [rbx + rax*2], di
mov ecx, 1
mov r12, qword [rbp + 0x88]
mov r13, qword [rbp + 0x90]
mov r14, qword [rbp + 0x80]
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x800
or eax, ecx
jge 0x1400383bf
mov edx, 0x800
lea rcx, [rbp]
call fcn.14000816c
mov rbx, qword [rbp]
mov rdx, qword [r14]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.140173a1c
test eax, eax
js 0x140038662
cmp eax, dword [rbx - 0xc]
jg 0x140038662
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], di
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], rdi
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1400384ff
lea rdx, [rbp + 8]
lea ecx, [rax + 0x77]
call fcn.14006c150
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x18], xmm0
mov qword [rbp + 0x28], rdi
lea r8, [rbp + 0x18]
mov edx, dword [rbp + 0x10]
mov rcx, qword [rbp + 8]
call fcn.14006c210
test al, al
je 0x1400385c5
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 0x1400385c5
mov dword [rbp + 0x98], edi
mov r8, qword [rbp + 0x20]
mov rdx, qword [rbp + 0x18]
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 + 0x20]
mov r8, qword [rbp + 0x18]
sub rcx, r8
mov eax, dword [rbp + 0x98]
cmp rax, rcx
jne 0x1400385c9
mov byte [r13], 1
test r8, r8
je 0x1400384ff
mov rdx, qword [rbp + 0x28]
sub rdx, r8
mov rax, r8
cmp rdx, 0x1000
jb 0x1400384eb
add rdx, 0x27
mov r8, qword [r8 - 8]
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038678
mov rcx, r8
call fcn.140133e68
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x18], xmm0
mov qword [rbp + 0x28], rdi
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140038515
call fcn.140170264
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], rdi
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14003852f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [r12]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x14003854a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov al, 1
lea rsp, [rbp + 0x38]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rbx, qword [rbp]
lea rdx, [rbx - 0x18]
mov r14, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140038397
cmp dword [rdx + 0x10], 0
jge 0x14003858d
cmp dword [rbx - 0xc], 0
jl 0x14003867e
mov dword [rbx - 0x10], edi
mov word [rbx], di
jmp 0x140038397
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, ecx
jg 0x1400385a1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + Ordinal_26]
lea rbx, [rax + 0x18]
mov qword [rbp], rbx
mov ecx, 1
jmp 0x140038397
mov rbx, qword [rbp]
jmp 0x14003839e
mov r8, qword [rbp + 0x18]
test r8, r8
je 0x14003860a
mov rdx, qword [rbp + 0x28]
sub rdx, r8
mov rax, r8
cmp rdx, 0x1000
jb 0x1400385f6
add rdx, 0x27
mov r8, qword [r8 - 8]
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003865c
mov rcx, r8
call fcn.140133e68
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x18], xmm0
mov qword [rbp + 0x28], rdi
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140038620
call fcn.140170264
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], rdi
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14003863a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [r12]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x140038655
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
jmp 0x14003854c
call fcn.1401462a8
nop
mov ecx, 0x80070057
call fcn.14000c3ac
nop
mov ecx, 0x80004005
call fcn.14000c3ac
nop
call fcn.1401462a8
nop
mov ecx, 0x80070057
call fcn.14000c3ac
int3