Function at 0x4176b0
Capabilities:
Access peb ldr_data
Get common file path
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x4b20d3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14c
push esi
push edi
push closesocket
push 0
push ecx
mov dword [esp + 0x34], 0
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x52e3b8
call sub.MFC42.DLL_CString::CString_2
push ecx
mov dword [esp + 0x16c], 1
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.SoftwareBrothersRegCompatibility
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x40]
mov byte [esp + 0x16c], 0
call fcn.004538f0
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x30]
push eax
mov dword [esp + 0x160], 2
call fcn.00453c60
lea ecx, [esp + 0x1c]
mov byte [esp + 0x15c], 3
push ecx
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x1c]
mov byte [esp + 0x15c], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esp + 0xc]
mov byte [esp + 0x15c], 6
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x15c], 7
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esp + 0x18]
mov byte [esp + 0x15c], 8
call sub.MFC42.DLL_CString::CString_4
mov dl, byte [0x52e3b8]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x51]
mov byte [esp + 0x50], dl
mov byte [esp + 0x15c], 9
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x50]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x50]
lea edx, [esp + 0x18]
push ecx
push str._swin.ini
push edx
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea ecx, [esp + 0x10]
push str.SYSQ3XCHS32C
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x50]
push 0x104
push eax
mov byte [esp + 0x164], 0xa
push 0x52e3b8
mov ecx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_GetProfileStringA]
push ecx
push str.Compatibility
call edi
lea edx, [esp + 0x50]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x54]
push 0x104
push ecx
push 0x52e3b8
push edx
push str.Compatibility
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x50]
lea ecx, [esp + 0xc]
push eax
call sub.MFC42.DLL_CString::operator_1
push 0x52e3b8
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push ecx
push edx
mov byte [esp + 0x164], 0xb
call esi
add esp, 8
test eax, eax
jne 0x4178be
mov eax, dword [esp + 0xc]
push 0x52e3b8
push eax
call esi
add esp, 8
test eax, eax
je 0x4178be
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
push ecx
push edx
call esi
add esp, 8
test eax, eax
jne 0x4178be
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
call sub.MFC42.DLL_CString::operator_2
jmp 0x417981
lea ecx, [esp + 0x20]
push ecx
call fcn.00417610
add esp, 4
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x160], 0xc
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x20]
mov byte [esp + 0x15c], 0xb
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0xc]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x34]
call fcn.00453ca0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push str.Compatibility
call dword [sym.imp.KERNEL32.dll_WriteProfileStringA]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
push edx
push eax
push ecx
push str.Compatibility
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x50]
push 0x104
push edx
push 0x52e3b8
push eax
push str.Compatibility
call edi
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [esp + 0x14]
push 0x52e3b8
push edx
call esi
add esp, 8
test eax, eax
jne 0x417981
push 0x52e3b8
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::operator_1
mov esi, dword [esp + 0x164]
lea eax, [esp + 8]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x28], 1
lea ecx, [esp + 8]
mov byte [esp + 0x15c], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x15c], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x15c], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x15c], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x15c], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x15c], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x15c], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0x15c], 0
call fcn.00453a70
mov ecx, dword [esp + 0x154]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x158
ret