Function at 0x40be70
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x40f4b7
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x41908c]
xor eax, esp
mov dword [esp + 0x8c], eax
push ebp
push esi
push edi
mov eax, dword [0x41908c]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov eax, dword [esp + 0xb4]
mov ebp, dword [esp + 0xb0]
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x34], eax
call dword [sym.imp.Common.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_common::GetAppPath_void_]
add esp, 4
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
xor esi, esi
push eax
mov edi, str.data_
mov dword [esp + 0xb0], esi
call fcn.00402bd0
push eax
lea ecx, [esp + 0x20]
push ecx
mov edi, str.viewinfo.ini
mov byte [esp + 0xb8], 1
call fcn.00402bd0
add esp, 0x10
lea ecx, [esp + 0x1c]
mov byte [esp + 0xa8], 3
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.Common.dll_int___cdecl_common::IsFileExist_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__]
add esp, 4
test eax, eax
je 0x40c096
push 0x62
lea eax, [esp + 0x3a]
push esi
push eax
mov word [esp + 0x40], si
call sub.MSVCR80.dll_memset
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ecx
push 0x32
lea edx, [esp + 0x3c]
push edx
push esi
push str.FormPosition
push str.MainForm
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x40c096
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 4
call dword [sym.imp.MFC80U.DLL_Ordinal_283]
lea ecx, [esp + 0x1c]
push ecx
lea esi, [esp + 0x24]
mov byte [esp + 0xac], 5
call fcn.0040bd70
add esp, 4
lea ecx, [esp + 0x1c]
mov byte [esp + 0xa8], 4
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, dword [esp + 0x24]
xor edi, edi
cmp eax, edi
je 0x40c08a
mov ecx, dword [esp + 0x28]
mov edx, ecx
sub edx, eax
sar edx, 2
cmp edx, 4
jne 0x40c081
cmp edx, edi
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
ja 0x40bfe8
call esi
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
mov dword [ebp], edx
mov edx, ecx
sub edx, eax
sar edx, 2
cmp edx, 1
ja 0x40c003
call esi
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov edx, dword [eax + 4]
mov dword [ebp + 4], edx
mov edx, ecx
sub edx, eax
sar edx, 2
cmp edx, 2
ja 0x40c01f
call esi
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov edx, dword [eax + 8]
sub ecx, eax
sar ecx, 2
cmp ecx, 3
mov dword [ebp + 8], edx
ja 0x40c035
call esi
mov eax, dword [esp + 0x24]
mov edx, dword [ebp]
cmp edx, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp + 0xc], ecx
jg 0x40c081
cmp dword [ebp + 4], ecx
jg 0x40c081
push 0x32
lea eax, [esp + 0x38]
push edi
push eax
call sub.MSVCR80.dll_memset
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ecx
push 0x32
lea edx, [esp + 0x3c]
push edx
push edi
push str.FormState
push str.MainForm
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
jne 0x40c0d5
mov eax, dword [esp + 0x24]
cmp eax, edi
je 0x40c08a
push eax
call sub.MFC80U.DLL_Ordinal_764
add esp, 4
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
xor eax, eax
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x8c]
xor ecx, esp
call fcn.0040dff8
add esp, 0x9c
ret 8
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
call dword [sym.imp.MFC80U.DLL_Ordinal_283]
push eax
mov byte [esp + 0xac], 6
call dword [sym.imp.Common.dll_int___cdecl_common::CString2Int_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
add esp, 4
lea ecx, [esp + 0x1c]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, dword [esp + 0x24]
cmp eax, edi
je 0x40c117
push eax
call sub.MFC80U.DLL_Ordinal_764
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, 1
jmp 0x40c0ac