Function at 0x40f290
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x41bb8c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x348
push ebx
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 8]
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0x364]
mov dword [esp + 0x358], ebx
cmp eax, 6
jne 0x40f2ec
push 0x4235f4
jmp 0x40f2fa
cmp eax, 0x11
jne 0x40f576
push 0x4235ec
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [0x42905c]
push esi
cmp edx, ebx
je 0x40f3ba
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x40]
mov dword [esp + 0x3c], ebx
rep stosd dword es:[edi], eax
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0x14]
mov ecx, dword [0x42905c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x80], 2
lea eax, [esp + 0x3c]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40f41a
mov ecx, dword [0x42905c]
lea eax, [esp + 0x84]
push 0x104
push eax
mov edx, dword [ecx]
call dword [edx + 0x1c]
mov esi, dword [sym.imp.MSVCRT.dll__mbsnbcat]
lea ecx, [esp + 0x44]
push 0x104
lea edx, [esp + 0x88]
push ecx
push edx
call esi
lea eax, [esp + 0x90]
push 0x2e
push eax
call dword [sym.imp.MSVCRT.dll__mbsrchr]
push 0x104
lea ecx, [esp + 0x9c]
push str.port.dat
push ecx
mov byte [eax], bl
call esi
add esp, 0x20
jmp 0x40f41a
lea edx, [esp + 0x250]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x250]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
lea ecx, [esp + 0x250]
lea edx, [esp + 0x84]
mov byte [eax + 1], bl
push 0x104
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x104
lea eax, [esp + 0x88]
push str.languageChsport.dat
push eax
call dword [sym.imp.MSVCRT.dll__mbsnbcat]
add esp, 0xc
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x189]
mov byte [esp + 0x188], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x364]
lea edx, [esp + 0x1c]
and ecx, 0xffff
stosw word es:[edi], ax
push ecx
push 0x423104
push edx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x84]
lea ecx, [esp + 0x188]
lea edx, [esp + 0x1c]
push eax
push 0xc8
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x28]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x188]
lea eax, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40f4b2
lea ecx, [esp + 0x188]
push ecx
mov ecx, dword [esp + 0x370]
call sub.MFC42.DLL_CString::operator_1
jmp 0x40f54a
mov esi, dword [esp + 0x36c]
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
push 0x4240bc
lea eax, [esp + 0x1c]
push esi
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x188]
lea edx, [esp + 0x14]
push ecx
push eax
push edx
mov byte [esp + 0x368], 1
call sub.MFC42.DLL_operator_1
push 0x4240b8
push eax
lea eax, [esp + 0x18]
mov byte [esp + 0x364], 2
push eax
call sub.MFC42.DLL_operator_1
push eax
mov ecx, esi
mov byte [esp + 0x360], 3
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x10]
mov byte [esp + 0x35c], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x35c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x35c], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x35c], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x348]
mov dword fs:[0], ecx
add esp, 0x354
ret
lea ecx, [esp + 8]
mov dword [esp + 0x358], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x350]
pop edi
pop ebx
mov dword fs:[0], ecx
add esp, 0x354
ret