Function at 0x4090e0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.0040401c
mov eax, dword [ebp - 8]
call fcn.0040401c
xor eax, eax
push ebp
push 0x40932f
push dword fs:[eax]
mov dword fs:[eax], esp
mov word [ebp - 0xa], 0
cmp dword [ebp - 4], 0
je 0x409314
lea eax, [ebp - 0x28]
xor ecx, ecx
mov edx, 0x10
call fcn.00402a2c
mov word [ebp - 0x28], 2
mov eax, dword [ebp - 8]
call fcn.0040402c
push eax
call sub.wsock32.dll_inet_addr
mov ebx, eax
mov dword [ebp - 0x24], ebx
inc ebx
jne 0x409157
xor eax, eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 8]
call fcn.00403bb8
cmp byte [ebp + 0xc], 1
jne 0x40917f
push 0x11
push 2
push 2
call sub.wsock32.dll_socket
mov ebx, eax
push 0x409344
mov eax, dword [ebp - 4]
call fcn.0040402c
push eax
call sub.wsock32.dll_getservbyname
jmp 0x40919f
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
push 0x409348
mov eax, dword [ebp - 4]
call fcn.0040402c
push eax
call sub.wsock32.dll_getservbyname
test eax, eax
je 0x4091ad
mov ax, word [eax + 8]
mov word [ebp - 0x26], ax
jmp 0x4091c1
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00405d98
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x26], ax
test ebx, ebx
jl 0x409314
cmp dword [ebp - 8], 0
jne 0x4091d6
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x4091dd
mov dword [ebp - 0x14], 1
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push 0xffff
push ebx
call sub.wsock32.dll_setsockopt
push 0x10
lea eax, [ebp - 0x28]
push eax
push ebx
call sub.wsock32.dll_bind
test eax, eax
jne 0x40930e
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov eax, esi
call fcn.00408dec
movzx eax, ax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4092fc
mov edx, dword [0x408950]
mov eax, 0x30
call fcn.00404420
mov edi, eax
mov ax, word [ebp - 0x10]
mov word [edi], ax
mov eax, dword [ebp + 8]
mov dword [edi + 0x24], eax
lea eax, [edi + 2]
mov edx, dword [ebp - 4]
call fcn.00403c0c
lea eax, [edi + 6]
call fcn.00403bb8
mov al, byte [ebp + 0xc]
mov byte [edi + 0xa], al
mov dword [edi + 0xb], ebx
mov byte [edi + 0x23], 0
lea edx, [edi + 0xf]
lea eax, [ebp - 0x28]
mov ecx, 0x10
call fcn.00402678
xor eax, eax
mov dword [edi + 0x28], eax
mov eax, dword [esi + 4]
mov dword [edi + 0x2c], eax
mov dword [esi + 4], edi
cmp byte [ebp + 0xc], 1
jne 0x4092a5
mov eax, dword [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, 0x408d24
xor edx, edx
xor eax, eax
call fcn.00403b6c
mov dword [edi + 0x1f], eax
jmp 0x4092c0
mov eax, dword [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, 0x408b1c
xor edx, edx
xor eax, eax
call fcn.00403b6c
mov dword [edi + 0x1f], eax
mov eax, dword [edi + 0x1f]
test eax, eax
je 0x4092e3
push 0
push eax
call sub.kernel32.dll_SetThreadPriority
mov ax, word [ebp - 0x10]
mov word [ebp - 0xa], ax
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
jmp 0x409314
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
xor ecx, ecx
mov dx, word [ebp - 0x10]
mov eax, esi
call fcn.00409468
jmp 0x409314
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
push ebx
call sub.wsock32.dll_closesocket
jmp 0x409314
push ebx
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409336
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403bdc
ret