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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x5b31c8]
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 0x507dd0
cmp ebx, edi
jne 0x507dd0
cmp dword [ebp + 8], edi
jne 0x507dd0
mov ecx, eax
call fcn.00507d58
jmp 0x50806d
test eax, eax
jle 0x507df1
mov dword [ebp - 0x32c], eax
call fcn.00508db9
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 0x507e32
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 0x507e97
mov edx, esi
test eax, eax
je 0x507e4b
cmp dword [ebp + edx*4 - 0x214], ebx
je 0x507e4b
inc edx
cmp edx, eax
jb 0x507e3d
cmp edx, eax
jne 0x507e61
cmp eax, 0x40
jae 0x507e61
mov dword [ebp + edx*4 - 0x214], ebx
inc dword [ebp - 0x218]
mov eax, esi
test ecx, ecx
je 0x507e75
cmp dword [ebp + eax*4 - 0x10c], ebx
je 0x507e75
inc eax
cmp eax, ecx
jb 0x507e67
cmp eax, ecx
jne 0x507e92
cmp ecx, 0x40
jae 0x507e92
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 0x507ee4
mov dword [ebp - 0x31c], eax
mov edx, esi
mov dword [ebp - 0x320], 1
test ecx, ecx
je 0x507ec9
cmp dword [ebp + edx*4 - 0x10c], eax
je 0x507ec9
inc edx
cmp edx, ecx
jb 0x507ebb
cmp edx, ecx
jne 0x507edf
cmp ecx, 0x40
jae 0x507edf
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 0x507f3f
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 0x507f4d
jne 0x507f4d
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 0x507fcb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x507f80
cmp eax, 0x2714
jne 0x507fcf
mov ecx, dword [ebp - 0x33c]
mov eax, dword [ebp - 0x330]
test edi, edi
jle 0x507f3f
push dword [ebp - 0x338]
push dword [ebp - 0x334]
call fcn.00508db9
push edx
push eax
call fcn.00508dcf
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 0x507f0a
mov eax, esi
test eax, eax
jns 0x507fd7
or eax, 0xffffffff
jmp 0x50806d
jne 0x507fe0
xor eax, eax
jmp 0x50806d
mov eax, dword [ebp - 0x328]
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp eax, 0xffffffff
je 0x50801a
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 0x50801a
or esi, 4
cmp ebx, 0xffffffff
je 0x508041
lea eax, [ebp - 0x218]
push eax
push ebx
call edi
test eax, eax
je 0x508030
or esi, 8
lea eax, [ebp - 0x110]
push eax
push ebx
call edi
test eax, eax
je 0x508041
or esi, 4
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
je 0x50806b
lea eax, [ebp - 0x320]
push eax
push ebx
call edi
test eax, eax
je 0x50805a
or esi, 2
lea eax, [ebp - 0x110]
push eax
push ebx
call edi
test eax, eax
je 0x50806b
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret