Function at 0x14002f570
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov r11, rsp
push rbx
push r12
push r13
push r15
sub rsp, 0x1a8
mov rax, qword [rcx + 8]
xor r13d, r13d
mov r15, qword [rcx]
mov rbx, rcx
mov qword [r11 + 0x10], r13
lea r12d, [r13 + 1]
cmp dword [rax + 0x94], r13d
je 0x14002f90b
mov qword [r11 - 0x28], rsi
lea rcx, [rax + 0x98]
mov qword [r11 - 0x30], rdi
mov qword [r11 - 0x38], r14
mov r14d, dword [rax + 0x90]
add r14, r15
test rcx, rcx
je 0x14002f786
cmp dword [rcx + 4], r13d
je 0x14002f786
mov edi, dword [rcx]
lea rdx, [r11 - 0x148]
xorps xmm0, xmm0
mov qword [rsp + 0x40], reloc.WSOCK32.dll_getservbyport
xorps xmm1, xmm1
mov dword [rsp + 0x50], r13d
mov ecx, 0x104
add rdi, r15
movdqu xmmword [rsp + 0x58], xmm0
movdqu xmmword [rsp + 0x68], xmm1
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp qword [0x14012bdf0], r13
movups xmm0, xmmword [str.AutoHotkey.MemoryModule.temp.manifest]
mov ecx, eax
mov eax, dword [0x140107160]
movups xmm1, xmmword [0x140107150]
movups xmmword [rsp + rcx + 0x80], xmm0
movups xmmword [rsp + rcx + 0x90], xmm1
mov dword [rsp + rcx + 0xa0], eax
movzx eax, word [reloc.WSOCK32.dll_WSACleanup]
mov word [rsp + rcx + 0xa4], ax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x48], rax
je 0x14002f786
movzx r8d, word [rdi + 0xe]
movzx eax, word [rdi + 0xc]
add r8, rax
je 0x14002f786
mov ecx, r13d
lea rax, [rdi + 0x10]
nop dword [rax]
mov edx, dword [rax + 4]
test edx, edx
jns 0x14002f68d
cmp word [rax], 0x18
je 0x14002f69e
inc rcx
add rax, 8
cmp rcx, r8
jl 0x14002f680
jmp 0x14002f786
btr edx, 0x1f
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x100
lea rcx, [rsp + 0x80]
xor r9d, r9d
mov dword [rsp + 0x20], 2
xor r8d, r8d
mov eax, dword [rdx + rdi + 0x14]
mov edx, 0x40000000
btr eax, 0x1f
mov esi, dword [rax + rdi + 0x14]
add rsi, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14002f786
mov dword [rsp + 0x1d0], r13d
lea r9, [rsp + 0x1d0]
mov edx, dword [rsi]
mov rcx, rax
mov r8d, dword [rsi + 4]
add rdx, r15
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x1d0], r13d
je 0x14002f786
mov rax, qword [0x14012bdf0]
lea rcx, [rsp + 0x40]
call rax
xor r9d, r9d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x4000100
lea rcx, [rsp + 0x80]
mov edx, 0x40000000
mov dword [rsp + 0x20], 3
mov rdi, rax
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rdi, 0xffffffffffffffff
je 0x14002f786
lea rdx, [rsp + 0x1d8]
mov rcx, rdi
call qword [0x14012be00]
mov edx, reloc.OLEAUT32.dll_SafeArrayLock
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x14002f8d5
mov qword [rsp + 0x1e0], rbp
mov ecx, dword [r14 + 0xc]
test ecx, ecx
je 0x14002f8cd
mov rax, qword [rbx + 0x40]
add rcx, r15
mov rdx, qword [rbx + 0x60]
call rax
mov rbp, rax
test rax, rax
je 0x14002f8bf
mov eax, dword [rbx + 0x20]
xor edx, edx
mov rcx, qword [rbx + 0x18]
test eax, eax
jne 0x14002f7e2
lea r8d, [rax + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x14002f7f5
mov r8, qword [rbx + 0x10]
inc eax
movsxd r9, eax
shl r9, 3
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, rax
test rax, rax
je 0x14002f8ae
mov qword [rbx + 0x10], rax
movsxd rax, dword [rbx + 0x20]
mov qword [rcx + rax*8], rbp
inc dword [rbx + 0x20]
mov ecx, dword [r14]
test ecx, ecx
je 0x14002f81d
mov eax, dword [r14 + 0x10]
jmp 0x14002f823
mov ecx, dword [r14 + 0x10]
mov eax, ecx
mov esi, eax
mov edi, ecx
add rsi, r15
add rdi, r15
mov rax, qword [rdi]
test rax, rax
je 0x14002f878
nop word [rax + rax]
mov r8, qword [rbx + 0x60]
mov rcx, rbp
mov r9, qword [rbx + 0x48]
test rax, rax
jns 0x14002f855
movzx edx, ax
jmp 0x14002f85c
lea rdx, [r15 + 2]
add rdx, rax
call r9
mov qword [rsi], rax
test rax, rax
je 0x14002f894
mov rax, qword [rdi + 8]
add rdi, 8
add rsi, 8
test rax, rax
jne 0x14002f840
add r14, 0x14
mov edx, reloc.OLEAUT32.dll_SafeArrayLock
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x14002f7a4
jmp 0x14002f8cd
mov rdx, qword [rbx + 0x60]
mov rcx, rbp
mov r12d, r13d
call qword [rbx + 0x50]
mov ecx, 0x7f
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14002f8cd
mov rdx, qword [rbx + 0x60]
mov rcx, rbp
call qword [rbx + 0x50]
mov ecx, ntohs
jmp 0x14002f8c4
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r12d, r13d
mov rbp, qword [rsp + 0x1e0]
mov r8, qword [0x14012bdf8]
mov r14, qword [rsp + 0x190]
mov rdi, qword [rsp + 0x198]
mov rsi, qword [rsp + 0x1a0]
test r8, r8
je 0x14002f90b
mov rdx, qword [rsp + 0x1d8]
test rdx, rdx
je 0x14002f90b
xor ecx, ecx
call r8
mov eax, r12d
add rsp, 0x1a8
pop r15
pop r13
pop r12
pop rbx
ret