Function at 0x403660
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, dword [ebp + 8]
sub esp, 0x34
push ebx
push esi
push edi
push 0x4a1b08
mov dword [0x4a2c28], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4a3438
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x403767
mov byte [0x4a3438], al
mov esi, 0x4927f1
mov ebx, 1
mov dword [0x4a353c], esi
mov byte [esp + 0x12], 0
mov byte [esp + 0x11], 0
mov dword [esp + 0x14], ebx
cmp dword [0x4a0ae4], ebx
jle 0x403854
jmp 0x4036d0
cmp byte [esp + 0x11], 0
mov ecx, dword [0x4a0ae8]
mov edi, dword [ecx + ebx*4]
je 0x4037ce
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x24]
push 0x492838
push eax
call fcn.0047f2f8
add esp, 0xc
cmp byte [esp + 0x20], 0
mov esi, eax
je 0x4038a5
lea ecx, [esp + 0x13]
push ecx
push 3
lea edx, [esp + 0x20]
push edx
push esi
lea eax, [esp + 0x30]
push eax
mov ecx, 0x4a4c80
call fcn.0041f970
test eax, eax
jne 0x403750
mov edx, dword [esp + 0x18]
xor ecx, ecx
cmp byte [esp + 0x13], cl
setne cl
inc ecx
push ecx
push edx
push 0x4a4c80
mov ecx, esi
lea edx, [esp + 0x2c]
call fcn.0041fc00
test eax, eax
je 0x4038a5
push 1
push 0
push 0xffffffffffffffff
push edi
mov ecx, eax
call fcn.0046f180
inc dword [esp + 0x14]
jmp 0x403847
cmp byte [0x4a3438], 0
je 0x40369c
mov eax, 0x4a3438
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403780
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
call fcn.00469c60
mov esi, eax
test esi, esi
jne 0x4037b2
push 0x4a3438
push str.Out_of_memory.
mov ecx, 0x4a4c80
call fcn.0042d140
jmp 0x4036a1
test edi, edi
je 0x4037c5
push edi
push 0x4a3438
push esi
call fcn.00487530
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x4036a1
push 0x49283c
push edi
call fcn.0047edc1
add esp, 8
test eax, eax
je 0x403842
push str._restart
push edi
call fcn.0047edc1
add esp, 8
test eax, eax
je 0x403842
push 0x49284c
push edi
call fcn.0047edc1
add esp, 8
test eax, eax
je 0x403839
push str._force
push edi
call fcn.0047edc1
add esp, 8
test eax, eax
je 0x403839
push str._ErrorStdOut
push edi
call fcn.0047edc1
add esp, 8
test eax, eax
jne 0x403831
mov byte [0x4a5258], 1
jmp 0x403847
mov byte [esp + 0x11], 1
dec ebx
jmp 0x403847
mov byte [0x4a2d51], 1
jmp 0x403847
mov byte [esp + 0x12], 1
inc ebx
cmp ebx, dword [0x4a0ae4]
jl 0x4036d0
lea eax, [esp + 0x13]
push eax
push 3
lea ecx, [esp + 0x20]
push ecx
push 0
push 0x492868
mov ecx, 0x4a4c80
call fcn.0041f970
test eax, eax
jne 0x40389a
mov eax, dword [esp + 0x18]
xor edx, edx
cmp byte [esp + 0x13], dl
setne dl
xor ecx, ecx
inc edx
push edx
push eax
push 0x4a4c80
mov edx, 0x492868
call fcn.0041fc00
test eax, eax
je 0x4038a5
cmp byte [eax + 0x17], 0
jne 0x4038b3
mov esi, dword [eax + 0xc]
jmp 0x4038b5
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, eax
mov al, byte [esi + 0x15]
test al, 2
je 0x4038cb
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
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 0x4038ef
mov eax, esi
call fcn.00401150
and byte [esi + 0x15], 0x8f
jmp 0x403914
cmp dword [0x4a2d8c], 0
je 0x4038fc
test al, 0x10
jne 0x403909
cmp dword [0x4a2d90], 0
je 0x403914
test al, 0x20
je 0x403914
test al, 8
je 0x403914
mov eax, esi
call fcn.00401150
call fcn.004034f0
mov bl, byte [esp + 0x12]
push 0x4a4c80
mov al, bl
call fcn.004148c0
cmp eax, 1
jne 0x4038a5
mov esi, dword [0x49f440]
mov ecx, 0x3a
mov edi, 0x4a18f0
rep movsd dword es:[edi], dword [esi]
mov edi, 0x4a4c80
call fcn.004156e0
cmp eax, 0xffffffff
je 0x4038a5
test eax, eax
je 0x403bfd
mov eax, dword [0x4a2d7c]
test eax, eax
jne 0x4039a7
mov eax, dword [0x4a059c]
cmp word [eax], 0
jne 0x40399b
cmp dword [0x4a4534], 0
jne 0x40399b
cmp dword [0x4a2d60], 0
jne 0x40399b
cmp dword [0x4a2d64], 0
jne 0x40399b
cmp byte [0x4a2d53], 0
je 0x403a1b
mov dword [0x4a2d7c], 1
jmp 0x4039ac
cmp eax, 4
je 0x403a1b
test bl, bl
jne 0x403a23
cmp byte [0x4a2d51], bl
jne 0x403aa1
mov ecx, dword [0x4a5250]
push ecx
push str.AutoHotkey
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x403aa1
mov eax, dword [0x4a2d7c]
cmp eax, 3
je 0x403bfd
cmp eax, 2
je 0x403a14
fldz
mov edx, dword [0x4a5244]
push 0
sub esp, 8
fstp qword [esp]
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.00470ca0
add esp, 0x18
cmp eax, 7
je 0x403bfd
mov eax, 0x407
jmp 0x403a3f
test bl, bl
je 0x403aa1
mov eax, dword [0x4a5250]
push eax
push str.AutoHotkey
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x403aa1
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 0x403a9d
cmp esi, 0x64
jne 0x403a8d
fldz
push 0
sub esp, 8
fstp qword [esp]
push 0
push 4
push str.Could_not_close_the_previous_instance_of_this_script.__Keep_waiting_
call fcn.00470ca0
add esp, 0x18
cmp eax, 7
je 0x4038a5
xor esi, esi
push 0x14
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x403a62
push 0x64
call ebx
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
push 0
push 0x4a1804
push 0
push 0x2000
call esi
test eax, eax
je 0x403ad1
cmp dword [0x4a1804], 0
je 0x403ad1
push 2
push 0
push 0
push 0x2001
call esi
push 0x4a4c80
call fcn.00414be0
cmp eax, 1
jne 0x4038a5
push 0
push 4
push 0
call fcn.0047f472
add eax, 0x20
push eax
call fcn.0047f37c
mov esi, dword [0x49f3a8]
add esp, 0x10
test esi, esi
je 0x403b26
imul esi, esi, 0x70
push esi
call fcn.0047ef79
add esp, 4
mov dword [0x4a3544], eax
test eax, eax
je 0x403b26
push esi
push 0
push eax
call fcn.00488100
add esp, 0xc
cmp byte [0x4a547b], 0
jne 0x403b69
push str.InitCommonControlsEx
push str.comctl32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x403b63
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 8
mov dword [esp + 0x20], 0x1ff
call eax
jmp 0x403b69
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00409300
lea edx, [esp + 0x13]
push edx
push 3
lea eax, [esp + 0x20]
push eax
push 0
push str.Clipboard
mov ecx, 0x4a4c80
mov byte [0x4a5254], 1
call fcn.0041f970
test eax, eax
jne 0x403bbb
mov edx, dword [esp + 0x18]
xor ecx, ecx
cmp byte [esp + 0x13], cl
setne cl
inc ecx
push ecx
push edx
push 0x4a4c80
xor ecx, ecx
mov edx, str.Clipboard
call fcn.0041fc00
test eax, eax
je 0x403bdf
cmp byte [eax + 0x17], 0
jne 0x403bc6
mov esi, dword [eax + 0xc]
jmp 0x403bc8
mov esi, eax
test byte [esi + 0x15], 0x80
jne 0x403bdf
mov eax, esi
call fcn.00401150
mov al, byte [esi + 0x15]
and al, 0xf
or al, 0x80
mov byte [esi + 0x15], al
push 0x4a4c80
call fcn.00415150
test eax, eax
je 0x4038a5
push 0
push 0xa
call fcn.004012a0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10