Function at 0x402580
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 0x4025b2
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x403d10
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.00402810
mov eax, dword [ebp + 0x14]
push eax
mov ecx, esi
call fcn.00402890
add esp, 4
test eax, eax
jne 0x402618
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2b8]
xor ecx, esp
call fcn.0040713e
mov esp, ebp
pop ebp
ret 0x10
push str.STANDBY
push 0x409364
push 0x12d
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.004042b0
lea edx, [esp + 0x30]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x40273c
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, 0x4112b8
mov dword [0x40fd58], eax
call fcn.004058f0
test al, al
je 0x402752
mov eax, dword [esp + 0x10]
call fcn.004069f0
test al, al
je 0x402752
call fcn.00401110
call fcn.004048b0
mov ecx, dword [0x40fd64]
push 0
push 0x3e8
push 0x64
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x402752
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.00406e00
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 0x4027c8
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x14]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x4027b7
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 0x402790
mov eax, dword [0x40fe38]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x4027e6
mov ecx, dword [esp + 0x2c4]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040713e
mov esp, ebp
pop ebp
ret 0x10