Function at 0x404110
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, 0x27c
mov eax, dword [0x420050]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
mov ebp, dword [esp + 0x290]
push esi
push edi
mov edi, dword [esp + 0x290]
xor eax, eax
push 1
push 3
push 2
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], 0x10
xor ebx, ebx
mov dword [esp + 0x130], eax
mov dword [esp + 0x134], eax
mov dword [esp + 0x138], eax
mov dword [esp + 0x13c], eax
mov dword [esp + 0x140], eax
mov dword [esp + 0x144], eax
mov dword [esp + 0x148], eax
mov dword [esp + 0x14c], eax
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x4041a8
call sub.WSOCK32.dll_WSAGetLastError
sub eax, 0x271d
neg eax
sbb eax, eax
add eax, 0xfffffc1a
jmp 0x4043bb
cmp ebp, ebx
je 0x4041e5
push 4
push ebp
push 7
push ebx
push esi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4041e5
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
sete al
add eax, 0xfffffc19
jmp 0x4043bb
mov eax, dword [edi]
mov dword [esp + 0x128], eax
mov eax, dword [0x41f160]
mov word [0x421d02], ax
add eax, 1
mov dword [0x41f160], eax
mov word [esp + 0x124], 2
mov word [esp + 0x126], bx
mov byte [0x421cfc], 8
mov byte [0x421cfd], bl
mov word [0x421cfe], bx
mov word [0x421d00], 0xd8
xor eax, eax
mov cl, al
add cl, 0x20
mov byte [eax + 0x421d09], cl
add eax, 1
cmp eax, 0x20
jl 0x404232
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov dword [0x421d05], eax
mov ecx, 0x421cfc
xor eax, eax
mov edx, 0x16
mov edi, edi
movzx edi, word [ecx]
add eax, edi
add ecx, 2
sub edx, 1
jne 0x404260
mov dl, byte [ecx]
mov dword [esp + 0x10], ebx
mov byte [esp + 0x10], dl
movzx ecx, word [esp + 0x10]
add eax, ecx
mov ecx, eax
and eax, 0xffff
push 0x10
sar ecx, 0x10
add ecx, eax
lea eax, [esp + 0x128]
push eax
push ebx
mov edx, ecx
sar edx, 0x10
push 0x2d
add edx, ecx
push 0x421cfc
not edx
push esi
mov word [0x421cfe], dx
call sub.WSOCK32.dll_sendto
cmp eax, 0x2d
jb 0x4041bd
call ebp
mov ecx, dword [esp + 0x294]
lea edi, [eax + ecx]
call ebp
cmp eax, edi
jae 0x404387
call ebp
mov ecx, edi
sub ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [esp + 0x10], edx
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
lea edx, [esp + 0x10]
push edx
push ebx
push ebx
lea eax, [esp + 0x2c]
push eax
push 1
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], esi
mov dword [esp + 0x28], ecx
call sub.WSOCK32.dll_select
cmp eax, ebx
je 0x4043d4
cmp eax, 0xffffffff
je 0x4043e1
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x138]
push edx
push ebx
push 0x141
lea eax, [esp + 0x154]
push eax
push esi
call sub.WSOCK32.dll_recvfrom
cmp eax, 0xffffffff
je 0x4043ee
cmp eax, 0x1d
jb 0x40437d
mov al, byte [esp + 0x158]
cmp al, 3
je 0x404408
cmp al, 0xb
je 0x404415
cmp al, bl
jne 0x40437d
cmp word [esp + 0x15c], 0xd8
je 0x404387
call ebp
cmp eax, edi
jb 0x4042d1
call ebp
cmp eax, edi
ja 0x4043d4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40439f
movzx ecx, byte [esp + 0x14c]
mov dword [eax], ecx
call ebp
mov edi, eax
sub edi, dword [esp + 0x161]
push esi
call sub.WSOCK32.dll_closesocket
cmp edi, ebx
mov eax, 1
je 0x4043bb
mov eax, edi
mov ecx, dword [esp + 0x288]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040c6d6
add esp, 0x27c
ret
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffc1b
jmp 0x4043bb
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffc18
jmp 0x4043bb
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
push edi
call sub.WSOCK32.dll_WSASetLastError
mov eax, 0xfffffc18
jmp 0x4043bb
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffc1d
jmp 0x4043bb
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffc1e
jmp 0x4043bb