Function at 0x4052b0
Capabilities:
Create tcp socket
Create thread
Create udp socket
Get hostname
Resolve dns

Disassembly:
sub esp, 0xc4
push ebx
push esi
push edi
push 1
push 0
push 0
push 6
push 1
push 2
mov ebx, ecx
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [ebx + 0x84], eax
jne 0x40530e
call fcn.00405c60
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CServer::StartListenThread_WSASocket_failed._Error_code_:__d
push esi
call dword [edi + 4]
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
mov byte [ebx + 0x8a], 0
or eax, 0xffffffff
pop ebx
add esp, 0xc4
ret
call fcn.00405c60
mov ecx, dword [eax]
push str.WSASocket_OK
push eax
call dword [ecx + 4]
add esp, 8
call fcn.0040c9a0
mov ecx, eax
call fcn.0040c830
call fcn.0040c9a0
mov ecx, eax
call fcn.0040c830
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
jne 0x405368
call fcn.00405c60
mov edx, dword [eax]
push str.inet_addr_error
push eax
call dword [edx + 4]
add esp, 8
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x40], eax
xor eax, eax
mov ax, word [ebx + 0x94]
mov word [esp + 0x3c], 2
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebx + 0x84]
push 0x10
lea ecx, [esp + 0x40]
push ecx
push edx
mov word [esp + 0x4a], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4053cb
call fcn.00405c60
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind_Error._Error_Code:_d
push esi
call dword [edi + 4]
mov eax, dword [ebx + 0x84]
add esp, 0xc
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4052f4
call fcn.00405c60
mov ecx, dword [eax]
push str.Bind_OK
push eax
call dword [ecx + 4]
mov byte [esp + 0x58], 0
xor eax, eax
mov ecx, 0x1f
lea edi, [esp + 0x59]
rep stosd dword es:[edi], eax
add esp, 8
stosw word es:[edi], ax
push 0x80
lea edx, [esp + 0x54]
push edx
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x405518
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
je 0x405518
push ebp
xor ebp, ebp
mov ecx, dword [edi + 0xc]
cmp dword [ecx + ebp], 0
je 0x405517
xor edx, edx
mov dword [esp + 0x11], edx
mov dword [esp + 0x15], edx
mov dword [esp + 0x19], edx
xor esi, esi
cmp word [edi + 0xa], si
mov dword [esp + 0x1d], edx
mov byte [esp + 0x10], 0
mov dword [esp + 0x21], edx
jle 0x40550f
xor eax, eax
test esi, esi
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov byte [esp + 0x28], 0
mov dword [esp + 0x39], eax
jle 0x4054ad
mov ecx, 0x14
lea eax, [esp + 0x10]
nop
cmp byte [eax], 0
je 0x40548b
inc eax
dec ecx
jne 0x405480
jmp 0x4054ad
test ecx, ecx
je 0x4054ad
mov eax, 0x14
sub eax, ecx
push 0x4f4b30
mov ecx, 0x14
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x18]
push edx
call fcn.00402290
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + ebp]
movzx edx, byte [ecx + esi]
push edx
push 0x4f5220
lea eax, [esp + 0x30]
push 0x14
push eax
call fcn.00404dd0
add esp, 0x10
mov ecx, 0x14
lea eax, [esp + 0x10]
cmp byte [eax], 0
je 0x4054e0
inc eax
dec ecx
jne 0x4054d5
jmp 0x405502
test ecx, ecx
je 0x405502
mov eax, 0x14
sub eax, ecx
lea ecx, [esp + 0x28]
push ecx
mov edx, 0x14
sub edx, eax
push edx
lea eax, [esp + eax + 0x18]
push eax
call fcn.00402290
movsx ecx, word [edi + 0xa]
inc esi
cmp esi, ecx
jl 0x405457
add ebp, 4
jmp 0x405423
pop ebp
call fcn.00405c60
mov ecx, dword [ebx + 0x94]
mov edx, dword [eax]
push ecx
lea ecx, [ebx + 0xbc]
push ecx
push str._s:_d
push eax
call dword [edx + 4]
mov edx, dword [ebx + 0x84]
add esp, 0x10
push 0x32
push edx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40557b
call fcn.00405c60
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Listen_error._Error_code:_d
push esi
call dword [edi + 4]
mov eax, dword [ebx + 0x84]
add esp, 0xc
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4052f4
lea ecx, [esp + 0x4c]
push ecx
push 0
push ebx
push 0x404640
push 0
push 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [ebx + 0x5c], eax
jne 0x4055cc
call fcn.00405c60
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Server_Accept_Thread_Create_Failed_Error_code_:__d
push esi
call dword [edi + 4]
add esp, 0xc
pop edi
pop esi
mov byte [ebx + 0x8a], 0
or eax, 0xffffffff
pop ebx
add esp, 0xc4
ret
call fcn.00405c60
mov edx, dword [eax]
push str.Server_Accept_Thread_Create_OK
push eax
call dword [edx + 4]
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0xc4
ret