Function at 0x10021cd0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xbc
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0xb8], eax
test byte [0x10059ab9], 0x80
push ebx
push esi
mov ebx, edx
push edi
mov dword [esp + 0x18], ebx
mov edi, ecx
je 0x10021d0e
push 2
push ebx
mov edx, 0x1004c9f0
call fcn.10004850
add esp, 8
mov ecx, dword [ebx + 0xb48]
test ecx, ecx
je 0x10021d54
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
sub eax, ecx
cmp eax, 0x7fffffff
sbb edx, edx
and edx, eax
mov eax, dword [edi + 0x2c]
lea ecx, [eax*8]
sub ecx, eax
add edx, ecx
shr edx, 3
mov dword [edi + 0x2c], edx
test byte [0x10059ab9], 1
je 0x10021d54
push edx
push edi
mov edx, 0x1004c850
call fcn.10004850
add esp, 8
mov eax, dword [ebp + 8]
add dword [ebx + 0xb50], 1
mov dword [ebx + 0xc8], eax
mov al, byte [ebx + 0xc2]
adc dword [ebx + 0xb54], 0
test al, 0x40
je 0x10021dd5
and al, 0xbf
lea ecx, [edi + 0x30]
mov edx, ebx
mov byte [ebx + 0xc2], al
call fcn.10039600
test byte [0x10059abc], 1
mov ax, word [edi + 0x28]
mov dword [esp + 0x28], 9
mov word [esp + 0x30], ax
je 0x10021dca
push str.Indicating_QUIC_CONNECTION_EVENT_IDEAL_PROCESSOR_CHANGED
push 0xffffffffffffffff
lea eax, [esp + 0x48]
push 0x80
push eax
call fcn.100015f0
lea eax, [esp + 0x50]
mov edx, 0x1004c9b0
push eax
push ebx
call fcn.10001280
add esp, 0x18
lea edx, [esp + 0x28]
mov ecx, ebx
call fcn.1000f960
mov ecx, ebx
call fcn.100196c0
mov cl, byte [ebx + 0xc2]
lea esi, [edi + 0x58]
shr cl, 6
or al, cl
mov dword [ebx + 0xc8], 0
push esi
mov byte [esp + 0x17], al
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [esp + 0x13]
and al, 1
add al, al
or al, byte [ebx + 0xd8]
and al, 0xfe
test byte [ebx + 0xc2], 0x40
mov byte [ebx + 0xd8], al
jne 0x10021eab
test al, 2
je 0x10021e92
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.10001100
mov dword [ebx + 0xb48], eax
lea ecx, [edi + 0x70]
mov eax, dword [ecx + 4]
lea esi, [ebx + 0x10]
mov dword [esi], ecx
add esp, 8
mov dword [esi + 4], eax
mov dword [eax], esi
mov dword [ecx + 4], esi
test byte [0x10059ab9], 0x80
je 0x10021e73
push 1
push ebx
mov edx, 0x1004c9f0
call fcn.10004850
add esp, 8
lea eax, [edi + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb8]
xor ecx, esp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
test byte [0x10059ab9], 0x80
je 0x10021eab
push 0
push ebx
mov edx, 0x1004c9f0
call fcn.10004850
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test byte [ebx + 0xc2], 0x40
je 0x10021fd6
lea ecx, [edi + 0x30]
mov edx, ebx
call fcn.10039570
mov ecx, dword [ebx + 0x24]
test ecx, ecx
jne 0x10021ef5
test byte [0x10059ab8], 4
je 0x10021ef3
push str.Connection__Registration_____void__0_
push str.C:__w1_s_srccoreworker.c
push 0x22d
call fcn.1003e120
mov ecx, dword [ebx + 0x24]
add esp, 0xc
int 0x2c
mov edx, ebx
call fcn.10008020
mov esi, dword [ebx + 0x20]
mov dword [esp + 0x14], esi
lea eax, [esi + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0x70]
cmp dword [eax], eax
jne 0x10021f20
lea eax, [esi + 0x78]
mov byte [esp + 0x13], 1
cmp dword [eax], eax
je 0x10021f25
mov byte [esp + 0x13], 0
test byte [ebx + 0xd8], 2
je 0x10021fbe
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esp + 0x24]
mov ecx, 0xf4240
mov ebx, dword [0x10059a9c]
mov edi, dword [0x10059a98]
mul ecx
push ebx
push edi
push edx
push eax
call fcn.1004a350
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esp + 0x20]
xor esi, esi
mul edx
push ebx
add esi, eax
push edi
adc ecx, edx
push ecx
push esi
call fcn.1004a2e0
mov ebx, dword [esp + 0x18]
mov dword [ebx + 0xb48], eax
test byte [0x10059ab9], 0x80
je 0x10021f9c
push 1
push ebx
mov edx, 0x1004c9f0
call fcn.10004850
add esp, 8
lock inc dword [ebx + 0xb8]
mov esi, dword [esp + 0x14]
lea edx, [ebx + 0x10]
add esi, 0x70
mov eax, dword [esi + 4]
mov dword [edx], esi
mov dword [edx + 4], eax
mov dword [eax], edx
mov dword [esi + 4], edx
mov esi, dword [esp + 0x14]
lea eax, [esi + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esp + 0x13], 0
je 0x10021fd6
mov ecx, esi
call fcn.10021570
or eax, 0xffffffff
lock xadd dword [ebx + 0xb8], eax
jne 0x10021fea
mov ecx, ebx
call fcn.1000ea80
mov ecx, dword [esp + 0xc4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100483f7
mov esp, ebp
pop ebp
ret