Function at 0x401cb0
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1b4
mov eax, dword [0x41b084]
xor eax, esp
mov dword [esp + 0x1b0], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x404d60
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x51f178
push 0x67
push edi
mov dword [0x51f1dc], eax
call esi
push 0x64
push 0x51f110
push 0x6d
push edi
call esi
mov eax, edi
call fcn.00401f90
mov eax, dword [ebp + 0x14]
push eax
call fcn.00402020
add esp, 4
test eax, eax
jne 0x401d34
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.00407a74
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x51f108]
push str.ChatServer__Initializing.._
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edx, dword [0x51f108]
mov dword [0x58160c], edx
call fcn.00404a30
cmp dword [0x58160c], 0
je 0x401d7e
cmp dword [0x41c3c8], 0xffffffff
setne al
mov byte [0x582044], al
call fcn.004059d0
call fcn.00405a50
call fcn.00405b30
lea ecx, [esp + 0x28]
push ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
jne 0x401ed8
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..ChatServer.ini
push 0xdaac
push str.ChatServerPort
push str.ChatServerInfo
call esi
push str..ChatServer.ini
push 0xda62
push str.DataServerPort
push str.ChatServerInfo
mov word [0x51f0f8], ax
call esi
push str..ChatServer.ini
push 0x20
push 0x51f0d0
push str.127.0.0.1
push str.DataServerAddress
push str.ChatServerInfo
mov word [0x51f0f4], ax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..ChatServer.ini
push 5
push str.MaxIpConnection
push str.ChatServerInfo
call esi
push str..ChatServer.ini
push 0xea60
push str.MaxClientOnlineTime
push str.ChatServerInfo
mov word [0x51f104], ax
call esi
push str..ChatServer.ini
push 0xea60
push str.MaxChatRoomOnlineTime
push str.ChatServerInfo
mov dword [0x51f100], eax
call esi
push str..ChatServer.ini
push 1
push str.ChatServerVersion
push str.ChatServerInfo
mov dword [0x51f0fc], eax
call esi
neg eax
sbb eax, eax
neg eax
mov word [0x51f0f0], ax
call fcn.00406090
test al, al
je 0x401eee
mov edx, dword [0x51f108]
push 0
push 1
push 2
mov dword [0x41c3c4], edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x41c3c8], eax
mov dword [0x51c3d4], 0x403080
call fcn.00402260
test al, al
je 0x401ec7
mov eax, dword [0x51f108]
push 0
push 0x3e8
push 0x64
push eax
call ebx
mov ecx, dword [0x51f108]
push 0
push 0x2710
push 0x66
push ecx
call ebx
jmp 0x401eee
push str.Failed_to_start_ChatServer.
push 1
call fcn.004074e0
add esp, 8
jmp 0x401eee
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.004074e0
add esp, 0xc
call fcn.00405a50
mov edx, dword [0x51f108]
push 0
push 0x7d0
push 0x65
push edx
call ebx
push 0x6d
push edi
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 + 0x18]
push eax
call edi
test eax, eax
je 0x401f68
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
lea ecx, [ecx]
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x401f57
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea edx, [esp + 0x18]
push edx
call edi
test eax, eax
jne 0x401f30
mov eax, dword [0x51f1dc]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov ecx, dword [esp + 0x1bc]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407a74
mov esp, ebp
pop ebp
ret 0x10