Function at 0x404537
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x420c98
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x48
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x168], 1
jne 0x4049f0
mov ecx, dword [ebx + 0x154]
call fcn.00407a89
fst dword [ebp - 0x18]
push ecx
mov ecx, dword [ebx + 0x15c]
fstp dword [esp]
call fcn.00405fc1
mov ecx, ebx
call fcn.00404abc
mov ecx, dword [ebx + 0x154]
call fcn.00407a43
test eax, eax
je 0x4049f0
fld dword [ebp - 0x18]
fcomp qword [0x424c28]
fnstsw ax
sahf
jbe 0x40499c
push ecx
lea ecx, [ebx + 0x16c]
mov eax, esp
mov dword [ebp - 0x2c], esp
push eax
call fcn.00404f6e
mov ecx, ebx
call fcn.00403c1f
xor edi, edi
cmp dword [ebx + 0xd0], edi
jle 0x40496f
cmp byte [ebx + 0x1b8], 0
jne 0x40499c
mov eax, dword [ebx + 0xcc]
mov ecx, dword [ebx + 0x158]
lea esi, [ebx + 0xcc]
push dword [eax]
call fcn.0040a9fc
test al, al
je 0x4049f0
mov ecx, dword [ebx + 0x15c]
push dword [esi]
add ecx, 0x6d8
call fcn.00417b62
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.00417b62
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.00417b56
push 0x42c138
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, 0x430ac0
push edi
push eax
mov ecx, esi
call fcn.00408c35
lea eax, [ebp - 0x24]
push 0x42c1f8
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 0x404822
and dword [ebp - 0x18], 0
push 7
push 0
push 0x42c1e8
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.00404cf6
test eax, eax
jl 0x404808
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.004039a4
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 7
call fcn.00403a78
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 8
test eax, eax
jne 0x404715
push 0x80004003
call fcn.00417ff8
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 0x404743
push 0x42c1d8
push dword [ebp - 0x2c]
push eax
call fcn.00418006
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 7
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jge 0x40475b
push eax
call fcn.00417ff8
mov ecx, dword [ebp - 0x30]
mov byte [ebp - 4], 6
test ecx, ecx
je 0x40476b
call fcn.00403a2b
cmp word [ebp - 0xe], 0xffff
jne 0x404803
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push str._Glsetup2_Directorys_Directory
call fcn.004039a4
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x18]
push eax
mov byte [ebp - 4], 6
call fcn.00404ce0
mov ecx, eax
call fcn.00403aca
push str.Name
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xa
call fcn.00404ce0
mov ecx, eax
call fcn.00403b66
push ecx
dec eax
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00404ce0
mov ecx, eax
call fcn.00403b31
lea eax, [ebp - 0x30]
push eax
call fcn.00409aec
add esp, 0xc
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call fcn.00417b62
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 0x404803
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, 0x430ac0
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 5
test eax, eax
je 0x4048fe
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4048fe
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.00417b62
cmp dword [ebp - 0x30], 0
je 0x40486a
push dword [ebp - 0x14]
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.00408c35
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xc
call fcn.00417b62
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x30]
jmp 0x4048f9
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 0x4048cc
push 0
push 0
push 0x42c16c
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 0x4049f0
lea eax, [ebp - 0x30]
push edi
push eax
mov ecx, esi
call fcn.00408c35
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.00408cc2
mov ecx, dword [ebx + 0x158]
call fcn.00407fe2
push dword [ebx + 0x164]
mov ecx, dword [ebx + 0x154]
push dword [ebx + 0x158]
call fcn.0040799b
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 0x40499c
fld1
push ecx
mov ecx, dword [ebx + 0x15c]
fstp dword [esp]
call fcn.00405fc1
mov ecx, dword [ebx + 0x15c]
push 3
pop esi
push esi
call fcn.0040608b
mov ecx, ebx
mov dword [ebx + 0x168], esi
call fcn.004042ba
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.00407aaf
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x4049d3
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.0040609d
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