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

Disassembly:
sub esp, 0x330
mov ecx, dword [esp + 0x33c]
mov edx, dword [esp + 0x338]
push ebx
push ebp
mov ebp, dword [esp + 0x33c]
push esi
xor esi, esi
push edi
xor edi, edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
cmp ebp, esi
je 0x40f3a1
xor eax, eax
cmp edx, esi
jbe 0x40f3a1
cmp dword [ebp + eax*8], 0xffffffff
jne 0x40f3d4
inc eax
cmp eax, edx
jb 0x40f395
cmp ecx, esi
je 0x40f3c7
jge 0x40f3c0
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret
cmp ecx, esi
jle 0x40f404
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
xor ecx, ecx
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x130], ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x238], ebx
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], eax
jmp 0x40f437
mov ebp, dword [esp + 0x344]
xor edx, edx
mov word [ebp + eax*8 + 6], dx
mov ebp, dword [ebp + eax*8]
cmp ebp, 0xffffffff
je 0x40f512
mov edx, dword [esp + 0x344]
movzx edx, word [edx + eax*8 + 4]
test dl, 7
je 0x40f512
cmp ebp, dword [esp + 0x14]
jbe 0x40f46a
mov dword [esp + 0x14], ebp
test dl, 1
je 0x40f4a6
xor eax, eax
test ecx, ecx
jbe 0x40f483
cmp dword [esp + eax*4 + 0x134], ebp
je 0x40f483
inc eax
cmp eax, ecx
jb 0x40f475
cmp eax, ecx
jne 0x40f4a2
cmp ecx, 0x40
jae 0x40f4a2
mov dword [esp + eax*4 + 0x134], ebp
mov ecx, dword [esp + 0x130]
inc ecx
mov dword [esp + 0x130], ecx
mov eax, dword [esp + 0x10]
test dl, 4
je 0x40f4d6
xor eax, eax
test esi, esi
jbe 0x40f4bc
cmp dword [esp + eax*4 + 0x2c], ebp
je 0x40f4bc
inc eax
cmp eax, esi
jb 0x40f4b1
cmp eax, esi
jne 0x40f4d2
cmp esi, 0x40
jae 0x40f4d2
mov dword [esp + eax*4 + 0x2c], ebp
mov esi, dword [esp + 0x28]
inc esi
mov dword [esp + 0x28], esi
mov eax, dword [esp + 0x10]
test dl, 2
je 0x40f512
xor eax, eax
test ebx, ebx
jbe 0x40f4ef
cmp dword [esp + eax*4 + 0x23c], ebp
je 0x40f4ef
inc eax
cmp eax, ebx
jb 0x40f4e1
cmp eax, ebx
jne 0x40f50e
cmp ebx, 0x40
jae 0x40f50e
mov dword [esp + eax*4 + 0x23c], ebp
mov ebx, dword [esp + 0x238]
inc ebx
mov dword [esp + 0x238], ebx
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x348]
jb 0x40f430
test ecx, ecx
jne 0x40f555
test esi, esi
jne 0x40f555
test ebx, ebx
jne 0x40f555
mov eax, dword [esp + 0x34c]
test eax, eax
je 0x40f548
jl 0x40f3a7
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret
mov ebp, dword [esp + 0x34c]
xor eax, eax
test ebp, ebp
setl al
lea edx, [esp + 0x20]
dec eax
and eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
jmp 0x40f592
mov ebx, dword [esp + 0x238]
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x130]
xor eax, eax
cmp ebp, eax
jle 0x40f5c3
mov eax, 0x10624dd3
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
mov edx, edi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x24], edx
jmp 0x40f5cd
jne 0x40f5cd
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
neg ebx
sbb ebx, ebx
push eax
lea edx, [esp + 0x23c]
and ebx, edx
neg esi
sbb esi, esi
lea eax, [esp + 0x2c]
and esi, eax
mov eax, dword [esp + 0x18]
neg ecx
push ebx
sbb ecx, ecx
lea edx, [esp + 0x138]
push esi
and ecx, edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f683
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40f625
cmp dword [0x77e3a4], 0
jne 0x40f683
cmp eax, 0x2714
jne 0x40f683
test ebp, ebp
jle 0x40f580
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov esi, edx
shr esi, 6
mov edx, esi
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
mov eax, ecx
sub eax, dword [esp + 0x1c]
push 0
cdq
push 0x3e8
push edx
push eax
call fcn.0056a120
mov edi, dword [esp + 0x18]
sub edi, esi
imul edi, edi, 0x3e8
sub edi, eax
add edi, ebp
test edi, edi
jle 0x40f3c7
jmp 0x40f580
test esi, esi
jl 0x40f3b2
je 0x40f3c7
mov esi, dword [esp + 0x344]
mov edi, dword [esp + 0x348]
xor ebx, ebx
add esi, 6
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x40f6fd
lea ecx, [esp + 0x130]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f6c7
or word [esi], 1
mov eax, dword [esi - 6]
lea edx, [esp + 0x28]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f6dd
or word [esi], 4
mov edx, dword [esi - 6]
lea ecx, [esp + 0x238]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f6f6
or word [esi], 2
cmp word [esi], 0
je 0x40f6fd
inc ebx
add esi, 8
sub edi, 1
jne 0x40f6a4
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x330
ret