Function at 0x403520
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 0x4c0da0
mov dword [0x4c1ec0], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4c26d0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x403625
xor ecx, ecx
mov word [0x4c26d0], cx
mov esi, 0x4a6b2c
mov ebx, 1
mov dword [0x4c28d8], esi
mov byte [esp + 0x34], 0
mov byte [esp + 0x2e], 0
mov dword [esp + 0x30], ebx
cmp dword [0x4bfbe4], ebx
jle 0x40371f
lea ebx, [ebx]
cmp byte [esp + 0x2e], 0
mov eax, dword [0x4bfbec]
mov edi, dword [eax + ebx*4]
je 0x403699
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x44]
push 0x49c878
push edx
call fcn.00489223
add esp, 0xc
cmp word [esp + 0x40], 0
mov esi, eax
je 0x403770
lea eax, [esp + 0x2f]
push eax
push 3
lea ecx, [esp + 0x40]
push ecx
push esi
lea edx, [esp + 0x50]
push edx
mov ecx, 0x4c4040
call fcn.00420890
test eax, eax
jne 0x40360e
cmp byte [esp + 0x2f], al
mov ecx, dword [esp + 0x38]
setne al
lea edx, [esp + 0x40]
inc eax
push eax
push ecx
push 0x4c4040
mov ecx, esi
call fcn.00420b30
test eax, eax
je 0x403770
push 1
push 0
push 0xffffffffffffffff
push edi
mov ecx, eax
call fcn.00472b80
inc dword [esp + 0x30]
jmp 0x403712
cmp word [0x4c26d0], 0
je 0x403560
mov eax, 0x4c26d0
lea edx, [eax + 2]
jmp 0x403640
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403640
sub eax, edx
sar eax, 1
mov ebx, eax
lea edi, [ebx + ebx]
lea eax, [edi + 2]
call fcn.0046d560
mov esi, eax
test esi, esi
jne 0x40367b
push 0x4c26d0
push str.Out_of_memory.
mov ecx, 0x4c4040
call fcn.0042f750
jmp 0x403565
test ebx, ebx
je 0x40368e
push edi
push 0x4c26d0
push esi
call fcn.00490fd0
add esp, 0xc
xor edx, edx
mov word [edi + esi], dx
jmp 0x403565
push 0x49c880
push edi
call fcn.00488e19
add esp, 8
test eax, eax
je 0x40370d
push str._restart
push edi
call fcn.00488e19
add esp, 8
test eax, eax
je 0x40370d
push 0x49c89c
push edi
call fcn.00488e19
add esp, 8
test eax, eax
je 0x403704
push str._force
push edi
call fcn.00488e19
add esp, 8
test eax, eax
je 0x403704
push str._ErrorStdOut
push edi
call fcn.00488e19
add esp, 8
test eax, eax
jne 0x4036fc
mov byte [0x4c4ae0], 1
jmp 0x403712
mov byte [esp + 0x2e], 1
dec ebx
jmp 0x403712
mov byte [0x4c1fe9], 1
jmp 0x403712
mov byte [esp + 0x34], 1
inc ebx
cmp ebx, dword [0x4bfbe4]
jl 0x403590
lea edx, [esp + 0x2f]
push edx
push 3
lea eax, [esp + 0x40]
push eax
push 0
push 0x49c8d0
mov ecx, 0x4c4040
call fcn.00420890
test eax, eax
jne 0x403765
mov edx, dword [esp + 0x38]
xor ecx, ecx
cmp byte [esp + 0x2f], cl
setne cl
inc ecx
push ecx
push edx
push 0x4c4040
xor ecx, ecx
mov edx, 0x49c8d0
call fcn.00420b30
test eax, eax
je 0x403770
cmp byte [eax + 0x17], 0
jne 0x40377e
mov esi, dword [eax + 0xc]
jmp 0x403780
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 0x403796
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 + 0x30]
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 0x4037ba
mov eax, esi
call fcn.00401160
and byte [esi + 0x15], 0x8f
jmp 0x4037df
cmp dword [0x4c2024], 0
je 0x4037c7
test al, 0x10
jne 0x4037d4
cmp dword [0x4c2028], 0
je 0x4037df
test al, 0x20
je 0x4037df
test al, 8
je 0x4037df
mov eax, esi
call fcn.00401160
call fcn.004033b0
mov eax, dword [esp + 0x34]
push eax
push 0x4c4040
call fcn.00415040
cmp eax, 1
jne 0x403770
mov esi, dword [0x4be40c]
mov ecx, 0x42
mov edi, 0x4c0b10
rep movsd dword es:[edi], dword [esi]
mov edi, 0x4c4040
call fcn.00415e50
cmp eax, 0xffffffff
je 0x403770
test eax, eax
je 0x403ad0
mov eax, dword [0x4c2014]
test eax, eax
jne 0x40386d
mov ecx, dword [0x4bf634]
cmp word [ecx], ax
jne 0x403861
cmp dword [0x4c38d0], eax
jne 0x403861
cmp dword [0x4c1ff8], eax
jne 0x403861
cmp dword [0x4c1ffc], eax
jne 0x403861
cmp byte [0x4c1feb], al
je 0x4038e4
mov dword [0x4c2014], 1
jmp 0x403872
cmp eax, 4
je 0x4038e4
cmp byte [esp + 0x34], 0
jne 0x4038ef
cmp byte [0x4c1fe9], 0
jne 0x40396f
mov edx, dword [0x4c4ad8]
push edx
push 0x49c8d4
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x40396f
mov eax, dword [0x4c2014]
cmp eax, 3
je 0x403ad0
cmp eax, 2
je 0x4038dd
fldz
mov eax, dword [0x4c4acc]
push 0
sub esp, 8
fstp qword [esp]
push eax
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.00474670
add esp, 0x18
cmp eax, 7
je 0x403ad0
mov eax, 0x407
jmp 0x40390c
cmp byte [esp + 0x34], 0
je 0x40396f
mov ecx, dword [0x4c4ad8]
push ecx
push 0x49c8d4
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x40396f
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 0x40396b
nop
cmp esi, 0x64
jne 0x40395b
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.00474670
add esp, 0x18
cmp eax, 7
je 0x403770
xor esi, esi
push 0x14
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x403930
push 0x64
call ebx
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoW]
push 0
push 0x4c0a04
push 0
push 0x2000
call esi
test eax, eax
je 0x40399f
cmp dword [0x4c0a04], 0
je 0x40399f
push 2
push 0
push 0
push 0x2001
call esi
push 0x4c4040
call fcn.00415350
cmp eax, 1
jne 0x403770
push 0
push 4
push 0
call fcn.004893b8
add eax, 0x20
push eax
call fcn.004892c2
mov esi, dword [0x4be3d8]
add esp, 0x10
test esi, esi
je 0x4039f7
imul esi, esi, 0xd4
push esi
call fcn.00488ea4
add esp, 4
mov dword [0x4c28e0], eax
test eax, eax
je 0x4039f7
push esi
push 0
push eax
call fcn.00491b20
add esp, 0xc
cmp byte [0x4c4e63], 0
jne 0x403a3a
push str.InitCommonControlsEx
push str.comctl32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x403a34
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x3c], 8
mov dword [esp + 0x40], 0x1ff
call eax
jmp 0x403a3a
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00409610
lea eax, [esp + 0x2f]
push eax
push 3
lea ecx, [esp + 0x40]
push ecx
push 0
push str.Clipboard
mov ecx, 0x4c4040
mov byte [0x4c4adc], 1
call fcn.00420890
test eax, eax
jne 0x403a8c
mov eax, dword [esp + 0x38]
xor edx, edx
cmp byte [esp + 0x2f], dl
setne dl
xor ecx, ecx
inc edx
push edx
push eax
push 0x4c4040
mov edx, str.Clipboard
call fcn.00420b30
test eax, eax
je 0x403ab2
cmp byte [eax + 0x17], 0
jne 0x403a97
mov esi, dword [eax + 0xc]
jmp 0x403a99
mov esi, eax
test byte [esi + 0x15], 0x80
jne 0x403ab2
mov eax, esi
call fcn.00401160
mov cl, byte [esi + 0x15]
and cl, 0xf
or cl, 0x80
mov byte [esi + 0x15], cl
push 0x4c4040
call fcn.004158c0
test eax, eax
je 0x403770
push 0
push 0xa
call fcn.004012b0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10