Function at 0x4082fd
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
push ebx
lea eax, [ebp - 0x1ac]
push esi
push edi
mov esi, ecx
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
push 0
test eax, eax
je 0x408336
push str.WSAStart__
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
push 2
push 2
call sub.WSOCK32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x40835c
push 0
push str.Please_setup_TCP_IP_controlpanel__network__r_n
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
cmp dword [ebp + 8], 1
jne 0x408594
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x40838f
push 0
push str.Please_setup2_TCP_IP_controlpanel__network__r_n
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
push 0x10
xor edi, edi
push edi
lea eax, [ebp - 0x1c]
push eax
lea ebx, [esi + 0x84]
call fcn.00417bc0
add esp, 0xc
mov dword [ebp - 0x18], edi
mov word [ebp - 0x1c], 2
push dword [ebx]
call sub.WSOCK32.dll_htons
movzx eax, ax
mov word [ebp - 0x1a], ax
push 0x10
lea ecx, [ebp - 0x1c]
mov dword [ebx], eax
push ecx
push dword [esi]
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4083e5
push edi
push str.bind__
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
push 0x10
lea eax, [ebp - 0x1c]
push eax
push dword [esi + 4]
call sub.WSOCK32.dll_bind
test eax, eax
je 0x408415
push dword [esi + 4]
call sub.WSOCK32.dll_closesocket
mov dword [esi + 4], 0xffffffff
push 0
push str.bind_tcp__error._Cant_support_file_attach
call fcn.0040c289
add esp, 8
mov dword [ebp - 4], 1
lea eax, [ebp - 4]
push eax
push 0x8004667e
push dword [esi]
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x408446
push 0
push str.ioctlsocket_nonblock_
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x408477
lea ecx, [ebp - 4]
push ecx
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x408477
push 0
push str.ioctlsocket_tcp_nonblock_
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 1
push eax
push 0x20
push 0xffff
push dword [esi]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x4084ac
push 0
push str.setsockopt_broadcast_
call fcn.0040c289
add esp, 8
xor eax, eax
jmp 0x408599
push 4
lea eax, [ebp - 0xc]
push eax
mov edi, 0x1001
push edi
mov ebx, 0xffff
mov dword [ebp - 0xc], 0x10000
mov dword [ebp - 8], 0x8000
push ebx
push dword [esi]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x4084f9
push 4
lea eax, [ebp - 8]
push eax
push edi
push ebx
push dword [esi]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x4084f9
push 0
push str.setsockopt_sendbuf_
call fcn.0040c289
add esp, 8
push 4
lea eax, [ebp - 0xc]
push eax
mov edi, 0x1002
push edi
mov ebx, 0xffff
mov dword [ebp - 0xc], 0x10000
mov dword [ebp - 8], 0x8000
push ebx
push dword [esi]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x408546
push 4
lea eax, [ebp - 8]
push eax
push edi
push ebx
push dword [esi]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x408546
push 0
push str.setsockopt_recvbuf_
call fcn.0040c289
add esp, 8
mov dword [ebp - 4], 1
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40857b
push 4
lea ecx, [ebp - 4]
push ecx
push 4
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x40857b
push 0
push str.setsockopt_tcp_reuseaddr_
call fcn.0040c289
add esp, 8
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x408594
push 5
push eax
call sub.WSOCK32.dll_listen
test eax, eax
mov eax, 0
jne 0x408599
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4