Function at 0x4029e0
Capabilities:
Get common file path
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x40dd4d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x298
push ebx
push ebp
push esi
lea eax, [esp + 0x1a0]
push edi
push eax
mov esi, ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x1a4]
lea edx, [esp + 0xa0]
push ecx
push str._sgw.ini
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
add esp, 0xc
lea eax, [esp + 0xa0]
push eax
push 0
push str.UseProxy
push str.Setting
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0xa0]
push ecx
lea edx, [esp + 0x24]
push 0x7f
push edx
push 0x412188
push str.area
push str.Setting
mov ebx, eax
call edi
lea eax, [esp + 0x20]
lea ecx, [esi + 0x118]
push eax
push 0x41217c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea edx, [esp + 0xa0]
lea eax, [esp + 0x20]
push edx
push 0x7f
push eax
push 0x4131b0
push str.ProxyIP
push str.Proxy
call edi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040d498
lea edx, [esp + 0xa0]
lea eax, [esp + 0x20]
push edx
push 0x7f
push eax
push 0x4131b0
push str.ProxyUsr
push str.Proxy
mov dword [esp + 0x2c8], 0
call edi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x20]
call fcn.0040d498
lea edx, [esp + 0xa0]
lea eax, [esp + 0x20]
push edx
push 0x7f
push eax
push 0x4131b0
push str.ProxyPwd
push str.Proxy
mov byte [esp + 0x2c8], 1
call edi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x18]
call fcn.0040d498
lea edx, [esp + 0xa0]
mov byte [esp + 0x2b0], 2
push edx
push 1
push str.ProxyType
push str.Proxy
call ebp
mov edi, eax
lea eax, [esp + 0xa0]
push eax
push 0
push str.ProxyPort
push str.Proxy
call ebp
push ebx
push str.UseProxy
push str.SETTING
mov ecx, esi
mov ebp, eax
call sub.MFC42.DLL_CWinApp::GetProfileIntA
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push str.ProxyServer
push str.SETTING
push edx
mov ecx, esi
mov dword [esi + 0xf8], eax
call sub.MFC42.DLL_CWinApp::GetProfileStringA
push eax
lea ecx, [esi + 0xfc]
mov byte [esp + 0x2b4], 3
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 2
call sub.MFC42.DLL_CString::CString
test edi, edi
je 0x402bc5
mov ebp, 0x15
push ebp
push str.ProxyPort
push str.SETTING
mov ecx, esi
call sub.MFC42.DLL_CWinApp::GetProfileIntA
mov dword [esi + 0x100], eax
mov eax, dword [esp + 0x1c]
push eax
push str.ProxyUser
lea ecx, [esp + 0x18]
push str.SETTING
push ecx
mov ecx, esi
call sub.MFC42.DLL_CWinApp::GetProfileStringA
push eax
lea ecx, [esi + 0x10c]
mov byte [esp + 0x2b4], 4
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 2
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push edx
push str.ProxyPass
push str.SETTING
push eax
mov ecx, esi
call sub.MFC42.DLL_CWinApp::GetProfileStringA
push eax
lea ecx, [esi + 0x110]
mov byte [esp + 0x2b4], 5
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 2
call sub.MFC42.DLL_CString::CString
test edi, edi
jne 0x402c6b
cmp ebx, 1
mov eax, 0x412108
je 0x402c70
mov eax, 0x412104
push eax
push str.Protocol
lea ecx, [esp + 0x18]
push str.SETTING
push ecx
mov ecx, esi
call sub.MFC42.DLL_CWinApp::GetProfileStringA
lea edi, [esi + 0x114]
push eax
mov ecx, edi
mov byte [esp + 0x2b4], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 2
call sub.MFC42.DLL_CString::CString
mov ecx, edi
call sub.MFC42.DLL_CString::MakeUpper
push 0
push str.Status
push str.UPDATE
mov ecx, esi
call sub.MFC42.DLL_CWinApp::GetProfileIntA
push 0
push str.LastDate
push str.UPDATE
mov ecx, esi
mov dword [esi + 0xf0], eax
call sub.MFC42.DLL_CWinApp::GetProfileIntA
lea ecx, [esp + 0x14]
mov dword [esi + 0xf4], eax
mov byte [esp + 0x2b0], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2b0], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x2b0], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x2a8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2a4
ret