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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x5ca1c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x324], eax
push edi
mov ebx, edx
mov dword [ebp - 0x334], esi
mov edx, ecx
mov dword [ebp - 0x338], esi
or edi, 0xffffffff
mov dword [ebp - 0x328], edx
mov dword [ebp - 0x32c], esi
cmp edx, edi
jne 0x51a0bd
cmp ebx, edi
jne 0x51a0bd
cmp dword [ebp + 8], edi
jne 0x51a0bd
mov ecx, eax
call fcn.0051a045
jmp 0x51a35a
test eax, eax
jle 0x51a0de
mov dword [ebp - 0x32c], eax
call fcn.0051b03d
mov dword [ebp - 0x338], edx
mov edx, dword [ebp - 0x328]
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x340], 1
mov ecx, esi
mov dword [ebp - 0x110], ecx
mov eax, esi
mov dword [ebp - 0x218], eax
cmp edx, 0xffffffff
je 0x51a11f
mov ecx, dword [ebp - 0x340]
mov edi, edx
mov eax, ecx
mov dword [ebp - 0x214], edx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], ecx
cmp ebx, 0xffffffff
je 0x51a184
mov edx, esi
test eax, eax
je 0x51a138
cmp dword [ebp + edx*4 - 0x214], ebx
je 0x51a138
inc edx
cmp edx, eax
jb 0x51a12a
cmp edx, eax
jne 0x51a14e
cmp eax, 0x40
jae 0x51a14e
mov dword [ebp + edx*4 - 0x214], ebx
inc dword [ebp - 0x218]
mov eax, esi
test ecx, ecx
je 0x51a162
cmp dword [ebp + eax*4 - 0x10c], ebx
je 0x51a162
inc eax
cmp eax, ecx
jb 0x51a154
cmp eax, ecx
jne 0x51a17f
cmp ecx, 0x40
jae 0x51a17f
mov dword [ebp + eax*4 - 0x10c], ebx
mov ecx, dword [ebp - 0x110]
inc ecx
mov dword [ebp - 0x110], ecx
cmp ebx, edi
cmova edi, ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x320], esi
cmp eax, 0xffffffff
je 0x51a1d1
mov dword [ebp - 0x31c], eax
mov edx, esi
mov dword [ebp - 0x320], 1
test ecx, ecx
je 0x51a1b6
cmp dword [ebp + edx*4 - 0x10c], eax
je 0x51a1b6
inc edx
cmp edx, ecx
jb 0x51a1a8
cmp edx, ecx
jne 0x51a1cc
cmp ecx, 0x40
jae 0x51a1cc
mov dword [ebp + edx*4 - 0x10c], eax
inc dword [ebp - 0x110]
cmp eax, edi
cmova edi, eax
xor eax, eax
lea ecx, [ebp - 0x348]
cmp dword [ebp - 0x324], eax
cmovl ecx, eax
lea eax, [edi + 1]
mov edi, dword [ebp - 0x324]
mov dword [ebp - 0x33c], ecx
mov dword [ebp - 0x330], eax
test edi, edi
jle 0x51a22c
mov eax, dword [ebp - 0x32c]
cdq
mov dword [ebp - 0x324], 0x3e8
idiv dword [ebp - 0x324]
mov dword [ebp - 0x348], eax
imul eax, edx, 0x3e8
mov dword [ebp - 0x344], eax
mov eax, dword [ebp - 0x330]
jmp 0x51a23a
jne 0x51a23a
mov dword [ebp - 0x348], esi
mov dword [ebp - 0x344], esi
push ecx
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0x320]
push ecx
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x51a2b8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x51a26d
cmp eax, 0x2714
jne 0x51a2bc
mov ecx, dword [ebp - 0x33c]
mov eax, dword [ebp - 0x330]
test edi, edi
jle 0x51a22c
push dword [ebp - 0x338]
push dword [ebp - 0x334]
call fcn.0051b03d
push edx
push eax
call fcn.0051b053
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp - 0x330]
mov dword [ebp - 0x32c], ecx
test ecx, ecx
mov ecx, dword [ebp - 0x33c]
jg 0x51a1f7
mov eax, esi
test eax, eax
jns 0x51a2c4
or eax, 0xffffffff
jmp 0x51a35a
jne 0x51a2cd
xor eax, eax
jmp 0x51a35a
mov eax, dword [ebp - 0x328]
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp eax, 0xffffffff
je 0x51a307
lea ecx, [ebp - 0x218]
push ecx
push eax
call edi
test eax, eax
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x328]
cmovne esi, dword [ebp - 0x340]
call edi
test eax, eax
je 0x51a307
or esi, 4
cmp ebx, 0xffffffff
je 0x51a32e
lea eax, [ebp - 0x218]
push eax
push ebx
call edi
test eax, eax
je 0x51a31d
or esi, 8
lea eax, [ebp - 0x110]
push eax
push ebx
call edi
test eax, eax
je 0x51a32e
or esi, 4
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
je 0x51a358
lea eax, [ebp - 0x320]
push eax
push ebx
call edi
test eax, eax
je 0x51a347
or esi, 2
lea eax, [ebp - 0x110]
push eax
push ebx
call edi
test eax, eax
je 0x51a358
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055fedc
mov esp, ebp
pop ebp
ret