Function at 0x405796
Capabilities:
Read .ini file
Set socket configuration

Disassembly:
mov eax, 0x40f380
call fcn.0040ea50
sub esp, 0xc0
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0xc9c], ebx
jne 0x4057aa
xor eax, eax
jmp 0x4059a1
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.00403e0c
mov dword [esp], str.Config.ini
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 4], ebx
push eax
call sub.MFC42u.DLL_operator
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.0040e5c2
lea ecx, [ebp - 0x1c]
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.MFC42u.DLL_CString::CString
push ebx
push ebx
push 0x147
mov byte [ebp - 4], 6
push dword [esi + 0x178]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esi + 0xc9c]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040c6a0
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.0040e640
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.0040e5c2
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
push 0x3ee
call sub.MFC42u.DLL_CWnd::GetDlgItemTextW
push dword [ebp - 0x20]
mov edi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x10]
push 0x46
push 0x46
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push 0x41a638
push str.Password
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
call edi
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::ReleaseBuffer
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x405962
push 0x46
push eax
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.MSVCRT.dll_wcstombs]
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.0040403b
add esp, 0x14
test eax, eax
je 0x405962
lea eax, [ebp - 0xcc]
lea ecx, [ebp - 0x10]
push eax
call sub.MFC42u.DLL_CString::operator_2
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
call fcn.00403e8c
mov eax, dword [eax]
mov ebx, dword [sym.imp.MSVCRT.dll_strncpy]
push 0x42
push eax
lea eax, [esi + 0x1bc]
push eax
call ebx
add esp, 0x14
lea ecx, [ebp - 0x14]
call fcn.0040e5c2
push dword [ebp - 0x10]
lea eax, [ebp - 0x14]
push eax
call fcn.00403e8c
mov eax, dword [eax]
push 0x40
push eax
lea eax, [esi + 0x1fe]
push eax
call ebx
add esp, 0x14
lea ecx, [ebp - 0x14]
call fcn.0040e5c2
push dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x18]
push 0x14
push 0x14
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push str.0.0.0.0
push 0x41a030
push ebx
call edi
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push 0x46
lea eax, [ebp - 0x70]
push dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_wcstombs]
add esp, 0xc
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
push 1
mov dword [esi + 0x24c], eax
pop ebx
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.0040e5c2
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.0040e5c2
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0040e5c2
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.0040e5c2
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.0040e5c2
mov eax, ebx
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret