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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100cc721
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10100230]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
test esi, esi
je 0x10022b77
mov edx, dword [0x101075c4]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x101085e4]
mov ebx, dword [eax + edx*4]
cmp ecx, dword [ebx + 4]
jle 0x1002290a
push 0x101085e4
call fcn.100920b6
mov ecx, dword [0x101085e4]
add esp, 4
cmp ecx, 0xffffffff
jne 0x1002290a
mov dword [ebp - 4], 0
call fcn.1002e240
push 0x100d6550
call fcn.10091f17
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x101085e4
call fcn.1009206c
mov ecx, dword [0x101085e4]
add esp, 4
mov eax, dword [0x10108908]
test eax, eax
mov edx, dword [ebx + 4]
setne byte [ebp - 0xd]
test eax, eax
je 0x1002296e
cmp ecx, edx
jle 0x10022966
push 0x101085e4
call fcn.100920b6
add esp, 4
cmp dword [0x101085e4], 0xffffffff
jne 0x10022966
mov dword [ebp - 4], 1
call fcn.1002e240
push 0x100d6550
call fcn.10091f17
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x101085e4
call fcn.1009206c
add esp, 4
mov edi, dword [0x10108868]
jmp 0x100229bb
cmp ecx, edx
jle 0x100229b5
push 0x101085e4
call fcn.100920b6
add esp, 4
cmp dword [0x101085e4], 0xffffffff
jne 0x100229b5
mov dword [ebp - 4], 2
call fcn.1002e240
push 0x100d6550
call fcn.10091f17
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x101085e4
call fcn.1009206c
add esp, 4
mov edi, dword [0x1010886c]
test edi, edi
je 0x10022b77
cmp byte [ebp - 0xd], 0
je 0x10022ab3
mov eax, 0x10108360
lock xadd dword [eax], esi
movq xmm0, qword [0x10108368]
movq qword [ebp - 0x20], xmm0
mov eax, dword [0x101085e4]
cmp eax, dword [ebx + 4]
jle 0x10022a33
push 0x101085e4
call fcn.100920b6
add esp, 4
cmp dword [0x101085e4], 0xffffffff
jne 0x10022a33
mov dword [ebp - 4], 3
call fcn.1002e240
push 0x100d6550
call fcn.10091f17
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x101085e4
call fcn.1009206c
add esp, 4
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0
push 0x3e8
push dword [0x101085ec]
push dword [0x101085e8]
call fcn.100c11e0
mov esi, dword [ebp - 0x18]
sub esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
sbb ecx, dword [ebp - 0x1c]
push edx
push eax
push ecx
push esi
call fcn.10092690
mov esi, eax
test edx, edx
jne 0x10022aa9
cmp esi, 0x3e8
jae 0x10022aa9
mov ecx, dword [0x10108360]
shl edi, 0xa
cmp ecx, edi
jle 0x10022b77
mov eax, 0x3e8
sub eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 0x10108360
jmp 0x10022b6e
mov eax, 0x10108364
lock xadd dword [eax], esi
movq xmm0, qword [0x10108370]
movq qword [ebp - 0x18], xmm0
mov eax, dword [0x101085e4]
cmp eax, dword [ebx + 4]
jle 0x10022b19
push 0x101085e4
call fcn.100920b6
add esp, 4
cmp dword [0x101085e4], 0xffffffff
jne 0x10022b19
mov dword [ebp - 4], 4
call fcn.1002e240
push 0x100d6550
call fcn.10091f17
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x101085e4
call fcn.1009206c
add esp, 4
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0
push 0x3e8
push dword [0x101085ec]
push dword [0x101085e8]
call fcn.100c11e0
mov esi, dword [ebp - 0x20]
sub esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
sbb ecx, dword [ebp - 0x14]
push edx
push eax
push ecx
push esi
call fcn.10092690
mov esi, eax
test edx, edx
jne 0x10022b69
cmp esi, 0x3e8
jae 0x10022b69
mov ecx, dword [0x10108364]
jmp 0x10022a7e
mov ecx, 0x10108364
xor eax, eax
xchg dword [ecx], eax
call fcn.10022740
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret