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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x1013a420]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x324], eax
push edi
mov ebx, edx
mov dword [ebp - 0x334], esi
mov edx, ecx
mov dword [ebp - 0x338], esi
or edi, 0xffffffff
mov dword [ebp - 0x328], edx
mov dword [ebp - 0x32c], esi
cmp edx, edi
jne 0x1003020f
cmp ebx, edi
jne 0x1003020f
cmp dword [ebp + 8], edi
jne 0x1003020f
mov ecx, eax
call fcn.10030197
jmp 0x100304ac
test eax, eax
jle 0x10030230
mov dword [ebp - 0x32c], eax
call fcn.1002f4e0
mov dword [ebp - 0x338], edx
mov edx, dword [ebp - 0x328]
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x340], 1
mov ecx, esi
mov dword [ebp - 0x110], ecx
mov eax, esi
mov dword [ebp - 0x218], eax
cmp edx, 0xffffffff
je 0x10030271
mov ecx, dword [ebp - 0x340]
mov edi, edx
mov eax, ecx
mov dword [ebp - 0x214], edx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], ecx
cmp ebx, 0xffffffff
je 0x100302d6
mov edx, esi
test eax, eax
je 0x1003028a
cmp dword [ebp + edx*4 - 0x214], ebx
je 0x1003028a
inc edx
cmp edx, eax
jb 0x1003027c
cmp edx, eax
jne 0x100302a0
cmp eax, 0x40
jae 0x100302a0
mov dword [ebp + edx*4 - 0x214], ebx
inc dword [ebp - 0x218]
mov eax, esi
test ecx, ecx
je 0x100302b4
cmp dword [ebp + eax*4 - 0x10c], ebx
je 0x100302b4
inc eax
cmp eax, ecx
jb 0x100302a6
cmp eax, ecx
jne 0x100302d1
cmp ecx, 0x40
jae 0x100302d1
mov dword [ebp + eax*4 - 0x10c], ebx
mov ecx, dword [ebp - 0x110]
inc ecx
mov dword [ebp - 0x110], ecx
cmp ebx, edi
cmova edi, ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x320], esi
cmp eax, 0xffffffff
je 0x10030323
mov dword [ebp - 0x31c], eax
mov edx, esi
mov dword [ebp - 0x320], 1
test ecx, ecx
je 0x10030308
cmp dword [ebp + edx*4 - 0x10c], eax
je 0x10030308
inc edx
cmp edx, ecx
jb 0x100302fa
cmp edx, ecx
jne 0x1003031e
cmp ecx, 0x40
jae 0x1003031e
mov dword [ebp + edx*4 - 0x10c], eax
inc dword [ebp - 0x110]
cmp eax, edi
cmova edi, eax
xor eax, eax
lea ecx, [ebp - 0x348]
cmp dword [ebp - 0x324], eax
cmovl ecx, eax
lea eax, [edi + 1]
mov edi, dword [ebp - 0x324]
mov dword [ebp - 0x33c], ecx
mov dword [ebp - 0x330], eax
test edi, edi
jle 0x1003037e
mov eax, dword [ebp - 0x32c]
cdq
mov dword [ebp - 0x324], 0x3e8
idiv dword [ebp - 0x324]
mov dword [ebp - 0x348], eax
imul eax, edx, 0x3e8
mov dword [ebp - 0x344], eax
mov eax, dword [ebp - 0x330]
jmp 0x1003038c
jne 0x1003038c
mov dword [ebp - 0x348], esi
mov dword [ebp - 0x344], esi
push ecx
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0x320]
push ecx
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1003040a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x100303bf
cmp eax, 0x2714
jne 0x1003040e
mov ecx, dword [ebp - 0x33c]
mov eax, dword [ebp - 0x330]
test edi, edi
jle 0x1003037e
push dword [ebp - 0x338]
push dword [ebp - 0x334]
call fcn.1002f4e0
push edx
push eax
call fcn.1002f4f6
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp - 0x330]
mov dword [ebp - 0x32c], ecx
test ecx, ecx
mov ecx, dword [ebp - 0x33c]
jg 0x10030349
mov eax, esi
test eax, eax
jns 0x10030416
or eax, 0xffffffff
jmp 0x100304ac
jne 0x1003041f
xor eax, eax
jmp 0x100304ac
mov eax, dword [ebp - 0x328]
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp eax, 0xffffffff
je 0x10030459
lea ecx, [ebp - 0x218]
push ecx
push eax
call edi
test eax, eax
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x328]
cmovne esi, dword [ebp - 0x340]
call edi
test eax, eax
je 0x10030459
or esi, 4
cmp ebx, 0xffffffff
je 0x10030480
lea eax, [ebp - 0x218]
push eax
push ebx
call edi
test eax, eax
je 0x1003046f
or esi, 8
lea eax, [ebp - 0x110]
push eax
push ebx
call edi
test eax, eax
je 0x10030480
or esi, 4
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
je 0x100304aa
lea eax, [ebp - 0x320]
push eax
push ebx
call edi
test eax, eax
je 0x10030499
or esi, 2
lea eax, [ebp - 0x110]
push eax
push ebx
call edi
test eax, eax
je 0x100304aa
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003890f
mov esp, ebp
pop ebp
ret