Function at 0x403f40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, dword [ebp + 8]
sub esp, 0x134
push ebx
push esi
push edi
push 0x4ad160
mov dword [0x4ae26c], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
lea ecx, [esp + 0x38]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x403f87
lea eax, [esp + 0x38]
call fcn.00450510
mov eax, dword [0x4ababc]
test eax, eax
je 0x403fe0
mov ebx, dword [eax]
test ebx, ebx
je 0x403fe0
cmp byte [ebx], 0
je 0x403fe0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403fa0
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
call fcn.00471dd0
mov esi, eax
test esi, esi
jne 0x403fcb
push ebx
push str.Out_of_memory.
mov ecx, 0x4af230
call fcn.0042fe80
jmp 0x403fe5
test edi, edi
je 0x403fda
push edi
push ebx
push esi
call fcn.00490500
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x403fe5
mov esi, 0x49b8bd
mov eax, dword [0x4ac124]
mov edi, 1
mov dword [0x4aea84], esi
mov byte [esp + 0x2c], 0
cmp eax, edi
jle 0x4040b7
mov bl, 0x3d
jmp 0x404010
mov edx, dword [0x4ac128]
mov esi, dword [edx + edi*4]
push 0x49b8dc
push esi
call fcn.00487ed1
add esp, 8
test eax, eax
je 0x40409d
push str._restart
push esi
call fcn.00487ed1
add esp, 8
test eax, eax
je 0x40409d
push 0x49b8ec
push esi
call fcn.00487ed1
add esp, 8
test eax, eax
je 0x404094
push str._force
push esi
call fcn.00487ed1
add esp, 8
test eax, eax
je 0x404094
push 0xc
push str._ErrorStdOut
push esi
call fcn.0048828d
add esp, 0xc
test eax, eax
jne 0x4040b2
cmp byte [esi + 0xc], bl
jne 0x40407f
lea eax, [esi + 0xd]
jmp 0x404081
xor eax, eax
mov byte [0x4af84f], 1
call fcn.00416610
mov dword [0x4af850], eax
jmp 0x4040a2
mov byte [0x4ae297], 1
jmp 0x4040a2
mov byte [esp + 0x2c], 1
mov eax, dword [0x4ac124]
inc edi
cmp edi, eax
jl 0x404010
jmp 0x4040b7
mov eax, dword [0x4ac124]
sub eax, edi
push eax
mov eax, dword [0x4ac128]
lea ecx, [eax + edi*4]
push ecx
call fcn.004044d0
add esp, 8
test eax, eax
je 0x4043d5
lea edx, [esp + 0x2b]
push edx
push 0xc1
lea eax, [esp + 0x38]
push eax
push 6
push str.A_Args
mov ecx, 0x4af230
call fcn.00423020
test eax, eax
jne 0x40411f
mov edx, dword [esp + 0x30]
xor ecx, ecx
cmp byte [esp + 0x2b], cl
setne cl
inc ecx
or ecx, 0xc0
push ecx
push edx
push 0x4af230
lea ecx, [eax + 6]
mov edx, str.A_Args
call fcn.004232c0
mov esi, eax
test esi, esi
je 0x4043d5
mov eax, dword [0x4ac128]
mov ebx, dword [0x4ac124]
lea ecx, [eax + edi*4]
sub ebx, edi
push ecx
call fcn.0046e0d0
add esp, 4
test eax, eax
je 0x4043d5
mov edi, eax
mov ecx, esi
call fcn.00477f00
call fcn.00403dc0
mov edx, dword [esp + 0x2c]
push edx
push 0x4af230
call fcn.00416fa0
cmp eax, 1
jne 0x4043d5
mov esi, dword [0x4aa988]
mov ecx, 0x3a
mov edi, 0x4acf30
mov eax, 0x4af230
rep movsd dword es:[edi], dword [esi]
call fcn.00417d20
cmp eax, 0xffffffff
je 0x4043d5
test eax, eax
jne 0x4041a4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x4ae3cc]
test eax, eax
jne 0x4041ec
mov eax, dword [0x4abac4]
cmp word [eax], 0
jne 0x4041e0
cmp dword [0x4aeaec], 0
jne 0x4041e0
cmp dword [0x4ae3a4], 0
jne 0x4041e0
cmp dword [0x4ae3a8], 0
jne 0x4041e0
cmp byte [0x4ae3b1], 0
je 0x404264
mov dword [0x4ae3cc], 1
jmp 0x4041f1
cmp eax, 4
je 0x404264
cmp byte [esp + 0x2c], 0
jne 0x40426f
cmp byte [0x4ae297], 0
jne 0x4042ef
mov ecx, dword [0x4af844]
push ecx
push str.AutoHotkey
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x4042ef
mov eax, dword [0x4ae3cc]
cmp eax, 3
je 0x404199
cmp eax, 2
je 0x40425d
fldz
mov edx, dword [0x4af838]
sub esp, 8
fstp qword [esp]
push 0
push edx
push 4
push str.An_older_instance_of_this_script_is_already_running.__Replace_it_with_this_instance__nNote:_To_avoid_this_message__see_SingleInstance_in_the_help_file.
call fcn.004797d0
add esp, 0x18
cmp eax, 7
je 0x404199
mov eax, 0x407
jmp 0x40428b
cmp byte [esp + 0x2c], 0
je 0x4042ef
mov eax, dword [0x4af844]
push eax
push str.AutoHotkey
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x4042ef
mov eax, 0x406
push 0
push eax
push 0x44
push edi
call dword [sym.imp.USER32.dll_PostMessageA]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
xor esi, esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4042eb
mov edi, edi
cmp esi, 0x64
jne 0x4042db
fldz
sub esp, 8
fstp qword [esp]
push 0
push 0
push 4
push str.Could_not_close_the_previous_instance_of_this_script.__Keep_waiting_
call fcn.004797d0
add esp, 0x18
cmp eax, 7
je 0x4043d5
xor esi, esi
push 0x14
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4042b0
push 0x64
call ebx
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
push 0
push 0x4ace44
push 0
push 0x2000
call esi
test eax, eax
je 0x40431f
cmp dword [0x4ace44], 0
je 0x40431f
push 2
push 0
push 0
push 0x2001
call esi
push 0x4af230
call fcn.004171c0
cmp eax, 1
jne 0x4043d5
push 0
push 4
push 0
call fcn.0048871c
add eax, 0x20
push eax
call fcn.00488626
mov esi, dword [0x4aa900]
add esp, 0x10
test esi, esi
je 0x404374
imul esi, esi, 0x70
push esi
call fcn.004882a7
add esp, 4
mov dword [0x4aea8c], eax
test eax, eax
je 0x404374
push esi
push 0
push eax
call fcn.004910d0
add esp, 0xc
cmp byte [0x4af9f2], 0
jne 0x404398
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x34], 8
mov dword [esp + 0x38], 0x1ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.0040a2a0
push 3
push 0
push str.Clipboard
mov ecx, 0x4af230
mov byte [0x4af84c], 1
mov byte [0x4aea7a], 0
call fcn.00422fc0
test eax, eax
je 0x4043c7
call fcn.00403f10
call fcn.004043f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x10