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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, ecx
push esi
xor esi, esi
mov dword [ebp - 0x338], eax
or ecx, 0xffffffff
mov dword [ebp - 0x334], esi
mov dword [ebp - 0x330], esi
push edi
mov edi, edx
cmp eax, ecx
jne 0x4ae850
cmp edi, ecx
jne 0x4ae850
mov ecx, ebx
call fcn.004ae7e9
jmp 0x4aea46
test ebx, ebx
jle 0x4ae86b
call fcn.004af5eb
mov dword [ebp - 0x334], eax
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x330], edx
xor edx, edx
mov dword [ebp - 0x21c], esi
test ebx, ebx
mov ecx, ebx
cmovle ecx, edx
inc edx
mov dword [ebp - 0x328], ecx
mov ecx, esi
mov dword [ebp - 0x114], ecx
cmp eax, 0xffffffff
je 0x4ae8a8
mov ecx, edx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x114], ecx
mov edx, eax
mov dword [ebp - 0x324], esi
push 0xffffffffffffffff
pop eax
cmove edx, eax
cmp edi, eax
je 0x4ae8f9
mov dword [ebp - 0x320], edi
mov eax, esi
mov dword [ebp - 0x324], 1
test ecx, ecx
je 0x4ae8de
cmp dword [ebp + eax*4 - 0x110], edi
je 0x4ae8de
inc eax
cmp eax, ecx
jb 0x4ae8d0
cmp eax, ecx
jne 0x4ae8f4
cmp ecx, 0x40
jae 0x4ae8f4
mov dword [ebp + eax*4 - 0x110], edi
inc dword [ebp - 0x114]
cmp edi, edx
cmova edx, edi
xor ecx, ecx
lea eax, [ebp - 0x340]
test ebx, ebx
cmovs eax, ecx
lea ecx, [edx + 1]
mov dword [ebp - 0x344], ecx
mov ecx, dword [ebp - 0x328]
mov dword [ebp - 0x32c], eax
test ebx, ebx
jle 0x4ae943
mov eax, ecx
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x340], eax
imul eax, edx, 0x3e8
mov dword [ebp - 0x33c], eax
mov eax, dword [ebp - 0x32c]
jmp 0x4ae951
jne 0x4ae951
mov dword [ebp - 0x340], esi
mov dword [ebp - 0x33c], esi
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x344]
call dword [sym.imp.WS2_32.dll_select]
or ecx, 0xffffffff
cmp eax, ecx
jne 0x4ae9cf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x4ae98b
cmp eax, 0x2714
jne 0x4ae9d3
mov ecx, dword [ebp - 0x328]
mov eax, dword [ebp - 0x32c]
test ebx, ebx
jle 0x4ae943
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call fcn.004af5eb
push edx
push eax
call fcn.004af601
mov ecx, ebx
add esp, 0x10
sub ecx, eax
mov dword [ebp - 0x328], ecx
test ecx, ecx
jle 0x4ae9d3
mov eax, dword [ebp - 0x32c]
jmp 0x4ae91b
test eax, eax
jns 0x4ae9d8
or eax, 0xffffffff
jmp 0x4aea46
jne 0x4ae9de
xor eax, eax
jmp 0x4aea46
mov ebx, dword [ebp - 0x338]
cmp ebx, ecx
je 0x4aea16
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
push 1
test eax, eax
pop eax
cmovne esi, eax
lea eax, [ebp - 0x114]
push eax
push ebx
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x4aea13
or esi, 4
or ecx, 0xffffffff
cmp edi, ecx
je 0x4aea44
lea eax, [ebp - 0x324]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x4aea2f
or esi, 2
lea eax, [ebp - 0x114]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x4aea44
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005121be
leave
ret