Function at 0x402210
Capabilities:
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2bc
mov eax, dword [0x40c018]
xor eax, esp
mov dword [esp + 0x2b8], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
jmp 0x402242
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x403d20
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x40fdd0
push 0x65
push esi
mov dword [0x40fe38], eax
call edi
push 0x64
push 0x40fd68
push 0x69
push esi
call edi
mov eax, esi
call fcn.004024a0
mov eax, dword [ebp + 0x14]
push eax
mov ecx, esi
call fcn.00402520
add esp, 4
test eax, eax
jne 0x4022a8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2b8]
xor ecx, esp
call fcn.00407180
mov esp, ebp
pop ebp
ret 0x10
push str.STANDBY
push 0x409364
push 0x65
lea ecx, [esp + 0x1cc]
push str._2.0.7__ConnectServer__EX_03d__s____s_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x40fd64]
add esp, 0x14
lea edx, [esp + 0x1c0]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [0x40fd64]
push ecx
mov ecx, 0x40c820
call fcn.004042c0
lea edx, [esp + 0x30]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4023c9
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..ConnectServer.ini
push 0xad75
push str.ConnectServerPortTCP
push str.ConnectServerInfo
call edi
push str..ConnectServer.ini
push 0xd905
push str.ConnectServerPortUDP
push str.ConnectServerInfo
movzx ebx, ax
call edi
push str..ConnectServer.ini
push 0
movzx eax, ax
push str.MaxConnectionPerIP
push str.ConnectServerInfo
mov dword [esp + 0x20], eax
call edi
push str..ConnectServer.ini
push 0
push str.MaxPacketPerSecond
push str.ConnectServerInfo
mov dword [0x40fd60], eax
call edi
push str..ConnectServer.ini
push 0
push str.MaxConnectionIdle
push str.ConnectServerInfo
mov dword [0x40fd5c], eax
call edi
push ebx
mov ecx, 0x41c988
mov dword [0x40fd58], eax
call fcn.00405910
test al, al
je 0x4023df
mov eax, dword [esp + 0x10]
call fcn.00406a10
test al, al
je 0x4023df
call fcn.00401110
call fcn.004048d0
mov ecx, dword [0x40fd64]
push 0
push 0x3e8
push 0x64
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x4023df
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.00406e20
add esp, 0xc
mov edx, dword [0x40fd64]
push 0
push 0x7d0
push 0x65
push edx
call dword [sym.imp.USER32.dll_SetTimer]
push 0x69
push esi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
mov esi, eax
push 0
lea eax, [esp + 0x20]
push eax
call edi
test eax, eax
je 0x402458
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
lea ecx, [ecx]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x14]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x402447
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea edx, [esp + 0x20]
push edx
call edi
test eax, eax
jne 0x402420
mov eax, dword [0x40fe38]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x402476
mov ecx, dword [esp + 0x2c4]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407180
mov esp, ebp
pop ebp
ret 0x10