Function at 0x409abc
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x17]
xor edx, edx
mov dl, byte [ecx + 5]
test edx, edx
jne 0x409ad6
jmp 0x409d27
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov ecx, dword [ebp + 8]
mov dword [ecx + 2], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 2], 0xffffffff
jne 0x409b12
push str.Create_server_TCP_socket___error_
push 0x14f
push 0x42cb78
mov eax, dword [0x437d14]
push eax
call fcn.0040c291
add esp, 0x10
jmp 0x409d27
push 0x7d00
push 0x7d00
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 2]
push edx
call fcn.00417636
add esp, 0xc
test eax, eax
jne 0x409b6e
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 2]
push ecx
call sub.WSOCK32.dll_closesocket
mov edx, dword [ebp + 8]
mov dword [edx + 2], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Config_TCP_Listen_socket_error__d__
push 0x157
push 0x42cbb8
mov eax, dword [0x437d14]
push eax
call fcn.0040c291
add esp, 0x14
jmp 0x409d27
push 0x10
push 0
lea ecx, [ebp - 0x10]
push ecx
call fcn.0041b260
add esp, 0xc
mov word [ebp - 0x10], 2
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x13]
mov word [ebp - 0xe], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xf]
mov dword [ebp - 0xc], edx
push 0x10
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 2]
push edx
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x409bee
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 2]
push ecx
call sub.WSOCK32.dll_closesocket
mov edx, dword [ebp + 8]
mov dword [edx + 2], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.server_TCP_bind___error__d__
push 0x165
push 0x42cbf4
mov eax, dword [0x437d14]
push eax
call fcn.0040c291
add esp, 0x14
jmp 0x409d27
push 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 2]
push edx
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x409c40
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 2]
push ecx
call sub.WSOCK32.dll_closesocket
mov edx, dword [ebp + 8]
mov dword [edx + 2], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.server_listen___error__d__
push 0x16d
push 0x42cc2c
mov eax, dword [0x437d14]
push eax
call fcn.0040c291
add esp, 0x14
jmp 0x409d27
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x13]
push edx
call fcn.00415227
add esp, 4
and eax, 0xffff
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xf]
push ecx
call fcn.00417663
add esp, 4
push eax
push str.Create_TCP_listen_on_IP:_s_port__d
push 0x170
push 0x42cc6c
mov edx, dword [0x437d14]
push edx
call fcn.0040c291
add esp, 0x18
push 0x447b60
call fcn.00415bf6
add esp, 4
push 0x447920
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 2]
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x409cd7
cmp dword [0x447920], 0x40
jae 0x409cd1
mov edx, dword [0x447920]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 2]
mov dword [edx*4 + 0x447924], ecx
mov edx, dword [0x447920]
add edx, 1
mov dword [0x447920], edx
xor eax, eax
test eax, eax
jne 0x409ca6
push 0x447a40
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 2]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x409d1a
cmp dword [0x447a40], 0x40
jae 0x409d14
mov eax, dword [0x447a40]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 2]
mov dword [eax*4 + 0x447a44], edx
mov eax, dword [0x447a40]
add eax, 1
mov dword [0x447a40], eax
xor ecx, ecx
test ecx, ecx
jne 0x409cec
push 0x447b60
call fcn.00415c05
add esp, 4
mov esp, ebp
pop ebp
ret