Function at 0x4a87a9
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
je 0x4a87d9
xor eax, eax
cmp dword [ebp + 0xc], esi
jbe 0x4a87d9
cmp dword [ebx + eax*8], 0xffffffff
jne 0x4a87e7
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x4a87cd
push dword [ebp + 0x10]
call fcn.004a84be
pop ecx
jmp 0x4a8a64
mov eax, dword [ebp + 0x10]
cmp eax, esi
jle 0x4a87fc
mov dword [ebp - 0xc], eax
call fcn.004b04c1
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
or dword [ebp - 8], 0xffffffff
push edi
xor ecx, ecx
xor edi, edi
and dword [ebp - 4], ecx
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x328], edi
mov edx, dword [ebp - 4]
shl edx, 3
lea eax, [edx + ebx + 4]
mov edx, dword [edx + ebx]
and word [eax + 2], 0
cmp edx, 0xffffffff
je 0x4a88ee
movzx ebx, word [eax]
test bl, 7
je 0x4a88eb
cmp edx, dword [ebp - 8]
jbe 0x4a8849
mov dword [ebp - 8], edx
test bl, 1
je 0x4a887f
xor eax, eax
test ecx, ecx
jbe 0x4a8862
cmp dword [ebp + eax*4 - 0x11c], edx
je 0x4a8862
inc eax
cmp eax, ecx
jb 0x4a8854
cmp eax, ecx
jne 0x4a887f
cmp ecx, 0x40
jae 0x4a887f
mov dword [ebp + eax*4 - 0x11c], edx
mov ecx, dword [ebp - 0x120]
inc ecx
mov dword [ebp - 0x120], ecx
test bl, 4
je 0x4a88b5
xor eax, eax
test esi, esi
jbe 0x4a8898
cmp dword [ebp + eax*4 - 0x220], edx
je 0x4a8898
inc eax
cmp eax, esi
jb 0x4a888a
cmp eax, esi
jne 0x4a88b5
cmp esi, 0x40
jae 0x4a88b5
mov dword [ebp + eax*4 - 0x220], edx
mov esi, dword [ebp - 0x224]
inc esi
mov dword [ebp - 0x224], esi
test bl, 2
je 0x4a88eb
xor eax, eax
test edi, edi
jbe 0x4a88ce
cmp dword [ebp + eax*4 - 0x324], edx
je 0x4a88ce
inc eax
cmp eax, edi
jb 0x4a88c0
cmp eax, edi
jne 0x4a88eb
cmp edi, 0x40
jae 0x4a88eb
mov dword [ebp + eax*4 - 0x324], edx
mov edi, dword [ebp - 0x328]
inc edi
mov dword [ebp - 0x328], edi
mov ebx, dword [ebp + 8]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jb 0x4a881a
xor ebx, ebx
cmp ecx, ebx
jne 0x4a8919
cmp esi, ebx
jne 0x4a8919
cmp edi, ebx
jne 0x4a8919
push dword [ebp + 0x10]
call fcn.004a84be
pop ecx
jmp 0x4a8a63
cmp dword [ebp + 0x10], ebx
jge 0x4a8923
mov dword [ebp - 4], ebx
jmp 0x4a8929
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x4a8944
mov ecx, dword [ebp - 0x120]
mov esi, dword [ebp - 0x224]
mov edi, dword [ebp - 0x328]
cmp dword [ebp + 0x10], ebx
jle 0x4a8964
mov eax, dword [ebp - 0xc]
cdq
mov ebx, 0x3e8
idiv ebx
imul edx, edx, 0x3e8
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
xor ebx, ebx
jmp 0x4a896c
jne 0x4a896c
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
push dword [ebp - 4]
neg edi
sbb edi, edi
lea eax, [ebp - 0x328]
and edi, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x224]
and esi, eax
neg ecx
push edi
sbb ecx, ecx
lea eax, [ebp - 0x120]
push esi
and ecx, eax
push ecx
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x4a89ed
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, ebx
je 0x4a89bd
cmp dword [0x50a2d0], ebx
jne 0x4a89f1
cmp eax, 0x2714
jne 0x4a89f1
cmp dword [ebp + 0x10], ebx
jle 0x4a8932
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004b04c1
push edx
push eax
call fcn.004b04d7
mov ecx, dword [ebp + 0x10]
sub ecx, eax
add esp, 0x10
cmp ecx, ebx
mov dword [ebp - 0xc], ecx
jg 0x4a8932
xor eax, eax
cmp eax, ebx
jge 0x4a89f6
or eax, 0xffffffff
jmp 0x4a8a63
jne 0x4a89fc
xor eax, eax
jmp 0x4a8a63
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
add esi, 6
mov eax, dword [esi - 6]
and word [esi], 0
cmp eax, 0xffffffff
je 0x4a8a5b
lea ecx, [ebp - 0x120]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a8a26
or word [esi], 1
lea eax, [ebp - 0x224]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a8a3d
or word [esi], 4
lea eax, [ebp - 0x328]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a8a54
or word [esi], 2
cmp word [esi], 0
je 0x4a8a5b
inc ebx
add esi, 8
dec edi
jne 0x4a8a05
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret