Function at 0x402cf0
Capabilities:
Check for time delay via gettickcount
Create raw socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x274
xor eax, eax
xor ecx, ecx
push ebx
push ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
push esi
push edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], ecx
push 1
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], ecx
push 3
push 2
mov dword [esp + 0x34], 0x10
mov dword [esp + 0x30], eax
mov dword [esp + 0x44], ecx
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x402d56
call sub.WSOCK32.dll_WSAGetLastError
sub eax, 0x271d
pop edi
neg eax
sbb eax, eax
pop esi
pop ebp
add eax, 0xfffffc1a
pop ebx
add esp, 0x274
ret
mov eax, dword [esp + 0x290]
xor ebx, ebx
cmp eax, ebx
je 0x402d78
push 4
push eax
push 7
push ebx
push esi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x402e44
mov edx, dword [esp + 0x288]
mov word [esp + 0x18], 2
mov word [esp + 0x1a], bx
mov eax, dword [edx]
mov byte [0x414060], 8
mov dword [esp + 0x1c], eax
mov eax, dword [0x4116a8]
mov word [0x414066], ax
inc eax
mov dword [0x4116a8], eax
mov byte [0x414061], bl
mov word [0x414062], bx
mov word [0x414064], 0xd8
xor eax, eax
mov cl, al
add cl, 0x20
mov byte [eax + 0x41406d], cl
inc eax
cmp eax, 0x20
jl 0x402dc1
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov dword [0x414069], eax
mov ecx, 0x414060
xor eax, eax
mov edx, 0x16
xor edi, edi
mov di, word [ecx]
add ecx, 2
add eax, edi
dec edx
jne 0x402deb
mov dl, byte [ecx]
mov dword [esp + 0x10], ebx
mov byte [esp + 0x10], dl
mov ecx, dword [esp + 0x10]
and ecx, 0xffff
push 0x10
add eax, ecx
mov ecx, eax
and eax, 0xffff
sar ecx, 0x10
add ecx, eax
lea eax, [esp + 0x1c]
mov edx, ecx
push eax
sar edx, 0x10
add edx, ecx
push ebx
push 0x2d
push 0x414060
not edx
push esi
mov word [0x414062], dx
call sub.WSOCK32.dll_sendto
cmp eax, 0x2d
jae 0x402e72
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
push edi
call sub.WSOCK32.dll_WSASetLastError
xor eax, eax
cmp edi, 0x271d
pop edi
pop esi
sete al
pop ebp
add eax, 0xfffffc19
pop ebx
add esp, 0x274
ret
call ebp
mov ecx, dword [esp + 0x28c]
lea edi, [eax + ecx]
call ebp
cmp eax, edi
jae 0x402f37
call ebp
mov ecx, edi
mov dword [esp + 0x180], 1
sub ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [esp + 0x10], edx
mov dword [esp + 0x184], esi
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
sub ecx, edx
lea edx, [esp + 0x180]
lea eax, [ecx + ecx*4]
lea ecx, [esp + 0x10]
push ecx
push ebx
lea eax, [eax + eax*4]
push ebx
push edx
push 1
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 0x28], eax
call sub.WSOCK32.dll_select
cmp eax, ebx
je 0x402f3d
cmp eax, 0xffffffff
je 0x402f53
lea eax, [esp + 0x28]
lea ecx, [esp + 0x2c]
push eax
push ecx
push ebx
lea edx, [esp + 0x48]
push 0x141
push edx
push esi
call sub.WSOCK32.dll_recvfrom
cmp eax, 0xffffffff
je 0x402f69
cmp eax, 0x1d
jb 0x402f2d
mov al, byte [esp + 0x50]
cmp al, 3
je 0x402f8c
cmp al, 0xb
je 0x402fa2
cmp al, bl
jne 0x402f2d
cmp word [esp + 0x54], 0xd8
je 0x402f37
call ebp
cmp eax, edi
jb 0x402e88
call ebp
cmp eax, edi
jbe 0x402fb8
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xfffffc1b
pop ebx
add esp, 0x274
ret
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xfffffc18
pop ebx
add esp, 0x274
ret
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
push edi
call sub.WSOCK32.dll_WSASetLastError
pop edi
pop esi
pop ebp
mov eax, 0xfffffc18
pop ebx
add esp, 0x274
ret
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xfffffc1d
pop ebx
add esp, 0x274
ret
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xfffffc1e
pop ebx
add esp, 0x274
ret
mov eax, dword [esp + 0x290]
cmp eax, ebx
je 0x402fcf
mov ecx, dword [esp + 0x44]
and ecx, 0xff
mov dword [eax], ecx
call ebp
mov edx, dword [esp + 0x59]
mov edi, eax
push esi
sub edi, edx
call sub.WSOCK32.dll_closesocket
cmp edi, ebx
mov eax, 1
je 0x402fea
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x274
ret