Function at 0x404508
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x420d78
call fcn.00417d40
sub esp, 0x48
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x168], 1
jne 0x4049c1
mov ecx, dword [ebx + 0x154]
call fcn.00407869
fst dword [ebp - 0x18]
push ecx
mov ecx, dword [ebx + 0x15c]
fstp dword [esp]
call fcn.00405faa
mov ecx, ebx
call fcn.00404a8d
mov ecx, dword [ebx + 0x154]
call fcn.00407823
test eax, eax
je 0x4049c1
fld dword [ebp - 0x18]
fcomp qword [0x424c18]
fnstsw ax
sahf
jbe 0x40496d
push ecx
lea ecx, [ebx + 0x16c]
mov eax, esp
mov dword [ebp - 0x2c], esp
push eax
call fcn.00404f5d
mov ecx, ebx
call fcn.00403bf0
xor edi, edi
cmp dword [ebx + 0xd0], edi
jle 0x404940
cmp byte [ebx + 0x1b8], 0
jne 0x40496d
mov eax, dword [ebx + 0xcc]
mov ecx, dword [ebx + 0x158]
lea esi, [ebx + 0xcc]
push dword [eax]
call fcn.0040a88f
test al, al
je 0x4049c1
mov ecx, dword [ebx + 0x15c]
push dword [esi]
add ecx, 0x6d8
call fcn.00417c08
mov eax, dword [ebx + 0x158]
mov ecx, dword [ebx + 0x15c]
add ecx, 0x6dc
mov eax, dword [eax + 0x34]
add eax, 0x1c
push eax
call fcn.00417c08
push 1
push edi
lea ecx, [ebx + 0xc8]
call sub.MFC42.DLL_CStringArray::RemoveAt
mov eax, dword [ebx + 0x158]
lea ecx, [ebp - 0x20]
mov eax, dword [eax + 0x34]
add eax, 0x20
push eax
call fcn.00417bfc
push 0x42d150
push str..exe
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CString::Replace
mov edi, str._GLDIR_
lea eax, [ebp - 0x24]
mov esi, 0x431ad0
push edi
push eax
mov ecx, esi
call fcn.00408a36
lea eax, [ebp - 0x24]
push 0x42d210
push eax
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 1
call sub.MFC42.DLL_operator
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
push ecx
push eax
lea eax, [ebp - 0x1c]
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x1c]
mov byte [ebp - 4], 5
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4047f3
and dword [ebp - 0x18], 0
push 7
push 0
push 0x42d200
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.00404cba
test eax, eax
jl 0x4047d9
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.00403975
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 7
call fcn.00403a49
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 8
test eax, eax
jne 0x4046e6
push 0x80004003
call fcn.004180b6
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0xe]
lea esi, [ebp - 0x40]
push edx
mov ecx, dword [eax]
sub esp, 0x10
mov dword [ebp - 0x2c], eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call dword [ecx + 0xe8]
test eax, eax
jge 0x404714
push 0x42d1f0
push dword [ebp - 0x2c]
push eax
call fcn.004180c4
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 7
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jge 0x40472c
push eax
call fcn.004180b6
mov ecx, dword [ebp - 0x30]
mov byte [ebp - 4], 6
test ecx, ecx
je 0x40473c
call fcn.004039fc
cmp word [ebp - 0xe], 0xffff
jne 0x4047d4
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push str._Glsetup2_Directorys_Directory
call fcn.00403975
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x18]
push eax
mov byte [ebp - 4], 6
call fcn.00404ca4
mov ecx, eax
call fcn.00403a9b
push str.Name
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xa
call fcn.00404ca4
mov ecx, eax
call fcn.00403b37
push ecx
dec eax
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00404ca4
mov ecx, eax
call fcn.00403b02
lea eax, [ebp - 0x30]
push eax
call fcn.004099aa
add esp, 0xc
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call fcn.00417c08
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 6
test eax, eax
je 0x4047d4
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, 0x431ad0
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 5
test eax, eax
je 0x4048cf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4048cf
mov eax, dword [ebx + 0x158]
mov eax, dword [eax + 0x34]
mov ecx, dword [eax + 0x2c]
add eax, 0x24
mov dword [ebp - 0x30], ecx
push eax
lea ecx, [ebp - 0x14]
call fcn.00417c08
cmp dword [ebp - 0x30], 0
je 0x40483b
push dword [ebp - 0x14]
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.00408a36
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xc
call fcn.00417c08
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x30]
jmp 0x4048ca
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push str.SoftwareGloballinkGameShare
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40489d
push 0
push 0
push 0x42d184
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
jmp 0x4049c1
lea eax, [ebp - 0x30]
push edi
push eax
mov ecx, esi
call fcn.00408a36
push dword [ebp - 0x14]
mov byte [ebp - 4], 0xd
push dword [eax]
lea eax, [ebp - 0x14]
push str._sGame_s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CString::CString
push dword [ebp - 0x14]
mov ecx, esi
call fcn.00408ac3
mov ecx, dword [ebx + 0x158]
call fcn.00407dc3
push dword [ebx + 0x164]
mov ecx, dword [ebx + 0x154]
push dword [ebx + 0x158]
call fcn.0040777b
mov eax, dword [ebx + 0x15c]
push 0
push 0
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
jmp 0x40496d
fld1
push ecx
mov ecx, dword [ebx + 0x15c]
fstp dword [esp]
call fcn.00405faa
mov ecx, dword [ebx + 0x15c]
push 3
pop esi
push esi
call fcn.00406074
mov ecx, ebx
mov dword [ebx + 0x168], esi
call fcn.0040428b
mov al, byte [ebp - 0xd]
push 0
lea ecx, [ebp - 0x54]
mov byte [ebp - 0x54], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
and byte [ebp - 0x44], 0
mov ecx, dword [ebx + 0x154]
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 4], 0xe
call fcn.0040788f
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x4049a4
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, dword [ebx + 0x15c]
push 0
push eax
call fcn.00406086
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x54]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret