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

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x5f]
sub rsp, 0xe0
mov qword [rbp - 0x29], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
movaps xmmword [rax - 0x28], xmm6
mov rax, qword [0x1400e8708]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rbx, rdx
mov rdi, rcx
lea rcx, [rbp - 0x49]
call qword [sym.imp.api_ms_win_core_profile_l1_1_0.dll_QueryPerformanceCounter]
mov rax, qword [rdi + 0x50]
cmp qword [rbp - 0x49], rax
jl 0x140050e4f
mov al, byte [rdi + 0x81]
xor esi, esi
test al, al
jne 0x140050e4f
mov al, byte [rdi + 0x80]
test al, al
jne 0x140050e4f
lea eax, [rsi + 1]
xchg byte [rdi + 0x81], al
xorps xmm0, xmm0
movss dword [rbp - 0x69], xmm0
lea r14, [rdi + 0x88]
lea r8, [rbp - 0x69]
movss xmm1, dword [rbx + 8]
mov rcx, r14
call fcn.14004fea8
test al, al
je 0x140050deb
movss xmm0, dword [rdi + 0x58]
movss xmm6, dword [rbp - 0x69]
comiss xmm0, xmm6
ja 0x140050d39
comiss xmm6, dword [rdi + 0x5c]
ja 0x140050d39
inc dword [rdi + 0x64]
call fcn.14000df74
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140050c30
cmp dword [rcx], esi
jbe 0x140050c30
call fcn.14000df74
movss dword [rsp + 0x28], xmm6
mov eax, dword [rdi + 0x6c]
mov dword [rsp + 0x20], eax
mov r9d, dword [rdi + 0x70]
mov r8d, dword [rdi + 0x64]
xor edx, edx
call fcn.1400514b4
mov eax, dword [rdi + 0x68]
cmp dword [rdi + 0x64], eax
jb 0x140050e10
mov eax, dword [rdi + 0x6c]
cmp dword [rdi + 0x70], eax
je 0x140050e10
mov eax, 1
xchg byte [rdi + 0x80], al
mov qword [rbp - 0x39], rdi
movss xmm0, dword [rbp - 0x69]
movss dword [rbp - 0x31], xmm0
movups xmm1, xmmword [rbp - 0x39]
movaps xmmword [rbp - 0x39], xmm1
lea rax, [0x1400abec8]
mov qword [rbp - 0x19], rax
movdqu xmmword [rbp - 0x11], xmm1
lea rax, [rbp - 0x19]
mov qword [rbp + 0x1f], rax
lea rdx, [rbp - 0x19]
lea rcx, [rbp - 0x61]
call fcn.14001150c
nop
mov rcx, qword [rbp + 0x1f]
test rcx, rcx
je 0x140050caf
mov rax, qword [rcx]
lea rdx, [rbp - 0x19]
cmp rcx, rdx
setne dl
mov rax, qword [rax + 0x20]
call qword [str.___n_]
lea rbx, [rdi + 0x98]
mov r14, qword [rbx + 0x10]
test r14, r14
je 0x140050cd6
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_core_threadpool_l1_2_0.dll_WaitForThreadpoolWorkCallbacks]
mov rcx, r14
call qword [sym.imp.api_ms_win_core_threadpool_l1_2_0.dll_CloseThreadpoolWork]
mov rax, qword [rbp - 0x51]
mov qword [rbx + 0x10], rax
mov qword [rbp - 0x51], rsi
lea rax, [rbp - 0x61]
cmp rbx, rax
je 0x140050d2b
mov rax, qword [rbp - 0x61]
mov qword [rbp - 0x61], rsi
mov r14, qword [rbx]
mov qword [rbx], rax
test r14, r14
je 0x140050d2b
mov rcx, qword [r14 + 0x38]
test rcx, rcx
je 0x140050d1e
mov rax, qword [rcx]
cmp rcx, r14
setne dl
mov rax, qword [rax + 0x20]
call qword [str.___n_]
mov qword [r14 + 0x38], rsi
mov edx, 0x40
mov rcx, r14
call fcn.1400a0df8
lea rcx, [rbp - 0x61]
call fcn.140011fd0
jmp 0x140050e10
mov dword [rdi + 0x64], esi
mov ecx, esi
mov rax, qword [rdi + 0x30]
mov rdx, qword [rdi + 0x38]
jmp 0x140050d64
movss xmm0, dword [rax + 4]
comiss xmm6, xmm0
jb 0x140050d5b
movss dword [rdi + 0x58], xmm0
mov ecx, dword [rax]
jmp 0x140050d60
comiss xmm0, xmm6
ja 0x140050d6b
add rax, 8
cmp rax, rdx
jne 0x140050d48
jmp 0x140050d70
movss dword [rdi + 0x5c], xmm0
cmp ecx, dword [rdx - 8]
jne 0x140050d7b
mov eax, dword [rdi + 0x58]
mov dword [rdi + 0x5c], eax
mov dword [rdi + 0x6c], ecx
mov rax, qword [r14]
mov rcx, qword [rax]
mov qword [rax], rax
mov rax, qword [r14]
mov qword [rax + 8], rax
mov qword [r14 + 8], rsi
cmp rcx, qword [r14]
je 0x140050dac
mov rbx, qword [rcx]
mov edx, 0x18
call fcn.1400a0df8
mov rcx, rbx
cmp rbx, qword [r14]
jne 0x140050d97
cvttss2si rbx, dword [rdi + 0x5c]
cvttss2si r14, dword [rdi + 0x58]
call fcn.14000df74
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140050e10
cmp dword [rcx], esi
jbe 0x140050e10
call fcn.14000df74
movss dword [rsp + 0x28], xmm6
mov eax, dword [rdi + 0x6c]
mov dword [rsp + 0x20], eax
mov r9d, ebx
mov r8d, r14d
xor edx, edx
call fcn.1400515c4
jmp 0x140050e10
call fcn.14000df74
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140050e10
cmp dword [rcx], esi
jbe 0x140050e10
call fcn.14000df74
lea r8, str.Not_enough_samples.
xor edx, edx
call fcn.140051298
lea rcx, [rbp - 0x41]
call qword [sym.imp.api_ms_win_core_profile_l1_1_0.dll_QueryPerformanceCounter]
mov ecx, dword [rdi + 0x48]
imul rcx, qword [0x1400e9950]
movabs rax, 0x20c49ba5e353f7cf
imul rcx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
add rdx, qword [rbp - 0x41]
mov qword [rdi + 0x50], rdx
xchg byte [rdi + 0x81], sil
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400a0800
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret