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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov edx, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0xc], ebx
cmp edx, ebx
je 0x41070a
xor eax, eax
cmp dword [ebp + 0xc], ebx
jbe 0x41070a
cmp dword [edx + eax*8], 0xffffffff
jne 0x410718
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x4106fe
push dword [ebp + 0x10]
call fcn.00410385
pop ecx
jmp 0x4109b7
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jle 0x410738
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x38]
push eax
call fcn.0041a826
mov edx, dword [ebp + 8]
mov esi, eax
lea edi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
movsd dword es:[edi], dword [esi]
xor ecx, ecx
xor esi, esi
xor edi, edi
or dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x344], edi
mov dword [ebp - 4], ebx
jmp 0x41075c
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
shl eax, 3
mov dword [ebp - 0x10], eax
xor ebx, ebx
lea eax, [eax + edx + 4]
mov word [eax + 2], bx
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebx + edx]
cmp edx, 0xffffffff
je 0x410834
movzx ebx, word [eax]
test bl, 7
je 0x410834
cmp edx, dword [ebp - 8]
jbe 0x410792
mov dword [ebp - 8], edx
test bl, 1
je 0x4107c8
xor eax, eax
test ecx, ecx
jbe 0x4107ab
cmp dword [ebp + eax*4 - 0x138], edx
je 0x4107ab
inc eax
cmp eax, ecx
jb 0x41079d
cmp eax, ecx
jne 0x4107c8
cmp ecx, 0x40
jae 0x4107c8
mov dword [ebp + eax*4 - 0x138], edx
mov ecx, dword [ebp - 0x13c]
inc ecx
mov dword [ebp - 0x13c], ecx
test bl, 4
je 0x4107fe
xor eax, eax
test esi, esi
jbe 0x4107e1
cmp dword [ebp + eax*4 - 0x23c], edx
je 0x4107e1
inc eax
cmp eax, esi
jb 0x4107d3
cmp eax, esi
jne 0x4107fe
cmp esi, 0x40
jae 0x4107fe
mov dword [ebp + eax*4 - 0x23c], edx
mov esi, dword [ebp - 0x240]
inc esi
mov dword [ebp - 0x240], esi
test bl, 2
je 0x410834
xor eax, eax
test edi, edi
jbe 0x410817
cmp dword [ebp + eax*4 - 0x340], edx
je 0x410817
inc eax
cmp eax, edi
jb 0x410809
cmp eax, edi
jne 0x410834
cmp edi, 0x40
jae 0x410834
mov dword [ebp + eax*4 - 0x340], edx
mov edi, dword [ebp - 0x344]
inc edi
mov dword [ebp - 0x344], edi
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jb 0x410759
xor ebx, ebx
cmp ecx, ebx
jne 0x410855
cmp esi, ebx
jne 0x410855
cmp edi, ebx
je 0x41070a
cmp dword [ebp + 0x10], ebx
jge 0x41085f
mov dword [ebp - 4], ebx
jmp 0x410865
lea eax, [ebp - 0x18]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 0x10], eax
jmp 0x410880
mov ecx, dword [ebp - 0x13c]
mov esi, dword [ebp - 0x240]
mov edi, dword [ebp - 0x344]
cmp dword [ebp + 0x10], ebx
jle 0x41089e
mov eax, dword [ebp - 0xc]
cdq
mov ebx, 0x3e8
idiv ebx
imul edx, edx, 0x3e8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
jmp 0x4108a6
jne 0x4108a6
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
push dword [ebp - 4]
neg edi
sbb edi, edi
lea eax, [ebp - 0x344]
and edi, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x240]
and esi, eax
neg ecx
push edi
sbb ecx, ecx
lea eax, [ebp - 0x13c]
push esi
and ecx, eax
push ecx
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x41093e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ebx, ebx
cmp eax, ebx
je 0x4108f9
cmp dword [0x48f670], ebx
jne 0x410944
cmp eax, 0x2714
jne 0x410944
cmp dword [ebp + 0x10], ebx
jle 0x41086e
lea eax, [ebp - 0x38]
push eax
call fcn.0041a826
sub esp, 0xc
mov edi, esp
lea esi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0041a84b
mov ecx, dword [ebp + 0x10]
sub ecx, eax
add esp, 0x20
cmp ecx, ebx
mov dword [ebp - 0xc], ecx
jg 0x41086e
xor eax, eax
jmp 0x410940
xor ebx, ebx
cmp eax, ebx
jge 0x410949
or eax, 0xffffffff
jmp 0x4109b7
jne 0x41094f
xor eax, eax
jmp 0x4109b7
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
add esi, 6
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x4109af
lea ecx, [ebp - 0x13c]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41097a
or word [esi], 1
lea eax, [ebp - 0x240]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410991
or word [esi], 4
lea eax, [ebp - 0x344]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4109a8
or word [esi], 2
cmp word [esi], 0
je 0x4109af
inc ebx
add esi, 8
dec edi
jne 0x410958
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret