Function at 0x402900
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405a7b
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x40a010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x80], edi
call dword [sym.imp.mfc140u.dll_CDialog::OnInitDialog]
push 0
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call dword [sym.imp.mfc140u.dll_CMenu::FromHandle]
mov ebx, eax
test ebx, ebx
je 0x4029a2
lea ecx, [ebp - 0x78]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0x65
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t_]
mov eax, dword [ebp - 0x78]
cmp dword [eax - 0xc], 0
je 0x402992
mov esi, dword [sym.imp.USER32.dll_AppendMenuW]
push 0
push 0
push 0x800
push dword [ebx + 4]
call esi
push dword [ebp - 0x78]
push 0x10
push 0
push dword [ebx + 4]
call esi
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
push dword [edi + 0xd0]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
push 0x80
push dword [edi + 0x20]
call esi
push dword [edi + 0xd0]
push 0
push 0x80
push dword [edi + 0x20]
call esi
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x74]
push str.settings.ini
mov dword [edi + 0xec], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402b09
mov esi, 1
lea ebx, [edi + 0x1a4]
push esi
push 0x4071b0
push ebx
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__5]
add esp, 0xc
lea eax, [ebp - 0x74]
push 0x406f08
push 0x32
push eax
push 0
push dword [ebx]
push str.games
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x74], 0
je 0x402a94
lea eax, [edi + 0xd4]
mov edi, eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x78]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__4]
lea eax, [ebp - 0x78]
mov dword [ebp - 4], 1
push eax
mov ecx, edi
call fcn.004044f0
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
inc esi
push esi
push 0x4071b0
push ebx
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__5]
add esp, 0xc
lea eax, [ebp - 0x74]
push 0x406f08
push 0x32
push eax
push 0
push dword [ebx]
push str.games
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x74], 0
jne 0x402a30
mov edi, dword [ebp - 0x80]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push 0x406f08
push 1
push str.attach
push 0x406f44
call ebx
mov ecx, dword [edi + 0xec]
mov esi, dword [sym.imp.USER32.dll_CheckMenuItem]
mov ecx, dword [ecx + 4]
test eax, eax
je 0x402ac4
push 8
jmp 0x402ac6
push 0
push 0x8009
push ecx
call esi
push 0x406f08
push 0
push str.start
push 0x406f44
call ebx
mov ecx, dword [edi + 0xec]
mov ecx, dword [ecx + 4]
test eax, eax
je 0x402afd
push 8
push 0x800e
push ecx
call esi
jmp 0x402b7e
push 0
push 0x800e
push ecx
call esi
jmp 0x402b7e
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0x406f08
push 0x406fec
push str.attach
push 0x406f44
call esi
push 0x406f08
push 0x406fe8
push str.start
push 0x406f44
call esi
push 0x406f08
push str.game.exe
push 0x406fec
push str.games
call esi
push str.game.exe
lea ecx, [ebp - 0x7c]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__4]
lea eax, [ebp - 0x7c]
mov dword [ebp - 4], 2
push eax
lea ecx, [edi + 0xd4]
call fcn.004044f0
lea ecx, [ebp - 0x7c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404d52
mov esp, ebp
pop ebp
ret