Function at 0x1400afca0
Capabilities:
Allocate or change rwx memory
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3b0]
sub rsp, 0x4b0
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x4f8], rbx
mov r15, rdx
mov rdi, rcx
movzx eax, word [rdi]
cmp ax, 0x20
je 0x1400afce0
cmp ax, 9
jne 0x1400afce6
add rdi, 2
jmp 0x1400afcd1
mov r13d, 0x2c
mov edx, r13d
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rsi, rax
test rax, rax
je 0x1400b0780
cmp word [rax], 0
je 0x1400b0780
add rsi, 2
mov edx, r13d
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
xor ebx, ebx
test rax, rax
je 0x1400afd31
mov edx, r13d
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov word [rax], bx
movzx eax, word [rsi]
test ax, ax
je 0x1400afd8b
mov rdx, rsi
nop dword [rax]
cmp ax, 0x20
je 0x1400afd4c
cmp ax, 9
jne 0x1400afd55
add rdx, 2
movzx eax, word [rdx]
jmp 0x1400afd40
mov rax, rdx
sub rax, rsi
cmp rax, 2
jb 0x1400afd8b
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
lea r8, [r8 + 1]
cmp word [rdx + r8*2], bx
jne 0x1400afd70
lea r8, [r8*2 + 2]
mov rcx, rsi
call sub.VCRUNTIME140.dll_memmove
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdi + r8*2], bx
jne 0x1400afd92
lea r9, [rbp + 0x3f0]
mov rdx, rdi
lea rcx, [0x140105cf0]
call fcn.1400372e0
test rax, rax
je 0x1400afdc6
mov r8, rdi
lea rdx, str.Duplicate_function_definition.
jmp 0x1400b078a
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rdi + r8*2], bx
jne 0x1400afdd0
mov qword [rsp + 0x28], rbx
mov eax, dword [rbp + 0x3f0]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov rdx, rdi
lea rcx, [0x140105cf0]
call fcn.140038c40
mov qword [rsp + 0x68], rax
test rax, rax
je 0x1400b0796
lea rcx, [0x1400669f0]
mov qword [rax + 0x10], rcx
mov byte [rax + 0x79], 1
mov dword [rax + 0x24], ebx
mov rax, rsi
sub rax, r15
sar rax, 1
mov r14d, 0x4001
sub r14, rax
lea rdx, str._A_ScriptDir_
mov rcx, rsi
call fcn.1400ad3f0
mov r12d, 1
mov dword [rbp + 0x400], r12d
test rax, rax
je 0x1400afe9a
mov rcx, qword [0x1401068a8]
lea rdi, [rbp - 0x70]
sub rdi, rcx
nop dword [rax]
movzx eax, word [rcx]
mov word [rcx + rdi], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400afe60
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_ScriptDir_
mov rcx, rsi
call fcn.1400ad840
lea rdx, str._A_AppData_
mov rcx, rsi
call fcn.1400ad3f0
test rax, rax
je 0x1400aff30
mov edx, 2
lea ecx, [rdx + 0x3f]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
lea rax, [rbp + 0x1a0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x1a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x1400afee9
mov word [rbp + 0x1a0], bx
mov rcx, rbx
nop dword [rax]
movzx eax, word [rbp + rcx + 0x1a0]
mov word [rbp + rcx - 0x70], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400afef0
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_AppData_
mov rcx, rsi
call fcn.1400ad840
lea rdx, str._A_AppDataCommon_
mov rcx, rsi
call fcn.1400ad3f0
test rax, rax
je 0x1400affc0
mov edx, 2
lea ecx, [rdx + 0x3f]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
lea rax, [rbp + 0x1a0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x23]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x1400aff7b
mov word [rbp + 0x1a0], bx
mov rcx, rbx
nop
movzx eax, word [rbp + rcx + 0x1a0]
mov word [rbp + rcx - 0x70], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400aff80
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_AppDataCommon_
mov rcx, rsi
call fcn.1400ad840
lea rdx, str._A_AhkPath_
mov rcx, rsi
call fcn.1400ad3f0
test rax, rax
je 0x1400b0039
lea rcx, [rbp - 0x70]
call fcn.140057640
mov eax, eax
test rax, rax
je 0x1400b000f
lea rbx, [rbp - 0x70]
lea rbx, [rbx + rax*2]
mov edi, 0x103
sub rdi, rax
mov r8, rdi
lea rdx, str.AutoHotkey.exe
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
xor eax, eax
mov word [rbx + rdi*2], ax
xor ebx, ebx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_AhkPath_
mov rcx, rsi
call fcn.1400ad840
lea rdx, str._A_AhkDir_
mov rcx, rsi
call fcn.1400ad3f0
test rax, rax
je 0x1400b0080
lea rcx, [rbp - 0x70]
call fcn.140057640
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_AhkDir_
mov rcx, rsi
call fcn.1400ad840
lea rdx, str._A_DllDir_
mov rcx, rsi
call fcn.1400ad3f0
mov edi, 0x5c
test rax, rax
je 0x1400b0132
mov r8d, 0x104
lea rdx, [rbp + 0x1a0]
mov rcx, qword [0x140102830]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400b00d0
mov r8d, 0x104
lea rdx, [rbp + 0x1a0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, edi
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov rdi, rax
lea rax, [rbp + 0x1a0]
sub rdi, rax
sar rdi, 1
mov r8, rdi
lea rdx, [rbp + 0x1a0]
lea rcx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [rbp + rdi*2 - 0x70], bx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_DllDir_
mov rcx, rsi
call fcn.1400ad840
lea rdx, str._A_DllPath_
mov rcx, rsi
call fcn.1400ad3f0
test rax, rax
je 0x1400b01c0
mov r8d, 0x104
lea rdx, [rbp + 0x1a0]
mov rcx, qword [0x140102830]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, eax
test rax, rax
jne 0x1400b017c
mov r8d, 0x104
lea rdx, [rbp + 0x1a0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rcx, rbx
nop
movzx eax, word [rbp + rcx + 0x1a0]
mov word [rbp + rcx - 0x70], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400b0180
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 0x70]
lea rdx, str._A_DllPath_
mov rcx, rsi
call fcn.1400ad840
mov edx, 0x25
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x1400b01e2
mov r8, rsi
lea rdx, str.Reference_not_allowed_here__use__where_possible._Only__A_AhkPath___A_AhkDir___A_DllPath___A_DllDir___A_ScriptDir___A_AppData_Common___can_be_used_here.
jmp 0x1400b078a
mov edx, r13d
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x1400b0202
mov edx, r13d
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov word [rax], bx
lea rdx, str._s_A_Fa_f0_9__:_A_Fa_f0_9____s_
mov rcx, rsi
call fcn.140069f00
mov rcx, rsi
test rax, rax
je 0x1400b0341
mov qword [rbp + 0x408], 0x780030
mov edx, 0x3a
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x1400b024a
mov edx, 0x3a
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
lea rsi, [rax + 2]
mov edx, 0x3a
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x1400b0276
mov edx, 0x3a
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rdi, rax
sub rdi, rsi
sar rdi, 1
jmp 0x1400b028c
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rsi + rax*2], 0
jne 0x1400b0280
mov edi, eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
movsxd rbx, eax
mov rcx, rbx
call fcn.1400aa240
mov r13, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1400b02ba
mov r8, rsi
lea rdx, str.Out_of_memory.
jmp 0x1400b078a
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
jne 0x1400b02e6
mov r8, rsi
lea rdx, str.Could_not_commit_memory_for_DllImport.
jmp 0x1400b078a
xor eax, eax
mov ebx, eax
test edi, edi
jle 0x1400b034e
mov r14, rsi
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
mov rdx, r14
lea rcx, [rbp + 0x40c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
xor edx, edx
lea r8d, [rdx + 0x10]
lea rcx, [rbp + 0x408]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
mov ecx, ebx
shr rcx, 1
mov byte [rcx + r13], al
add ebx, 2
add r14, 4
cmp ebx, edi
jl 0x1400b0300
xor ebx, ebx
jmp 0x1400b034e
call fcn.140023750
mov r13, rax
mov qword [rsp + 0x40], rax
test r13, r13
jne 0x1400b03ae
mov r14d, 0x5c
mov edx, r14d
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov rdi, rax
test rax, rax
je 0x1400b038b
mov word [rax], bx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x1400b0387
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov word [rdi], r14w
xor edx, edx
mov rcx, rsi
call fcn.140064f70
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1400b03ae
mov r8, rsi
lea rdx, str.Call_to_nonexistent_function.
jmp 0x1400b078a
mov rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], 0
jne 0x1400b03b5
inc rax
lea rdi, [rsi + rax*2]
mov rdx, 0xffffffffffffffff
mov rcx, rdi
call fcn.1400aa190
mov rsi, rax
mov byte [rbp + 0x3f0], 0
cmp word [rax], 0
je 0x1400b03f4
mov rcx, rax
call fcn.140013320
test eax, eax
mov r14d, r12d
je 0x1400b03f7
mov r14d, ebx
cmp word [rsi], 0
je 0x1400b0458
mov r12d, 0x2c
mov edx, r12d
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x1400b0440
mov edx, r12d
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rdi, rax
test rax, rax
je 0x1400b042c
add rdi, 2
inc r14d
mov edx, r12d
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
jne 0x1400b0414
cmp word [rsi], 0
je 0x1400b0458
cmp r14d, 1
jge 0x1400b0458
lea rdx, str.Parameter_3_required
jmp 0x1400b0787
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call fcn.1400aa240
mov r13, rax
test rax, rax
je 0x1400b0552
mov qword [rax], rbx
mov qword [rax + 8], rbx
test r14b, 1
jne 0x1400b0487
mov dword [rax + 8], 2
jmp 0x1400b0515
movzx eax, word [rdi]
cmp ax, 0x20
je 0x1400b0496
cmp ax, 9
jne 0x1400b049c
add rdi, 2
jmp 0x1400b0487
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rbx
mov r8d, 5
lea rdx, str.CDecl
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1400b04ed
add rdi, 0xa
movzx eax, word [rdi]
cmp ax, 0x20
je 0x1400b04d3
cmp ax, 9
jne 0x1400b04d9
add rdi, 2
jmp 0x1400b04c4
mov qword [rsp + 0x50], rdi
test ax, ax
jne 0x1400b04ed
mov dword [r13 + 8], 2
jmp 0x1400b0512
mov rdx, r13
lea rcx, [rsp + 0x50]
call fcn.140064820
cmp dword [r13 + 8], 0
jne 0x1400b050b
mov eax, 4
jmp 0x1400b0796
mov byte [rbp + 0x3f0], 1
dec r14d
mov eax, r14d
cdq
sub eax, edx
sar eax, 1
movsxd rbx, eax
je 0x1400b0565
mov rdi, rbx
shl rdi, 4
mov rcx, rdi
call fcn.1400aa240
mov r15, rax
mov qword [rbp + 0x408], rax
mov rcx, rdi
call fcn.1400aa240
mov qword [rsp + 0x48], rax
test r15, r15
je 0x1400b0552
test rax, rax
jne 0x1400b0576
lea r8, [0x1400cc644]
lea rdx, str.Out_of_memory.
jmp 0x1400b078a
xor r15d, r15d
mov qword [rbp + 0x408], r15
mov qword [rsp + 0x48], r15
jmp 0x1400b0579
xor r15d, r15d
lea edi, [rbx*8]
movsxd rbx, edi
mov rcx, rbx
call fcn.1400aa240
mov rdx, rax
mov qword [rsp + 0x60], rax
test edi, edi
je 0x1400b05aa
test rax, rax
je 0x1400b0552
test edi, edi
je 0x1400b05aa
mov rdi, rax
xor eax, eax
mov rcx, rbx
rep stosb byte [rdi], al
mov r12d, r15d
cmp r14d, 1
jle 0x1400b0732
mov qword [rsp + 0x78], r15
mov r15, rdx
mov rbx, qword [rbp + 0x408]
nop word [rax + rax]
mov edx, 0x2c
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rdi, rax
xor eax, eax
mov word [rdi], ax
add rdi, 2
mov qword [rsp + 0x70], rsi
mov rdx, rbx
lea rcx, [rsp + 0x70]
call fcn.140064820
mov eax, dword [rbx + 8]
test eax, eax
je 0x1400b0501
cmp eax, 1
je 0x1400b0683
cmp eax, 5
jle 0x1400b0657
cmp eax, 7
jle 0x1400b0634
cmp eax, 8
jne 0x1400b0657
mov rcx, rdi
call fcn.140023750
test rax, rax
jne 0x1400b0501
mov qword [rbx], rdi
jmp 0x1400b06e6
mov rcx, rdi
call fcn.140026bd0
movsd qword [rbx], xmm0
cmp dword [rbx + 8], 6
jne 0x1400b06e6
cvtsd2ss xmm0, xmm0
movss dword [rbx], xmm0
jmp 0x1400b06e6
cmp byte [rbx + 0xd], 0
je 0x1400b0679
cmp eax, 5
jne 0x1400b0679
mov rcx, rdi
call fcn.140023750
test rax, rax
jne 0x1400b0679
mov rcx, rdi
call fcn.140049e20
jmp 0x1400b06e3
mov rcx, rdi
call fcn.140023750
jmp 0x1400b06e3
mov rcx, rdi
call fcn.140023750
test rax, rax
jne 0x1400b0501
lea edx, [rax + 0x2c]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rsi, rax
test rax, rax
je 0x1400b06ad
xor eax, eax
mov word [rsi], ax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.1400c9f30
mov qword [rsp + 0x50], rax
mov rdx, rdi
mov rcx, rax
call fcn.140077450
nop
mov qword [r15], rax
test rsi, rsi
je 0x1400b06db
mov eax, 0x2c
mov word [rsi], ax
mov rax, qword [r15]
mov rcx, rax
call fcn.140076b70
mov qword [rbx], rax
mov edx, 0x2c
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rsi, rax
test rax, rax
je 0x1400b0705
xor eax, eax
mov word [rsi], ax
add rsi, 2
inc r12d
add rbx, 0x10
add r15, 8
mov eax, dword [rbp + 0x400]
add eax, 2
mov dword [rbp + 0x400], eax
cmp eax, r14d
jl 0x1400b05d0
mov rdx, qword [rsp + 0x60]
xor r15d, r15d
jmp 0x1400b0739
mov rdi, qword [rbp + 0x3f0]
cmp byte [rbp + 0x3f0], 0
je 0x1400b074b
test r14d, r14d
je 0x1400b074b
mov word [rdi], r15w
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x68]
mov qword [rcx + 0x28], rax
mov dword [rcx + 0x20], r12d
mov qword [rcx + 0x38], r13
mov qword [rcx + 0x48], rdx
mov rax, qword [rbp + 0x408]
mov qword [rcx + 0x40], rax
mov rax, qword [rsp + 0x48]
mov qword [rcx + 0x18], rax
mov eax, 3
jmp 0x1400b0796
lea rdx, str.Parameter_2_required
mov r8, r15
lea rcx, [0x140105cf0]
call fcn.1400481c0
mov rbx, qword [rsp + 0x4f8]
add rsp, 0x4b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret