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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x374
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
xor ebx, ebx
or edi, 0xffffffff
mov dword [esp + 0x48], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x278], ebx
mov dword [esp + 0x170], ebx
cmp eax, 0xffffffff
je 0x40f83d
mov ebx, 1
mov dword [esp + 0x6c], eax
mov dword [esp + 0x68], ebx
mov edi, eax
fldz
mov edx, dword [ecx]
fld st(0)
mov dword [esp + 0x54], 0
fst qword [esp + 0x58]
test edx, edx
je 0x40fa04
mov ecx, dword [edx + 0x10]
mov eax, dword [edx]
mov dword [esp + 0x44], eax
cmp ecx, 0xffffffff
je 0x40f968
mov eax, dword [edx + 0x80]
inc dword [esp + 0x54]
test al, al
js 0x40f8bb
mov esi, dword [edx + 0x30]
cmp esi, dword [edx + 0x28]
jae 0x40f8bb
test al, 2
je 0x40f889
cmp dword [edx + 8], 0
jne 0x40f8bb
xor eax, eax
test ebx, ebx
jbe 0x40f89a
cmp dword [esp + eax*4 + 0x6c], ecx
je 0x40f89a
inc eax
cmp eax, ebx
jb 0x40f88f
cmp eax, ebx
jne 0x40f8b0
cmp ebx, 0x40
jae 0x40f8b0
mov dword [esp + eax*4 + 0x6c], ecx
mov ebx, dword [esp + 0x68]
inc ebx
mov dword [esp + 0x68], ebx
cmp edi, 0xffffffff
je 0x40f8b9
cmp ecx, edi
jbe 0x40f8bb
mov edi, ecx
mov eax, dword [edx + 0x80]
mov ecx, eax
and ecx, 8
je 0x40f8cc
test al, 0x40
je 0x40f8de
cmp dword [edx + 0x3c], 0
jbe 0x40f968
test ecx, ecx
jne 0x40f968
mov ecx, dword [edx + 0x10]
cmp ecx, 0xffffffff
je 0x40f923
mov esi, dword [esp + 0x278]
xor eax, eax
test esi, esi
jbe 0x40f901
cmp dword [esp + eax*4 + 0x27c], ecx
je 0x40f901
inc eax
cmp eax, esi
jb 0x40f8f3
cmp eax, esi
jne 0x40f918
cmp esi, 0x40
jae 0x40f918
mov dword [esp + eax*4 + 0x27c], ecx
inc dword [esp + 0x278]
cmp edi, 0xffffffff
je 0x40f921
cmp ecx, edi
jbe 0x40f923
mov edi, ecx
mov ecx, dword [edx + 0x10]
cmp ecx, 0xffffffff
je 0x40f968
mov esi, dword [esp + 0x170]
xor eax, eax
test esi, esi
jbe 0x40f946
cmp dword [esp + eax*4 + 0x174], ecx
je 0x40f946
inc eax
cmp eax, esi
jb 0x40f938
cmp eax, esi
jne 0x40f95d
cmp esi, 0x40
jae 0x40f95d
mov dword [esp + eax*4 + 0x174], ecx
inc dword [esp + 0x170]
cmp edi, 0xffffffff
je 0x40f966
cmp ecx, edi
jbe 0x40f968
mov edi, ecx
fxch st(1)
fcom qword [edx + 0x58]
fnstsw ax
test ah, 5
jp 0x40f99d
cmp dword [esp + 0x48], 0
je 0x40f992
fxch st(1)
fcom qword [edx + 0x58]
fnstsw ax
test ah, 0x41
jne 0x40f98c
fstp st(0)
fld qword [edx + 0x58]
inc dword [esp + 0x48]
jmp 0x40f99f
inc dword [esp + 0x48]
fstp st(1)
fld qword [edx + 0x58]
jmp 0x40f99f
fxch st(1)
mov edx, dword [esp + 0x44]
test edx, edx
jne 0x40f857
cmp dword [esp + 0x48], edx
fstp st(1)
fstp qword [esp + 0x58]
jle 0x40f9ff
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
test eax, eax
jge 0x40f9cf
fadd qword [0x52c5d8]
fld qword [0x52c5e0]
fdiv st(1), st(0)
fld qword [esp + 0x58]
fsubrp st(2)
fmulp st(1)
fadd qword [0x52c5c8]
fild dword [ebp + 0xc]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40f9fa
call fcn.0042fe50
mov esi, eax
jmp 0x40fa08
mov esi, dword [ebp + 0xc]
jmp 0x40fa06
mov esi, dword [ebp + 0xc]
jmp 0x40fa08
fstp st(0)
fstp st(0)
test esi, esi
jge 0x40fa0e
xor esi, esi
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x60], eax
imul eax, eax, 0x3e8
mov ecx, esi
sub ecx, eax
imul ecx, ecx, 0x3e8
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x174]
push eax
mov dword [esp + 0x6c], ecx
lea ecx, [esp + 0x280]
push ecx
lea edx, [esp + 0x74]
push edx
inc edi
push edi
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
test eax, eax
jge 0x40fa77
fadd qword [0x52c5d8]
cmp dword [0x549f1c], 4
fdiv qword [0x52c5e0]
fstp qword [esp + 0x48]
jl 0x40fad1
mov eax, dword [0x549f20]
test eax, eax
jne 0x40faa0
call fcn.0042b692
add eax, 0x40
mov dword [0x549f20], eax
push str......._srclocalservermongoose.c:3414
push str.__20s
push eax
call fcn.0042c464
fld qword [esp + 0x54]
mov eax, dword [esp + 0x60]
add esp, 0xc
push esi
push eax
push ebx
call fcn.0042fe50
push eax
push str.select____ld_num_ev_d_of__d__timeout_d
call fcn.0040bba0
add esp, 0x14
mov edi, dword [ebp + 8]
test ebx, ebx
jle 0x40faf4
mov eax, dword [edi + 0xc]
cmp eax, 0xffffffff
je 0x40faf4
lea ecx, [esp + 0x68]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40faf4
call fcn.0040f640
mov edi, dword [edi]
test edi, edi
je 0x40fb8d
mov ecx, dword [edi + 0x10]
xor eax, eax
cmp ecx, 0xffffffff
je 0x40fb6d
test ebx, ebx
jle 0x40fb6d
lea edx, [esp + 0x68]
push edx
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40fb31
test byte [edi + 0x80], 2
je 0x40fb2a
cmp dword [edi + 8], 0
jne 0x40fb31
mov ebx, 1
jmp 0x40fb33
xor ebx, ebx
mov ecx, dword [edi + 0x10]
lea eax, [esp + 0x170]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
mov esi, eax
mov eax, dword [edi + 0x10]
lea edx, [esp + 0x278]
neg esi
push edx
sbb esi, esi
push eax
and esi, 4
call sub.WS2_32.dll___WSAFDIsSet
neg eax
sbb eax, eax
and eax, 2
or eax, esi
or eax, ebx
mov ebx, dword [esp + 0x44]
fld qword [esp + 0x48]
mov esi, dword [edi]
sub esp, 8
mov ecx, edi
fstp qword [esp]
call fcn.0040f470
add esp, 8
mov edi, esi
test esi, esi
jne 0x40fafe
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
test eax, eax
je 0x40fbc9
jmp 0x40fba0
mov ecx, dword [eax + 0x80]
mov esi, dword [eax]
test ecx, 0x800
jne 0x40fbbe
cmp dword [eax + 0x3c], 0
jne 0x40fbc3
test ecx, 0x400
je 0x40fbc3
call fcn.0040d700
mov eax, esi
test esi, esi
jne 0x40fba0
fld qword [esp + 0x48]
call fcn.0042fe86
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret