Function at 0x40e600
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x414ccb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x13c
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov eax, dword [esp + 0x15c]
xor edi, edi
push eax
mov dword [esp + 0x158], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40e65a
lea ecx, [esp + 0x15c]
mov dword [esp + 0x154], 0xffffffff
call fcn.00413760
xor eax, eax
jmp 0x40e815
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CFile::CFile_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x154], 1
call sub.MFC42.DLL_CException::CException
lea ecx, [esp + 0x24]
mov byte [esp + 0x154], 2
call sub.MFC42.DLL_CString::CString
push edi
lea ecx, [esp + 0x28]
mov byte [esp + 0x158], 3
mov dword [esp + 0x18], 0x41672c
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esi + 8]
mov byte [esp + 0x154], 4
cmp eax, edi
je 0x40e6c1
mov ecx, esi
call fcn.0040e2e0
mov edx, dword [esp + 0x15c]
lea ecx, [esp + 0x14]
push ecx
push 0x8000
push edx
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x40e72e
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CFile::GetLength
mov ebp, eax
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebx, eax
lea ecx, [esp + 0x28]
push ebp
push ebx
call sub.MFC42.DLL_CFile::Read
test eax, eax
jbe 0x40e717
push ebp
push ebx
mov ecx, esi
call fcn.0040e8d0
test eax, eax
je 0x40e717
mov edi, 1
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CFile::Close
push ebx
call fcn.004134f0
add esp, 4
jmp 0x40e7ca
push edi
lea eax, [esp + 0x50]
push 0xff
push eax
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFileException::GetErrorMessage
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x7c]
mov esi, dword [eax + 0x20]
push 0x10
sub esp, 0x10
lea eax, [esp + 0x27]
mov ecx, esp
mov dword [esp + 0x5c], esp
push eax
push 0x41b564
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
lea ecx, [esp + 0x4c]
push ecx
call fcn.0040bfd0
add esp, 0x14
mov ecx, eax
mov byte [esp + 0x158], 5
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
lea edx, [esp + 0x50]
push eax
push edx
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x40e7be
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40e7b5
cmp al, 0xff
je 0x40e7b5
dec al
mov byte [ecx], al
jmp 0x40e7be
push ecx
call fcn.004134f0
add esp, 4
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x14], 0x41672c
lea ecx, [esp + 0x24]
mov byte [esp + 0x154], 6
call fcn.00413760
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], 0x416718
mov byte [esp + 0x154], 0
call sub.MFC42.DLL_CFile::CFile
lea ecx, [esp + 0x15c]
mov dword [esp + 0x154], 0xffffffff
call fcn.00413760
mov eax, edi
mov ecx, dword [esp + 0x14c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x148
ret 4