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

Disassembly:
sub esp, 0x33c
push ebx
mov ebx, dword [esp + 0x344]
push ebp
push esi
xor esi, esi
cmp ebx, esi
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], esi
je 0x1002d4f1
mov ecx, dword [esp + 0x354]
xor eax, eax
cmp ecx, esi
jbe 0x1002d4f1
cmp dword [ebx + eax*8], 0xffffffff
jne 0x1002d50c
add eax, 1
cmp eax, ecx
jb 0x1002d4e4
mov eax, dword [esp + 0x358]
push eax
call fcn.1002d080
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
mov eax, dword [esp + 0x358]
cmp eax, esi
jle 0x1002d543
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x14], eax
call fcn.1003fb00
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
add esp, 4
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
xor ecx, ecx
xor edi, edi
or eax, 0xffffffff
mov dword [esp + 0x40], ecx
mov dword [esp + 0x144], esi
mov dword [esp + 0x248], edi
mov dword [esp + 0x14], eax
xor ebp, ebp
mov edx, dword [ebx + ebp*8]
cmp edx, 0xffffffff
mov word [ebx + ebp*8 + 6], 0
je 0x1002d63e
movzx ebx, word [ebx + ebp*8 + 4]
test bl, 7
je 0x1002d633
cmp edx, eax
jbe 0x1002d58b
mov dword [esp + 0x14], edx
test bl, 1
je 0x1002d5bb
xor eax, eax
test ecx, ecx
jbe 0x1002d5a3
cmp dword [esp + eax*4 + 0x44], edx
je 0x1002d5a3
add eax, 1
cmp eax, ecx
jb 0x1002d596
cmp eax, ecx
jne 0x1002d5bb
cmp ecx, 0x40
jae 0x1002d5bb
mov dword [esp + eax*4 + 0x44], edx
mov ecx, dword [esp + 0x40]
add ecx, 1
mov dword [esp + 0x40], ecx
test bl, 4
je 0x1002d5f7
xor eax, eax
test esi, esi
jbe 0x1002d5d6
cmp dword [esp + eax*4 + 0x148], edx
je 0x1002d5d6
add eax, 1
cmp eax, esi
jb 0x1002d5c6
cmp eax, esi
jne 0x1002d5f7
cmp esi, 0x40
jae 0x1002d5f7
mov dword [esp + eax*4 + 0x148], edx
mov esi, dword [esp + 0x144]
add esi, 1
mov dword [esp + 0x144], esi
test bl, 2
je 0x1002d633
xor eax, eax
test edi, edi
jbe 0x1002d612
cmp dword [esp + eax*4 + 0x24c], edx
je 0x1002d612
add eax, 1
cmp eax, edi
jb 0x1002d602
cmp eax, edi
jne 0x1002d633
cmp edi, 0x40
jae 0x1002d633
mov dword [esp + eax*4 + 0x24c], edx
mov edi, dword [esp + 0x248]
add edi, 1
mov dword [esp + 0x248], edi
mov ebx, dword [esp + 0x350]
mov eax, dword [esp + 0x14]
add ebp, 1
cmp ebp, dword [esp + 0x354]
jb 0x1002d562
test ecx, ecx
jne 0x1002d675
test esi, esi
jne 0x1002d675
test edi, edi
jne 0x1002d675
mov ecx, dword [esp + 0x358]
push ecx
call fcn.1002d080
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
xor ebx, ebx
cmp dword [esp + 0x358], ebx
lea edx, [esp + 0x28]
setl bl
lea ebp, [eax + 1]
sub ebx, 1
and ebx, edx
jmp 0x1002d6a2
mov edi, dword [esp + 0x248]
mov esi, dword [esp + 0x144]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x358]
xor edx, edx
cmp eax, edx
jle 0x1002d6da
mov eax, 0x10624dd3
imul dword [esp + 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x28], eax
imul eax, eax, 0x3e8
sub edx, eax
imul edx, edx, 0x3e8
jmp 0x1002d6e0
jne 0x1002d6e4
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
neg edi
sbb edi, edi
lea eax, [esp + 0x248]
and edi, eax
neg esi
sbb esi, esi
push ebx
lea edx, [esp + 0x148]
and esi, edx
neg ecx
push edi
sbb ecx, ecx
lea eax, [esp + 0x48]
push esi
and ecx, eax
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1002d7ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1002d73a
cmp dword [0x101cfe28], 0
jne 0x1002d7af
cmp eax, 0x2714
jne 0x1002d7af
cmp dword [esp + 0x358], 0
jle 0x1002d690
lea ecx, [esp + 0x30]
push ecx
call fcn.1003fb00
mov edx, dword [esp + 0x1c]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x2c]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x30]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x34]
mov dword [ecx + 0xc], edx
mov edx, dword [eax]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.1003fb40
mov ecx, dword [esp + 0x378]
sub ecx, eax
add esp, 0x20
test ecx, ecx
mov dword [esp + 0x10], ecx
jle 0x1002d7bf
jmp 0x1002d690
test eax, eax
jge 0x1002d7bd
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
jne 0x1002d7cc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
mov esi, dword [esp + 0x350]
mov edi, dword [esp + 0x354]
xor ebx, ebx
add esi, 6
nop
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
mov word [esi], 0
je 0x1002d83b
lea ecx, [esp + 0x40]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d800
or word [esi], 1
mov eax, dword [esi - 6]
lea edx, [esp + 0x144]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d819
or word [esi], 4
mov edx, dword [esi - 6]
lea ecx, [esp + 0x248]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d832
or word [esi], 2
cmp word [esi], 0
je 0x1002d83b
add ebx, 1
add esi, 8
sub edi, 1
jne 0x1002d7e0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x33c
ret