Function at 0x403410
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 0x403476
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 0x403498
push 4
push eax
push 7
push ebx
push esi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x403564
mov edx, dword [esp + 0x288]
mov word [esp + 0x18], 2
mov word [esp + 0x1a], bx
mov eax, dword [edx]
mov byte [0x41ad38], 8
mov dword [esp + 0x1c], eax
mov eax, dword [0x415800]
mov word [0x41ad3e], ax
inc eax
mov dword [0x415800], eax
mov byte [0x41ad39], bl
mov word [0x41ad3a], bx
mov word [0x41ad3c], 0xd8
xor eax, eax
mov cl, al
add cl, 0x20
mov byte [eax + 0x41ad45], cl
inc eax
cmp eax, 0x20
jl 0x4034e1
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov dword [0x41ad41], eax
mov ecx, 0x41ad38
xor eax, eax
mov edx, 0x16
xor edi, edi
mov di, word [ecx]
add ecx, 2
add eax, edi
dec edx
jne 0x40350b
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 0x41ad38
not edx
push esi
mov word [0x41ad3a], dx
call sub.WSOCK32.dll_sendto
cmp eax, 0x2d
jae 0x403592
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 0x403657
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 0x40365d
cmp eax, 0xffffffff
je 0x403673
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 0x403689
cmp eax, 0x1d
jb 0x40364d
mov al, byte [esp + 0x50]
cmp al, 3
je 0x4036ac
cmp al, 0xb
je 0x4036c2
cmp al, bl
jne 0x40364d
cmp word [esp + 0x54], 0xd8
je 0x403657
call ebp
cmp eax, edi
jb 0x4035a8
call ebp
cmp eax, edi
jbe 0x4036d8
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 0x4036ef
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 0x40370a
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x274
ret