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

Disassembly:
sub esp, 0x330
push ebx
push ebp
xor edx, edx
push esi
xor esi, esi
cmp dword [esp + 0x350], edx
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
jl 0x40ef85
jg 0x40ef70
mov ebp, dword [esp + 0x350]
cmp ebp, 0x7fffffff
jb 0x40ef8c
mov ebp, closesocket
mov dword [esp + 0x350], ebp
mov dword [esp + 0x354], edx
jmp 0x40ef8c
mov ebp, dword [esp + 0x350]
mov eax, dword [esp + 0x344]
mov ecx, dword [esp + 0x348]
cmp eax, 0xffffffff
jne 0x40efdf
cmp ecx, eax
jne 0x40efdf
cmp dword [esp + 0x34c], eax
jne 0x40efdf
cmp ebp, edx
je 0x40efd2
jge 0x40efcb
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 ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret
cmp dword [esp + 0x354], edx
jl 0x40f02a
jg 0x40efee
cmp ebp, edx
jbe 0x40f02a
mov esi, ebp
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
mov eax, dword [esp + 0x344]
imul ecx, ecx, 0x3e8
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x348]
xor edx, edx
xor edi, edi
or ebx, 0xffffffff
mov dword [esp + 0x28], edx
mov dword [esp + 0x130], edi
cmp eax, 0xffffffff
je 0x40f05e
mov edi, 1
mov edx, edi
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
mov ebx, eax
cmp ecx, 0xffffffff
je 0x40f0ca
xor eax, eax
test edi, edi
jbe 0x40f07e
lea esp, [esp]
cmp dword [esp + eax*4 + 0x134], ecx
je 0x40f07e
inc eax
cmp eax, edi
jb 0x40f070
cmp eax, edi
jne 0x40f09d
cmp edi, 0x40
jae 0x40f09d
mov dword [esp + eax*4 + 0x134], ecx
mov edi, dword [esp + 0x130]
inc edi
mov dword [esp + 0x130], edi
xor eax, eax
test edx, edx
jbe 0x40f0ae
cmp dword [esp + eax*4 + 0x2c], ecx
je 0x40f0ae
inc eax
cmp eax, edx
jb 0x40f0a3
cmp eax, edx
jne 0x40f0c4
cmp edx, 0x40
jae 0x40f0c4
mov dword [esp + eax*4 + 0x2c], ecx
mov edx, dword [esp + 0x28]
inc edx
mov dword [esp + 0x28], edx
cmp ecx, ebx
jbe 0x40f0ca
mov ebx, ecx
mov eax, dword [esp + 0x34c]
xor ecx, ecx
mov dword [esp + 0x238], ecx
cmp eax, 0xffffffff
je 0x40f141
mov dword [esp + 0x23c], eax
mov ecx, 1
xor eax, eax
mov dword [esp + 0x238], ecx
test edx, edx
jbe 0x40f119
jmp 0x40f100
mov ebp, dword [esp + 0x34c]
cmp dword [esp + eax*4 + 0x2c], ebp
je 0x40f112
inc eax
cmp eax, edx
jb 0x40f100
mov ebp, dword [esp + 0x350]
cmp eax, edx
jne 0x40f131
cmp edx, 0x40
jae 0x40f131
mov edx, dword [esp + 0x34c]
mov dword [esp + eax*4 + 0x2c], edx
inc dword [esp + 0x28]
cmp dword [esp + 0x34c], ebx
jbe 0x40f141
mov ebx, dword [esp + 0x34c]
cmp dword [esp + 0x354], 0
jg 0x40f166
jl 0x40f151
test ebp, ebp
jae 0x40f166
inc ebx
mov dword [esp + 0x24], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], 0
jmp 0x40f18e
inc ebx
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], eax
jmp 0x40f18e
mov ecx, dword [esp + 0x238]
mov edi, dword [esp + 0x130]
cmp dword [esp + 0x354], 0
jl 0x40f1c9
jg 0x40f19e
test ebp, ebp
jbe 0x40f1c9
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x1c], eax
imul eax, eax, 0x3e8
mov edx, esi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x20], edx
jmp 0x40f1dc
mov eax, ebp
or eax, dword [esp + 0x354]
jne 0x40f1dc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x10]
push edx
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x23c]
and ecx, edx
lea eax, [esp + 0x2c]
push eax
neg edi
push ecx
mov ecx, dword [esp + 0x30]
sbb edi, edi
lea eax, [esp + 0x13c]
and edi, eax
push edi
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f29c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40f22e
cmp dword [0x77e3a4], 0
jne 0x40f29c
cmp eax, 0x2714
jne 0x40f29c
cmp dword [esp + 0x354], 0
jl 0x40f180
jg 0x40f246
test ebp, ebp
jbe 0x40f180
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov edi, edx
shr edi, 6
mov edx, edi
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
mov eax, ecx
sub eax, dword [esp + 0x18]
push 0
cdq
push 0x3e8
push edx
push eax
call fcn.0056a120
mov esi, dword [esp + 0x14]
sub esi, edi
imul esi, esi, 0x3e8
sub esi, eax
add esi, ebp
test esi, esi
jle 0x40efd2
jmp 0x40f180
test edi, edi
jl 0x40efbd
je 0x40efd2
mov edi, dword [esp + 0x344]
xor esi, esi
cmp edi, 0xffffffff
je 0x40f2e1
lea eax, [esp + 0x130]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f2cf
mov esi, 1
lea ecx, [esp + 0x28]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f2e1
or esi, 4
mov edi, dword [esp + 0x348]
cmp edi, 0xffffffff
je 0x40f314
lea edx, [esp + 0x130]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f302
or esi, 8
lea eax, [esp + 0x28]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f314
or esi, 4
mov edi, dword [esp + 0x34c]
cmp edi, 0xffffffff
je 0x40f347
lea ecx, [esp + 0x238]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f335
or esi, 2
lea edx, [esp + 0x28]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f347
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x330
ret