Function at 0x1400314a0
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
mov r12d, 1
cmp dword [rax + 0x94], r13d
je 0x14003183d
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 0x1400316b9
cmp dword [rcx + 4], r13d
je 0x1400316b9
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]
movups xmm0, xmmword [str.AutoHotkey.MemoryModule.temp.manifest]
mov ecx, eax
mov edx, r13d
cmp qword [0x140136ea0], rdx
mov eax, dword [0x1401111b0]
movups xmm1, xmmword [0x1401111a0]
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 0x1400316b9
movzx r9d, word [rdi + 0xe]
movzx eax, word [rdi + 0xc]
add r9d, eax
je 0x1400316b9
lea rcx, [rdi + 0x10]
nop dword [rax + rax]
mov eax, dword [rcx + 4]
mov r8d, eax
test eax, eax
jns 0x1400315c0
cmp word [rcx], 0x18
je 0x1400315d0
inc edx
add rcx, 8
cmp edx, r9d
jl 0x1400315b0
jmp 0x1400316b9
btr r8d, 0x1f
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x100
lea rcx, [rsp + 0x80]
xor r9d, r9d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
mov eax, dword [r8 + rdi + 0x14]
xor r8d, r8d
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 0x1400316b9
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 0x1400316b9
lea rcx, [rsp + 0x40]
call qword [0x140136ea0]
mov qword [rsp + 0x30], r13
lea rcx, [rsp + 0x80]
mov dword [rsp + 0x28], 0x4000100
xor r9d, r9d
mov edx, 0x40000000
mov dword [rsp + 0x20], 3
mov r8d, 4
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rdi, 0xffffffffffffffff
je 0x1400316b9
lea rdx, [rsp + 0x1d8]
mov rcx, rdi
call qword [0x140136eb0]
mov edx, reloc.OLEAUT32.dll_SafeArrayLock
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x140031807
mov qword [rsp + 0x1e0], rbp
nop word [rax + rax]
mov eax, dword [r14 + 0xc]
test eax, eax
je 0x1400317ff
mov rdx, qword [rbx + 0x60]
lea rcx, [r15 + rax]
call qword [rbx + 0x40]
mov rbp, rax
test rax, rax
je 0x1400317f1
mov eax, dword [rbx + 0x20]
xor edx, edx
mov rcx, qword [rbx + 0x18]
test eax, eax
jne 0x14003171e
mov r8d, 8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x140031731
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 0x1400317e0
mov qword [rbx + 0x10], rax
movsxd rax, dword [rbx + 0x20]
mov qword [rcx + rax*8], rbp
inc dword [rbx + 0x20]
mov eax, dword [r14]
test eax, eax
jne 0x140031757
mov eax, dword [r14 + 0x10]
mov edi, eax
add rdi, r15
mov rax, qword [rdi]
test rax, rax
je 0x1400317aa
mov esi, dword [r14 + 0x10]
add rsi, r15
nop dword [rax + rax]
mov r8, qword [rbx + 0x60]
mov rcx, rbp
test rax, rax
jns 0x140031781
movzx edx, word [rdi]
jmp 0x14003178b
mov rdx, qword [rdi]
add rdx, 2
add rdx, r15
call qword [rbx + 0x48]
mov rcx, rsi
mov qword [rcx], rax
test rax, rax
je 0x1400317c6
mov rax, qword [rdi + 8]
add rdi, 8
add rsi, 8
test rax, rax
jne 0x140031770
add r14, 0x14
mov edx, reloc.OLEAUT32.dll_SafeArrayLock
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x1400316e0
jmp 0x1400317ff
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 0x1400317ff
mov rdx, qword [rbx + 0x60]
mov rcx, rbp
call qword [rbx + 0x50]
mov ecx, ntohs
jmp 0x1400317f6
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r12d, r13d
mov rbp, qword [rsp + 0x1e0]
mov r8, qword [0x140136ea8]
mov r14, qword [rsp + 0x190]
mov rdi, qword [rsp + 0x198]
mov rsi, qword [rsp + 0x1a0]
test r8, r8
je 0x14003183d
mov rdx, qword [rsp + 0x1d8]
test rdx, rdx
je 0x14003183d
xor ecx, ecx
call r8
mov eax, r12d
add rsp, 0x1a8
pop r15
pop r13
pop r12
pop rbx
ret