Function at 0x4039f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, dword [ebp + 8]
sub esp, 0x74
push ebx
push esi
push edi
push 0x4c7408
mov dword [0x4c8530], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4c8d40
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x403b05
xor ecx, ecx
mov word [0x4c8d40], cx
mov esi, 0x4a1868
mov eax, dword [0x4c6244]
mov ebx, 1
mov dword [0x4c8d3c], esi
mov byte [esp + 0x30], 0
mov byte [esp + 0x2a], 0
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], eax
cmp eax, ebx
jle 0x403c06
jmp 0x403a70
cmp byte [esp + 0x2a], 0
mov eax, dword [0x4c624c]
mov edi, dword [eax + ebx*4]
je 0x403b79
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x44]
push 0x4a18e8
push edx
call fcn.0048e003
add esp, 0xc
cmp word [esp + 0x40], 0
mov esi, eax
je 0x403fcf
lea eax, [esp + 0x2b]
push eax
push 3
lea ecx, [esp + 0x40]
push ecx
push esi
lea edx, [esp + 0x50]
push edx
mov ecx, 0x4c9718
call fcn.00421ec0
test eax, eax
jne 0x403aef
cmp byte [esp + 0x2b], al
mov ecx, dword [esp + 0x38]
setne al
lea edx, [esp + 0x40]
inc eax
push eax
push ecx
push edx
push 0x4c9718
mov ecx, esi
call fcn.00422170
test eax, eax
je 0x403fcf
push 1
push 0
push 0xffffffffffffffff
push edi
push eax
call fcn.00477510
inc dword [esp + 0x2c]
jmp 0x403bf9
cmp word [0x4c8d40], 0
je 0x403a38
mov eax, 0x4c8d40
lea edx, [eax + 2]
jmp 0x403b20
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403b20
sub eax, edx
sar eax, 1
mov ebx, eax
lea edi, [ebx + ebx]
lea eax, [edi + 2]
call fcn.004719f0
mov esi, eax
test esi, esi
jne 0x403b5b
push 0x4c8d40
push str.Out_of_memory.
mov ecx, 0x4c9718
call fcn.0042e650
jmp 0x403a3d
test ebx, ebx
je 0x403b6e
push edi
push 0x4c8d40
push esi
call fcn.00495f80
add esp, 0xc
xor edx, edx
mov word [edi + esi], dx
jmp 0x403a3d
push 0x4a18f0
push edi
call fcn.0048dbf9
add esp, 8
test eax, eax
je 0x403bf4
push str._restart
push edi
call fcn.0048dbf9
add esp, 8
test eax, eax
je 0x403bf4
push 0x4a190c
push edi
call fcn.0048dbf9
add esp, 8
test eax, eax
je 0x403beb
push str._force
push edi
call fcn.0048dbf9
add esp, 8
test eax, eax
je 0x403beb
push str._ErrorStdOut
push edi
call fcn.0048dbf9
add esp, 8
test eax, eax
jne 0x403bdc
mov byte [0x4ca1f7], 1
jmp 0x403bf9
dec ebx
lea eax, [ebx + 1]
mov byte [esp + 0x2a], 1
mov dword [esp + 0x34], eax
jmp 0x403bf9
mov byte [0x4c8659], 1
jmp 0x403bf9
mov byte [esp + 0x30], 1
inc ebx
cmp ebx, dword [0x4c6244]
jl 0x403a70
lea ecx, [esp + 0x2b]
push ecx
push 3
lea edx, [esp + 0x40]
push edx
push 0
push 0x4a18e4
mov ecx, 0x4c9718
call fcn.00421ec0
test eax, eax
jne 0x403c4e
cmp byte [esp + 0x2b], al
mov ecx, dword [esp + 0x38]
setne al
inc eax
push eax
push ecx
push 0x4a18e4
push 0x4c9718
xor ecx, ecx
call fcn.00422170
test eax, eax
je 0x403fcf
cmp byte [eax + 0x17], 0
jne 0x403c59
mov esi, dword [eax + 0xc]
jmp 0x403c5b
mov esi, eax
mov al, byte [esi + 0x15]
test al, 2
je 0x403c71
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x2c]
dec eax
cdq
mov dword [esi], eax
mov al, byte [esi + 0x15]
and al, 0x9b
or al, 0x18
mov dword [esi + 4], edx
mov byte [esi + 0x15], al
jns 0x403c95
mov eax, esi
call fcn.00401160
and byte [esi + 0x15], 0x8f
jmp 0x403cba
cmp dword [0x4c8698], 0
je 0x403ca2
test al, 0x10
jne 0x403caf
cmp dword [0x4c869c], 0
je 0x403cba
test al, 0x20
je 0x403cba
test al, 8
je 0x403cba
mov eax, esi
call fcn.00401160
lea ecx, [esp + 0x2a]
push ecx
push 0xc1
lea edx, [esp + 0x34]
push edx
push 6
push str.A_Args
mov ecx, 0x4c9718
call fcn.00421ec0
test eax, eax
jne 0x403d05
cmp byte [esp + 0x2a], al
mov ecx, dword [esp + 0x2c]
setne al
inc eax
or eax, 0xc0
push eax
push ecx
push str.A_Args
push 0x4c9718
mov ecx, 6
call fcn.00422170
mov esi, eax
test esi, esi
je 0x403fcf
mov ebx, dword [0x4c6244]
mov eax, dword [esp + 0x34]
mov edx, dword [0x4c624c]
sub ebx, eax
lea eax, [edx + eax*4]
push eax
call fcn.0046daf0
add esp, 4
test eax, eax
je 0x403fcf
mov edi, eax
mov ecx, esi
call fcn.00477840
call fcn.00403880
mov ecx, dword [esp + 0x30]
push ecx
push 0x4c9718
call fcn.00415ec0
cmp eax, 1
jne 0x403fcf
mov esi, dword [0x4c4a14]
mov ecx, 0x42
mov edi, 0x4c7170
rep movsd dword es:[edi], dword [esi]
mov edi, 0x4c9718
call fcn.00416c40
cmp eax, 0xffffffff
je 0x403fcf
test eax, eax
je 0x403fc4
mov eax, dword [0x4c8688]
test eax, eax
jne 0x403dcc
mov edx, dword [0x4c5b28]
cmp word [edx], ax
jne 0x403dc0
cmp dword [0x4c8fa8], eax
jne 0x403dc0
cmp dword [0x4c8668], eax
jne 0x403dc0
cmp dword [0x4c866c], eax
jne 0x403dc0
cmp byte [0x4c868c], al
je 0x403e43
mov dword [0x4c8688], 1
jmp 0x403dd1
cmp eax, 4
je 0x403e43
cmp byte [esp + 0x30], 0
jne 0x403e4e
cmp byte [0x4c8659], 0
jne 0x403ecf
mov eax, dword [0x4ca1f0]
push eax
push str.AutoHotkey
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x403ecf
mov eax, dword [0x4c8688]
cmp eax, 3
je 0x403fc4
cmp eax, 2
je 0x403e3c
fldz
mov ecx, dword [0x4ca1e4]
sub esp, 8
fstp qword [esp]
push 0
push ecx
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.00479090
add esp, 0x18
cmp eax, 7
je 0x403fc4
mov eax, 0x407
jmp 0x403e6b
cmp byte [esp + 0x30], 0
je 0x403ecf
mov edx, dword [0x4ca1f0]
push edx
push str.AutoHotkey
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x403ecf
mov eax, 0x406
push 0
push eax
push 0x44
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
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 0x403ecb
mov edi, edi
cmp esi, 0x64
jne 0x403ebb
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.00479090
add esp, 0x18
cmp eax, 7
je 0x403fcf
xor esi, esi
push 0x14
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x403e90
push 0x64
call ebx
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoW]
push 0
push 0x4c7064
push 0
push 0x2000
call esi
test eax, eax
je 0x403eff
cmp dword [0x4c7064], 0
je 0x403eff
push 2
push 0
push 0
push 0x2001
call esi
push 0x4c9718
call fcn.004160d0
cmp eax, 1
jne 0x403fcf
push 0
push 4
push 0
call fcn.0048e1ad
add eax, 0x20
push eax
call fcn.0048e0b7
mov esi, dword [0x4c4920]
add esp, 0x10
test esi, esi
je 0x403f57
imul esi, esi, 0xd4
push esi
call fcn.0048dc84
add esp, 4
mov dword [0x4c8f4c], eax
test eax, eax
je 0x403f57
push esi
push 0
push eax
call fcn.00496ad0
add esp, 0xc
cmp byte [0x4ca3d2], 0
jne 0x403f7b
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x3c], 8
mov dword [esp + 0x40], 0x1ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.00409cd0
push 3
push 0
push str.Clipboard
mov ecx, 0x4c9718
mov byte [0x4ca1f4], 1
mov byte [0x4c8d35], 0
call fcn.00421e60
test eax, eax
je 0x403faa
call fcn.004039c0
push 0x4c9718
call fcn.004166b0
test eax, eax
je 0x403fcf
push 0
push 0xa
call fcn.004013d0
add esp, 8
xor eax, eax
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