Function at 0x40d190
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454c00
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x47f060]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 6
xor eax, eax
push str.nofile
lea ecx, [ebp - 0x450]
mov dword [ebp - 0x43c], 7
mov dword [ebp - 0x440], 0
mov word [ebp - 0x450], ax
call fcn.00406c00
xor eax, eax
push 0x206
mov dword [ebp - 4], 0
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR110.dll_memset
mov eax, dword [0x4826e0]
add esp, 0xc
test al, 1
jne 0x40d22f
or eax, 1
push 0x45ae80
mov dword [0x4826e0], eax
call fcn.004521b7
add esp, 4
push str.main
push 0x4822d0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
test eax, eax
je 0x40d2e1
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call sub.MSVCR110.dll_memset
mov eax, dword [0x482720]
add esp, 0xc
test al, 1
jne 0x40d29d
or eax, 1
push 0x45aeb0
mov dword [0x482720], eax
call fcn.004521b7
add esp, 4
push 0x14
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00443950
lea eax, [ebp - 0x420]
push str.0.0.0
push eax
call dword [sym.imp.MSVCR110.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x40d431
push 7
push str.nullver
lea ecx, [ebp - 0x450]
call fcn.00406c00
xor eax, eax
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
mov byte [ebp - 4], 1
mov eax, dword [0x48277c]
test eax, eax
jne 0x40d33b
push 0xe4
call dword [sym.imp.MSVCR110.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [ebp - 0x454], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x40d330
mov ecx, eax
call fcn.004122b0
jmp 0x40d332
xor eax, eax
mov byte [ebp - 4], 1
mov dword [0x48277c], eax
cmp byte [eax + 0xde], 0
lea eax, [ebp - 0x450]
lea ecx, [ebp - 0x470]
push eax
mov edx, str.upgrade_
jne 0x40d35b
mov edx, str.install_
call fcn.00411570
mov edi, eax
lea eax, [ebp - 0x438]
add esp, 4
cmp eax, edi
je 0x40d3a8
cmp dword [ebp - 0x424], 8
jb 0x40d383
push dword [ebp - 0x438]
call esi
add esp, 4
xor eax, eax
push edi
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], eax
mov word [ebp - 0x438], ax
call fcn.004066d0
cmp dword [ebp - 0x45c], 8
jb 0x40d3bc
push dword [ebp - 0x470]
call esi
add esp, 4
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x454], esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x438]
push eax
call fcn.00406870
sub esp, 0x18
mov ecx, esp
mov byte [ebp - 4], 3
push 0x11
xor eax, eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.inst.invalid.main
mov word [ecx], ax
call fcn.00406c00
mov byte [ebp - 4], 1
call fcn.0040ced0
add esp, 0x30
cmp dword [ebp - 0x424], 8
jb 0x40d431
push dword [ebp - 0x438]
call esi
add esp, 4
cmp dword [ebp - 0x43c], 8
jb 0x40d445
push dword [ebp - 0x450]
call esi
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00452076
mov esp, ebp
pop ebp
ret