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

Disassembly:
sub esp, 0x324
mov ecx, dword [esp + 0x328]
push esi
xor esi, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], esi
mov dword [esp + 4], esi
cmp ecx, esi
je 0x1002139b
mov edx, dword [esp + 0x330]
xor eax, eax
cmp edx, esi
jbe 0x1002139b
lea ecx, [ecx]
cmp dword [ecx + eax*8], 0xffffffff
jne 0x100213b3
inc eax
cmp eax, edx
jb 0x10021390
mov eax, dword [esp + 0x334]
push eax
call fcn.10021030
add esp, 4
pop esi
add esp, 0x324
ret
mov eax, dword [esp + 0x334]
cmp eax, esi
jle 0x100213cf
mov dword [esp + 4], eax
call fcn.10029080
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
push ebx
push ebp
push edi
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x12c], ebp
mov dword [esp + 0x28], edi
mov dword [esp + 0x230], esi
mov dword [esp + 0x14], 0xffffffff
xor ebx, ebx
mov eax, dword [esp + 0x338]
xor ecx, ecx
mov word [eax + ebx*8 + 6], cx
mov ecx, dword [eax + ebx*8]
cmp ecx, 0xffffffff
je 0x100214c1
movzx edx, word [eax + ebx*8 + 4]
test dl, 7
je 0x100214c1
cmp ecx, dword [esp + 0x14]
jbe 0x10021424
mov dword [esp + 0x14], ecx
test dl, 1
je 0x1002145d
xor eax, eax
test ebp, ebp
jbe 0x1002143e
nop
cmp dword [esp + eax*4 + 0x130], ecx
je 0x1002143e
inc eax
cmp eax, ebp
jb 0x10021430
cmp eax, ebp
jne 0x1002145d
cmp ebp, 0x40
jae 0x1002145d
mov dword [esp + eax*4 + 0x130], ecx
mov ebp, dword [esp + 0x12c]
inc ebp
mov dword [esp + 0x12c], ebp
test dl, 4
je 0x10021489
xor eax, eax
test edi, edi
jbe 0x10021473
cmp dword [esp + eax*4 + 0x2c], ecx
je 0x10021473
inc eax
cmp eax, edi
jb 0x10021468
cmp eax, edi
jne 0x10021489
cmp edi, 0x40
jae 0x10021489
mov dword [esp + eax*4 + 0x2c], ecx
mov edi, dword [esp + 0x28]
inc edi
mov dword [esp + 0x28], edi
test dl, 2
je 0x100214c1
xor eax, eax
test esi, esi
jbe 0x100214a2
cmp dword [esp + eax*4 + 0x234], ecx
je 0x100214a2
inc eax
cmp eax, esi
jb 0x10021494
cmp eax, esi
jne 0x100214c1
cmp esi, 0x40
jae 0x100214c1
mov dword [esp + eax*4 + 0x234], ecx
mov esi, dword [esp + 0x230]
inc esi
mov dword [esp + 0x230], esi
inc ebx
cmp ebx, dword [esp + 0x33c]
jb 0x100213f2
mov ebx, dword [esp + 0x14]
mov edi, dword [sym.imp.WS2_32.dll_select]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edx, edx
cmp dword [esp + 0x340], edx
lea eax, [esp + 0x20]
setl dl
dec edx
and edx, eax
mov esi, edx
inc ebx
mov eax, dword [esp + 0x340]
xor ecx, ecx
cmp eax, ecx
jle 0x1002152d
mov ecx, dword [esp + 0x10]
mov eax, 0x10624dd3
imul dword [esp + 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
jmp 0x10021533
jne 0x10021537
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
push esi
lea edx, [esp + 0x234]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x138]
push ecx
push ebx
call edi
cmp eax, 0xffffffff
jne 0x100215b1
call ebp
test eax, eax
je 0x1002156b
cmp dword [0x1003b0a8], 0
jne 0x100215b5
cmp eax, 0x2714
jne 0x100215b5
cmp dword [esp + 0x340], 0
jle 0x100214f5
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push edx
push eax
call fcn.10029080
push edx
push eax
call fcn.100290b0
mov ecx, dword [esp + 0x350]
sub ecx, eax
add esp, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
jg 0x100214f5
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 0x324
ret
test eax, eax
jge 0x100215c3
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 0x324
ret
jne 0x100215d2
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x324
ret
mov esi, dword [esp + 0x338]
mov edi, dword [esp + 0x33c]
xor ebx, ebx
add esi, 6
mov eax, dword [esi - 6]
xor ecx, ecx
mov word [esi], cx
cmp eax, 0xffffffff
je 0x1002163e
lea edx, [esp + 0x12c]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10021608
or word [esi], 1
mov ecx, dword [esi - 6]
lea eax, [esp + 0x28]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002161e
or word [esi], 4
mov eax, dword [esi - 6]
lea edx, [esp + 0x230]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10021637
or word [esi], 2
cmp word [esi], 0
je 0x1002163e
inc ebx
add esi, 8
sub edi, 1
jne 0x100215e5
pop edi
pop ebp
mov eax, ebx
pop ebx
pop esi
add esp, 0x324
ret