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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x5c1334]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0x330], ecx
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x324], eax
push esi
push edi
mov edi, edx
mov dword [ebp - 0x344], edi
cmp ecx, 0xffffffff
jne 0x496640
cmp edi, ecx
jne 0x496640
cmp dword [ebp + 8], ecx
jne 0x496640
test ebx, ebx
je 0x49662d
jns 0x496626
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
test ebx, ebx
jle 0x49667c
mov dword [ebp - 0x324], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
shr edx, 6
imul ecx, edx, 0x3e8
mov dword [ebp - 0x32c], edx
sub esi, ecx
mov ecx, dword [ebp - 0x330]
imul eax, esi, 0x3e8
mov dword [ebp - 0x328], eax
xor eax, eax
mov dword [ebp - 0x218], eax
cmp ecx, 0xffffffff
je 0x4966a0
mov eax, 1
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x10c], ecx
or edx, 0xffffffff
mov esi, ecx
cmp ecx, edx
cmove esi, edx
mov edx, eax
mov dword [ebp - 0x110], edx
cmp edi, 0xffffffff
je 0x49672e
xor ecx, ecx
test eax, eax
je 0x4966ce
nop dword [eax]
cmp dword [ebp + ecx*4 - 0x214], edi
je 0x4966ce
inc ecx
cmp ecx, eax
jb 0x4966c0
cmp ecx, eax
jne 0x4966e4
cmp eax, 0x40
jae 0x4966e4
mov dword [ebp + ecx*4 - 0x214], edi
inc dword [ebp - 0x218]
xor ecx, ecx
test eax, eax
je 0x4966fe
nop word [eax + eax]
cmp dword [ebp + ecx*4 - 0x10c], edi
je 0x4966fe
inc ecx
cmp ecx, eax
jb 0x4966f0
mov edx, eax
mov dword [ebp - 0x110], edx
cmp ecx, eax
jne 0x496729
mov dword [ebp - 0x110], edx
cmp eax, 0x40
jae 0x496729
mov dword [ebp + ecx*4 - 0x10c], edi
mov edx, dword [ebp - 0x110]
inc edx
mov dword [ebp - 0x110], edx
cmp edi, esi
cmova esi, edi
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x320], 0
cmp ecx, 0xffffffff
je 0x49677f
xor eax, eax
mov dword [ebp - 0x31c], ecx
mov dword [ebp - 0x320], 1
test edx, edx
je 0x496764
cmp dword [ebp + eax*4 - 0x10c], ecx
je 0x496764
inc eax
cmp eax, edx
jb 0x496756
cmp eax, edx
jne 0x49677a
cmp edx, 0x40
jae 0x49677a
mov dword [ebp + eax*4 - 0x10c], ecx
inc dword [ebp - 0x110]
cmp ecx, esi
cmova esi, ecx
xor eax, eax
lea edi, [ebp - 0x338]
test ebx, ebx
cmovs edi, eax
lea eax, [esi + 1]
mov esi, dword [ebp - 0x324]
mov dword [ebp - 0x340], edi
mov dword [ebp - 0x33c], eax
test ebx, ebx
jle 0x4967d4
mov eax, 0x10624dd3
mov ecx, esi
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x338], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x334], eax
jmp 0x4967ea
jne 0x4967ea
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
push edi
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x33c]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x496899
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x496837
cmp dword [0x5c82d0], 0
jne 0x496612
cmp eax, 0x2714
jne 0x496612
test ebx, ebx
jle 0x4967d4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
mov eax, 0x10624dd3
mov edi, edx
shr edi, 6
imul ecx, edi, 0x3e8
sub esi, ecx
imul ecx, esi, 0x3e8
sub ecx, dword [ebp - 0x328]
imul ecx
mov eax, dword [ebp - 0x32c]
sar edx, 6
sub eax, edi
imul esi, eax, 0x3e8
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub esi, ecx
add esi, ebx
test esi, esi
jle 0x49662d
mov edi, dword [ebp - 0x340]
jmp 0x4967a1
test eax, eax
js 0x496612
je 0x49662d
mov edi, dword [ebp - 0x330]
xor esi, esi
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp edi, 0xffffffff
je 0x4968df
lea eax, [ebp - 0x218]
push eax
push edi
call ebx
test eax, eax
mov ecx, 1
lea eax, [ebp - 0x110]
push eax
push edi
cmovne esi, ecx
call ebx
test eax, eax
je 0x4968df
or esi, 4
mov edi, dword [ebp - 0x344]
cmp edi, 0xffffffff
je 0x49690c
lea eax, [ebp - 0x218]
push eax
push edi
call ebx
test eax, eax
je 0x4968fb
or esi, 8
lea eax, [ebp - 0x110]
push eax
push edi
call ebx
test eax, eax
je 0x49690c
or esi, 4
mov edi, dword [ebp + 8]
cmp edi, 0xffffffff
je 0x496936
lea eax, [ebp - 0x320]
push eax
push edi
call ebx
test eax, eax
je 0x496925
or esi, 2
lea eax, [ebp - 0x110]
push eax
push edi
call ebx
test eax, eax
je 0x496936
or esi, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00528802
mov esp, ebp
pop ebp
ret