Function at 0x4040f0
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 0x4efa90
mov dword [0x4f0bcc], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4f13e0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x404206
mov byte [0x4f13e0], al
mov eax, 0x4d6959
mov dword [0x4f13dc], eax
mov eax, dword [0x4eeaa4]
mov ebx, 1
mov byte [esp + 0xe], 0
mov byte [esp + 0xd], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], eax
cmp eax, ebx
jle 0x40438c
jmp 0x404170
cmp byte [esp + 0xd], 0
mov ecx, dword [0x4eeaa8]
mov esi, dword [ecx + ebx*4]
je 0x404272
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x24]
push 0x4d69cc
push eax
call fcn.004ba66c
add esp, 0xc
cmp byte [esp + 0x20], 0
mov edi, eax
je 0x404713
lea ecx, [esp + 0xf]
push ecx
push 3
lea edx, [esp + 0x20]
push edx
push edi
lea eax, [esp + 0x30]
push eax
mov ecx, 0x4f1cd8
call fcn.00421180
test eax, eax
jne 0x4041f0
mov edx, dword [esp + 0x18]
xor ecx, ecx
cmp byte [esp + 0xf], cl
setne cl
inc ecx
push ecx
push edx
push 0x4f1cd8
mov ecx, edi
lea edx, [esp + 0x2c]
call fcn.00421420
test eax, eax
je 0x404713
push 1
push 0
push 0xffffffffffffffff
push esi
push eax
call fcn.004a5c20
inc dword [esp + 0x10]
jmp 0x40437f
cmp byte [0x4f13e0], 0
je 0x404134
mov eax, 0x4f13e0
lea edx, [eax + 1]
jmp 0x404220
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404220
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
call fcn.0049b110
mov esi, eax
test esi, esi
jne 0x404254
push 0x4f13e0
push str.Out_of_memory.
mov ecx, 0x4f1cd8
call fcn.00473b40
xor eax, eax
jmp 0x404139
test edi, edi
je 0x404267
push edi
push 0x4f13e0
push esi
call fcn.004c3030
add esp, 0xc
mov byte [esi + edi], 0
mov eax, esi
jmp 0x404139
push 0x4d69d0
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
test eax, eax
jne 0x4042a9
push 0x4d69d0
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
jmp 0x40437f
push str.__3_8
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
test eax, eax
jne 0x4042e0
push 0x4d69d0
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
jmp 0x40437f
push 0x4d69f4
push esi
call fcn.004ba135
add esp, 8
test eax, eax
je 0x40437a
push 0x4d69f8
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
test eax, eax
je 0x40437a
push 0x4d6a0c
push esi
call fcn.004ba135
add esp, 8
test eax, eax
je 0x404371
push 0x4d6a10
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
test eax, eax
je 0x404371
push 0x4d6a20
call fcn.0049be50
add esp, 4
push eax
push esi
call fcn.004ba135
add esp, 8
test eax, eax
jne 0x404362
mov byte [0x4f22ef], 1
jmp 0x40437f
dec ebx
lea eax, [ebx + 1]
mov byte [esp + 0xd], 1
mov dword [esp + 0x14], eax
jmp 0x40437f
mov byte [0x4f0cf9], 1
jmp 0x40437f
mov byte [esp + 0xe], 1
inc ebx
cmp ebx, dword [0x4eeaa4]
jl 0x404170
lea ecx, [esp + 0xf]
push ecx
push 3
lea edx, [esp + 0x20]
push edx
push 0
push 0x4d69c8
mov ecx, 0x4f1cd8
call fcn.00421180
test eax, eax
jne 0x4043cc
cmp byte [esp + 0xf], al
mov ecx, dword [esp + 0x18]
setne al
mov edx, 0x4d69c8
inc eax
push eax
push ecx
push 0x4f1cd8
xor ecx, ecx
call fcn.00421420
mov ecx, eax
test ecx, ecx
je 0x404713
mov eax, dword [esp + 0x10]
dec eax
cdq
push 0x18
push edx
push eax
mov eax, ecx
call fcn.00401570
push 0x4d6a38
call fcn.0049be50
mov esi, eax
add esp, 4
cmp byte [esi], 0
je 0x404713
lea edx, [esp + 0xf]
push edx
push 0xc1
lea eax, [esp + 0x20]
push eax
push 6
push esi
mov ecx, 0x4f1cd8
call fcn.00421180
test eax, eax
jne 0x404444
mov edx, dword [esp + 0x18]
xor ecx, ecx
cmp byte [esp + 0xf], cl
setne cl
inc ecx
or ecx, 0xc0
push ecx
push edx
push 0x4f1cd8
lea ecx, [eax + 6]
mov edx, esi
call fcn.00421420
mov esi, eax
test esi, esi
je 0x404713
mov eax, dword [esp + 0x14]
mov ecx, dword [0x4eeaa8]
mov ebx, dword [0x4eeaa4]
lea edx, [ecx + eax*4]
sub ebx, eax
push edx
call fcn.004973c0
add esp, 4
test eax, eax
je 0x404713
mov edi, eax
mov ecx, esi
call fcn.004a5f60
call fcn.00403f80
mov bl, byte [esp + 0xe]
push 0x4f1cd8
mov al, bl
call fcn.0041c2b0
cmp eax, 1
jne 0x404713
mov esi, dword [0x4ec48c]
mov ecx, 0x3a
mov edi, 0x4ef870
mov eax, 0x4f1cd8
rep movsd dword es:[edi], dword [esi]
call fcn.0046af60
cmp eax, 0xffffffff
je 0x404713
cmp dword [0x4f33d0], 0
je 0x4044d7
mov eax, dword [0x4f33f8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
test eax, eax
je 0x404708
mov eax, dword [0x4f0d28]
test eax, eax
jne 0x404527
mov eax, dword [0x4ec518]
cmp word [eax], 0
jne 0x40451b
cmp dword [0x4f1544], 0
jne 0x40451b
cmp dword [0x4f0d08], 0
jne 0x40451b
cmp dword [0x4f0d0c], 0
jne 0x40451b
cmp byte [0x4f0d2c], 0
je 0x4045a5
mov dword [0x4f0d28], 1
jmp 0x40452c
cmp eax, 4
je 0x4045a5
test bl, bl
jne 0x4045ad
cmp byte [0x4f0cf9], bl
jne 0x404638
mov ecx, dword [0x4f22e8]
mov edx, dword [0x4f3cfc]
push ecx
push edx
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x404638
mov eax, dword [0x4f0d28]
cmp eax, 3
je 0x404708
cmp eax, 2
je 0x40459e
fldz
mov eax, dword [0x4f22dc]
sub esp, 8
fstp qword [esp]
push 0
push eax
push 4
push 0x4d6a48
call fcn.0049be50
add esp, 4
push eax
call fcn.004a77b0
add esp, 0x18
cmp eax, 7
je 0x404708
mov eax, 0x407
jmp 0x4045cc
test bl, bl
je 0x404638
mov ecx, dword [0x4f22e8]
mov edx, dword [0x4f3cfc]
push ecx
push edx
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x404638
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 0x404634
nop
cmp esi, 0x64
jne 0x404624
fldz
sub esp, 8
fstp qword [esp]
push 0
push 0
push 4
push 0x4d6ae8
call fcn.0049be50
add esp, 4
push eax
call fcn.004a77b0
add esp, 0x18
cmp eax, 7
je 0x404713
xor esi, esi
push 0x14
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4045f0
push 0x64
call ebx
call fcn.004a84d0
push 0x4f1cd8
call fcn.0041c530
cmp eax, 1
jne 0x404713
push 0
push 4
push 0
call fcn.004ba7fb
add eax, 0x20
push eax
call fcn.004ba705
mov esi, dword [0x4ec470]
add esp, 0x10
test esi, esi
je 0x404692
imul esi, esi, 0x70
push esi
call fcn.004ba2ed
add esp, 4
mov dword [0x4f14e8], eax
test eax, eax
je 0x404692
push esi
push 0
push eax
call fcn.004c16a0
add esp, 0xc
cmp byte [0x4f24aa], 0
jne 0x4046b6
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 8
mov dword [esp + 0x20], 0x1ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.0040a0c0
push 3
push 0
push 0x4d6b38
mov byte [0x4f22ec], 1
mov byte [0x4f13d5], 0
call fcn.0049be50
add esp, 4
push eax
mov ecx, 0x4f1cd8
call fcn.00421120
test eax, eax
je 0x4046ee
call fcn.004040c0
push 0x4f1cd8
call fcn.0041cb30
test eax, eax
je 0x404713
push 0
push 0xa
call fcn.00401910
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