Function at 0x4ae0a3
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 0x4ae0d3
xor eax, eax
cmp dword [ebp + 0xc], esi
jbe 0x4ae0d3
cmp dword [ebx + eax*8], 0xffffffff
jne 0x4ae0e1
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x4ae0c7
push dword [ebp + 0x10]
call fcn.004addb8
pop ecx
jmp 0x4ae35e
mov eax, dword [ebp + 0x10]
cmp eax, esi
jle 0x4ae0f6
mov dword [ebp - 0xc], eax
call fcn.004b5dbb
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 0x4ae1e8
movzx ebx, word [eax]
test bl, 7
je 0x4ae1e5
cmp edx, dword [ebp - 8]
jbe 0x4ae143
mov dword [ebp - 8], edx
test bl, 1
je 0x4ae179
xor eax, eax
test ecx, ecx
jbe 0x4ae15c
cmp dword [ebp + eax*4 - 0x11c], edx
je 0x4ae15c
inc eax
cmp eax, ecx
jb 0x4ae14e
cmp eax, ecx
jne 0x4ae179
cmp ecx, 0x40
jae 0x4ae179
mov dword [ebp + eax*4 - 0x11c], edx
mov ecx, dword [ebp - 0x120]
inc ecx
mov dword [ebp - 0x120], ecx
test bl, 4
je 0x4ae1af
xor eax, eax
test esi, esi
jbe 0x4ae192
cmp dword [ebp + eax*4 - 0x220], edx
je 0x4ae192
inc eax
cmp eax, esi
jb 0x4ae184
cmp eax, esi
jne 0x4ae1af
cmp esi, 0x40
jae 0x4ae1af
mov dword [ebp + eax*4 - 0x220], edx
mov esi, dword [ebp - 0x224]
inc esi
mov dword [ebp - 0x224], esi
test bl, 2
je 0x4ae1e5
xor eax, eax
test edi, edi
jbe 0x4ae1c8
cmp dword [ebp + eax*4 - 0x324], edx
je 0x4ae1c8
inc eax
cmp eax, edi
jb 0x4ae1ba
cmp eax, edi
jne 0x4ae1e5
cmp edi, 0x40
jae 0x4ae1e5
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 0x4ae114
xor ebx, ebx
cmp ecx, ebx
jne 0x4ae213
cmp esi, ebx
jne 0x4ae213
cmp edi, ebx
jne 0x4ae213
push dword [ebp + 0x10]
call fcn.004addb8
pop ecx
jmp 0x4ae35d
cmp dword [ebp + 0x10], ebx
jge 0x4ae21d
mov dword [ebp - 4], ebx
jmp 0x4ae223
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x4ae23e
mov ecx, dword [ebp - 0x120]
mov esi, dword [ebp - 0x224]
mov edi, dword [ebp - 0x328]
cmp dword [ebp + 0x10], ebx
jle 0x4ae25e
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 0x4ae266
jne 0x4ae266
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 0x4ae2e7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, ebx
je 0x4ae2b7
cmp dword [0x50f40c], ebx
jne 0x4ae2eb
cmp eax, 0x2714
jne 0x4ae2eb
cmp dword [ebp + 0x10], ebx
jle 0x4ae22c
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004b5dbb
push edx
push eax
call fcn.004b5dd1
mov ecx, dword [ebp + 0x10]
sub ecx, eax
add esp, 0x10
cmp ecx, ebx
mov dword [ebp - 0xc], ecx
jg 0x4ae22c
xor eax, eax
cmp eax, ebx
jge 0x4ae2f0
or eax, 0xffffffff
jmp 0x4ae35d
jne 0x4ae2f6
xor eax, eax
jmp 0x4ae35d
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 0x4ae355
lea ecx, [ebp - 0x120]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4ae320
or word [esi], 1
lea eax, [ebp - 0x224]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4ae337
or word [esi], 4
lea eax, [ebp - 0x328]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4ae34e
or word [esi], 2
cmp word [esi], 0
je 0x4ae355
inc ebx
add esi, 8
dec edi
jne 0x4ae2ff
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret