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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x344
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push esi
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], 0
mov ebx, edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
push edi
mov edi, dword [ebp + 0xc]
cmp ecx, 0xffffffff
jne 0x10010585
cmp ebx, ecx
jne 0x10010585
cmp dword [ebp + 8], ecx
jne 0x10010585
test edi, edi
je 0x1001056e
jns 0x10010567
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.100370be
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.100370be
mov esp, ebp
pop ebp
ret
test edi, edi
jle 0x100105bb
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
mov eax, edx
shr eax, 6
imul ecx, eax, 0x3e8
mov dword [esp + 0x20], eax
sub esi, ecx
mov ecx, dword [esp + 0x18]
imul eax, esi, 0x3e8
mov dword [esp + 0x1c], eax
xor eax, eax
xor esi, esi
or edx, 0xffffffff
mov dword [esp + 0x240], eax
mov dword [esp + 0x30], esi
cmp ecx, 0xffffffff
je 0x100105f1
mov esi, 1
mov dword [esp + 0x34], ecx
mov eax, esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x244], ecx
mov edx, ecx
mov dword [esp + 0x240], eax
cmp ebx, 0xffffffff
je 0x10010659
xor ecx, ecx
test esi, esi
je 0x1001060b
lea esp, [esp]
cmp dword [esp + ecx*4 + 0x34], ebx
je 0x1001060b
inc ecx
cmp ecx, esi
jb 0x10010600
cmp ecx, esi
jne 0x10010621
cmp esi, 0x40
jae 0x10010621
mov dword [esp + ecx*4 + 0x34], ebx
mov esi, dword [esp + 0x30]
inc esi
mov dword [esp + 0x30], esi
xor ecx, ecx
test eax, eax
je 0x10010635
cmp dword [esp + ecx*4 + 0x244], ebx
je 0x10010635
inc ecx
cmp ecx, eax
jb 0x10010627
cmp ecx, eax
jne 0x10010654
cmp eax, 0x40
jae 0x10010654
mov dword [esp + ecx*4 + 0x244], ebx
mov eax, dword [esp + 0x240]
inc eax
mov dword [esp + 0x240], eax
cmp ebx, edx
cmova edx, ebx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x138], 0
cmp ecx, 0xffffffff
je 0x100106ba
mov dword [esp + 0x13c], ecx
xor ecx, ecx
mov dword [esp + 0x138], 1
test eax, eax
je 0x10010699
mov ebx, dword [ebp + 8]
cmp dword [esp + ecx*4 + 0x244], ebx
je 0x10010695
inc ecx
cmp ecx, eax
jb 0x10010687
mov ebx, dword [esp + 0x10]
cmp ecx, eax
jne 0x100106b3
cmp eax, 0x40
jae 0x100106b3
mov eax, dword [ebp + 8]
mov dword [esp + ecx*4 + 0x244], eax
inc dword [esp + 0x240]
cmp dword [ebp + 8], edx
cmova edx, dword [ebp + 8]
xor ecx, ecx
lea eax, [esp + 0x24]
test edi, edi
cmovs eax, ecx
lea ecx, [edx + 1]
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], ecx
test edi, edi
jle 0x10010705
mov ecx, dword [esp + 0x14]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x24], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
jmp 0x10010717
jne 0x10010717
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
push eax
xor ecx, ecx
lea eax, [esp + 0x244]
cmp dword [esp + 0x13c], ecx
push eax
lea eax, [esp + 0x140]
cmove eax, ecx
test esi, esi
push eax
lea eax, [esp + 0x3c]
cmove eax, ecx
push eax
push dword [esp + 0x3c]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x100107e2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x10010773
cmp dword [0x1006072c], 0
jne 0x1001054f
cmp eax, 0x2714
jne 0x1001054f
test edi, edi
jg 0x10010784
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
jmp 0x100106d0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
mov eax, dword [esp + 0x20]
shr edx, 6
imul ecx, edx, 0x3e8
sub eax, edx
sub esi, ecx
imul ecx, esi, 0x3e8
imul esi, eax, 0x3e8
mov eax, 0x10624dd3
sub ecx, dword [esp + 0x1c]
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
sub esi, eax
add esi, edi
mov dword [esp + 0x14], esi
test esi, esi
jle 0x1001056e
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
jmp 0x100106d0
test eax, eax
js 0x1001054f
je 0x1001056e
mov eax, dword [esp + 0x18]
xor esi, esi
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp eax, 0xffffffff
je 0x10010828
lea ecx, [esp + 0x30]
push ecx
push eax
call edi
test eax, eax
mov ecx, 1
lea eax, [esp + 0x240]
push eax
push dword [esp + 0x1c]
cmovne esi, ecx
call edi
test eax, eax
je 0x10010828
or esi, 4
cmp ebx, 0xffffffff
je 0x1001084e
lea eax, [esp + 0x30]
push eax
push ebx
call edi
test eax, eax
je 0x1001083c
or esi, 8
lea eax, [esp + 0x240]
push eax
push ebx
call edi
test eax, eax
je 0x1001084e
or esi, 4
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
je 0x1001087a
lea eax, [esp + 0x138]
push eax
push ebx
call edi
test eax, eax
je 0x10010868
or esi, 2
lea eax, [esp + 0x240]
push eax
push ebx
call edi
test eax, eax
je 0x1001087a
or esi, 4
mov ecx, dword [esp + 0x34c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100370be
mov esp, ebp
pop ebp
ret