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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov rax, qword [0x1402b3040]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rax, qword [rcx + 0xb8]
mov r15, qword [rcx + 0xc0]
cmp rax, r15
je 0x1401190c9
mov rsi, rdx
mov rdi, rcx
cmp qword [rcx + 0x80], 0
je 0x1401190b1
cmp qword [rdi + 0x68], 0
je 0x1401190b1
mov rcx, qword [rdi + 0xa8]
test rcx, rcx
je 0x140119496
mov rdx, qword [rcx + 0xc0]
sub rdx, qword [rcx + 0xb8]
cmp rdx, 0x80
jne 0x1401190b1
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x60], rax
movzx eax, byte [rsi + 8]
test al, al
jne 0x140118fe8
mov rax, qword [fcn.1401990d0]
lea rcx, [0x1401849a0]
cmp rax, rcx
jne 0x1401190f7
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x70]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x14011958e
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402c5700]
mov qword [rsp + 0x70], rax
movzx eax, byte [rsi + 8]
cmp al, 1
je 0x1401194c4
test rsi, rsi
je 0x140119494
mov rax, qword [rsp + 0x70]
mov qword [rsi], rax
mov byte [rsi + 8], 1
mov al, 1
test al, al
je 0x140119494
lea r14, [rdi + 0x68]
mov r15, qword [rsi]
mov qword [rsp + 0x60], r15
mov rax, qword [r14]
xor edx, edx
cmp r15, rax
setns dl
movabs r12, 0x7fffffffffffffff
add rdx, r12
mov rcx, r15
sub rcx, rax
cmovo rcx, rdx
cmp rcx, 0x1c9c37f
jg 0x140119082
movabs rax, 0x8000000000000001
lea r8, [rcx + rax]
mov rdx, qword [rdi + 0x50]
cmp r8, 1
jbe 0x1401194a4
lea rax, [rdx + rcx]
sar rax, 0x3f
movabs r8, 0x8000000000000000
xor r8, rax
add rdx, rcx
cmovo rdx, r8
mov qword [rdi + 0x50], rdx
cmp rdx, 0x186a0
jge 0x14011943e
mov qword [rdi + 0x70], r15
cmp qword [rdi + 0xa8], 0
je 0x140119499
movzx eax, byte [0x1402c52fa]
test al, al
setne bl
jne 0x1401194d1
mov byte [rdi + 0xa0], bl
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x68], rax
mov rax, qword [rdi + 0xb8]
mov r15, qword [rdi + 0xc0]
cmp rax, r15
je 0x140119494
cmp dword [r15 - 0x38], 0
mov dword [r15 - 0x38], 0
jne 0x140119107
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
cmp rcx, qword [0x1402b3040]
je 0x1401190e3
call fcn.14019d280
int3
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [rsp + 0x70]
call qword [0x1402a4958]
jmp 0x140118fc5
mov eax, dword [0x1402ccad0]
mov ecx, dword [0x1402c2098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14011918b
cmp dword [r15 - 0x18], 0
je 0x14011949c
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, eax
movabs r9, 0x100000000
or r9, rax
mov byte [rsp + 0x70], 0
mov byte [rsp + 0x78], 0
mov rdx, qword [r15 - 0x20]
lea rcx, [0x1402cc148]
lea r8, [rsp + 0x70]
call fcn.140119aa0
cmp qword [r15 - 0x78], 0
jne 0x1401191ca
mov qword [rsp + 0x60], Ordinal_14
movzx eax, byte [0x1402c525b]
test al, al
je 0x1401190c9
jmp 0x14011955b
lea rcx, [0x1402ccad0]
call fcn.14019ae60
cmp dword [0x1402ccad0], 0xffffffff
jne 0x140119128
lea rcx, [0x1402cc148]
call fcn.140003c40
lea rcx, [0x1402ccad0]
call fcn.14019ad84
jmp 0x140119128
lea rcx, [rsp + 0x70]
call qword [0x1402a4958]
jmp 0x140119224
mov al, byte [rsi + 8]
test al, al
jne 0x140119246
mov rax, qword [fcn.1401990d0]
lea rcx, [0x1401849a0]
cmp rax, rcx
jne 0x1401191bd
lea rdi, [rsp + 0x70]
mov qword [rdi], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rdi]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140119978
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402c5700]
mov qword [rsp + 0x70], rax
mov al, byte [rsi + 8]
cmp al, 1
je 0x140119660
test rsi, rsi
je 0x140119494
mov rax, qword [rsp + 0x70]
mov qword [rsi], rax
mov byte [rsi + 8], 1
mov al, 1
test al, al
je 0x140119494
lea r12, [r15 - 0x80]
mov rdi, qword [rsi]
mov r14, qword [r15 - 0x78]
lea rbx, [rsp + 0x70]
mov rcx, rbx
call fcn.140009010
mov r13, qword [rbx]
mov rax, qword [r15 - 0x70]
xor ecx, ecx
cmp r13, rax
setns cl
movabs rbp, 0x7fffffffffffffff
add rcx, rbp
sub r13, rax
cmovo r13, rcx
xor eax, eax
cmp rdi, r14
setns al
add rax, rbp
mov qword [rsp + 0x50], rdi
mov rbx, rdi
mov qword [rsp + 0x48], r14
sub rbx, r14
movabs rdi, 0x8000000000000001
cmovo rbx, rax
cmp rbx, r13
mov r14, r13
cmovl r14, rbx
lea rdx, str.Scheduling.ThreadController.ActiveIntervalDuration
mov qword [rsp + 0x38], r12
mov rcx, r12
mov r8, rbx
mov r9, rbx
call fcn.140005ce0
lea rax, [r14 + rdi]
mov qword [rsp + 0x40], rax
cmp rax, 2
jb 0x1401195c2
xor eax, eax
cmp rbx, r14
setns al
add rax, rbp
mov r8, rbx
sub r8, r14
cmovo r8, rax
lea rdx, str.Scheduling.ThreadController.ActiveIntervalOffCpuDuration
mov r12, qword [rsp + 0x38]
mov rcx, r12
mov r9, rbx
call fcn.140005ce0
lea rdx, str.Scheduling.ThreadController.ActiveIntervalOnCpuDuration
mov rcx, r12
mov r8, r14
mov r9, rbx
call fcn.140005ce0
mov rax, qword [rsp + 0x48]
cmp qword [rsp + 0x50], rax
je 0x1401195b5
mov rax, r14
shr rax, 0x3f
movabs rdx, 0x8000000000000001
lea rcx, [rdx + rax]
add rcx, 0xfffffffffffffffe
imul rax, r14, 0x64
cmovo rax, rcx
lea rcx, [rax + rdx]
cmp rcx, 2
jb 0x1401195e7
cqo
idiv rbx
mov rcx, qword [rsp + 0x38]
mov edx, eax
mov r8, rbx
call fcn.140007a10
mov rax, qword [r15 - 0x30]
test rax, rax
je 0x1401195bf
cmp byte [rax + 0x18], 1
je 0x14011967a
add r15, 0xffffffffffffff88
xorpd xmm0, xmm0
movupd xmmword [r15], xmm0
mov al, byte [rsi + 8]
test al, al
jne 0x14011941d
mov rax, qword [fcn.1401990d0]
lea rcx, [0x1401849a0]
cmp rax, rcx
jne 0x140119431
lea rbx, [rsp + 0x70]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x14011999f
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402c5700]
mov qword [rsp + 0x70], rax
mov al, byte [rsi + 8]
cmp al, 1
je 0x14011966d
test rsi, rsi
je 0x140119494
mov rax, qword [rsp + 0x70]
mov qword [rsi], rax
mov byte [rsi + 8], 1
mov al, 1
test al, al
je 0x140119494
mov rax, qword [rsi]
mov rcx, qword [rsp + 0x38]
mov qword [rcx], rax
jmp 0x14011916e
lea rcx, [rsp + 0x70]
call qword [0x1402a4958]
jmp 0x1401193fb
cvtsi2sd xmm0, rdx
divsd xmm0, qword [0x140290780]
cvttsd2si ebx, xmm0
mov rcx, qword [rdi + 0x80]
mov rax, qword [rcx]
mov rax, qword [rax + 0x30]
mov edx, 6
mov r8d, ebx
call qword [0x1402a4958]
movsxd rax, ebx
imul rcx, rax, 0x3e8
mov rax, qword [rdi + 0x50]
xor edx, edx
cmp rax, rcx
setns dl
add rdx, r12
sub rax, rcx
cmovo rax, rdx
mov qword [rdi + 0x50], rax
jmp 0x140119070
ud2
int3
int3
xor r9d, r9d
jmp 0x140119148
lea r8, [rdx + rax]
cmp r8, 2
setae r8b
cmp rdx, rcx
sete cl
or cl, r8b
je 0x1401199cf
dec rax
jmp 0x14011948b
mov rcx, qword [rsp + 0x70]
mov qword [rsi], rcx
jmp 0x140118fe8
cmp byte [rdi + 0xa0], 0
jne 0x1401194f1
mov qword [rsp + 0x58], 0xaa
mov al, byte [0x1402c52fa]
test al, al
jne 0x140119910
mov qword [rsp + 0x68], 0xaa
mov al, byte [0x1402c52fa]
test al, al
jne 0x14011961b
mov qword [rsp + 0x68], 0xaa
mov al, byte [0x1402c52fa]
test al, al
je 0x140119094
cmp byte [rdi + 0x98], 0
je 0x140119494
movzx ecx, al
lea r9, [rdi + 0x88]
lea r8, [rsp + 0x70]
mov qword [r8], 0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x68]
call fcn.1402132e0
jmp 0x140119094
movzx edi, al
lea rbx, [rsp + 0x70]
mov rcx, rsi
mov rdx, rbx
call fcn.140199fb0
lea r8, [rsp + 0x68]
mov qword [r8], 0
lea rdx, [rsp + 0x60]
mov ecx, edi
mov r9, rbx
call fcn.140213270
jmp 0x1401190c9
mov rcx, qword [0x1402c5700]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140118fc0
mov eax, 0x64
jmp 0x14011936e
int3
cmp rbx, r13
jle 0x1401199d2
mov r8, r14
shr r8, 0x3f
not r8
movabs rax, 0x8000000000000001
add r8, rax
jmp 0x1401192fe
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x1401199d5
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x14011936e
cmp byte [rdi + 0x98], 0
je 0x140119494
movzx ecx, al
lea rax, [rdi + 0x88]
lea rdx, str.IdleWork
lea r8, [rsp + 0x70]
mov qword [r8], rdx
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x68]
mov r9d, 1
call fcn.140026bb0
jmp 0x140119508
mov rcx, qword [rsp + 0x70]
mov qword [rsi], rcx
jmp 0x140119246
mov rcx, qword [rsp + 0x70]
mov qword [rsi], rcx
jmp 0x14011941d
movabs rax, 0x8000000000000001
lea rcx, [rbx + rax]
mov rax, qword [r15 - 0x60]
cmp rcx, 2
jae 0x1401196b8
movabs rcx, 0x8000000000000001
add rcx, rax
cmp rcx, 2
setae cl
cmp rax, rbx
sete al
or al, cl
mov rax, rbx
jne 0x1401196cc
jmp 0x1401199c6
lea rcx, [rax + rbx]
sar rcx, 0x3f
btc rcx, 0x3f
add rax, rbx
cmovo rax, rcx
mov qword [r15 - 0x60], rax
mov rcx, qword [r15 - 0x58]
cmp qword [rsp + 0x40], 1
jbe 0x140119708
xor edx, edx
cmp rbx, r14
setns dl
add rdx, rbp
sub rbx, r14
cmovo rbx, rdx
lea rdx, [rcx + r14]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, r14
cmovo rcx, rdx
mov qword [r15 - 0x58], rcx
jmp 0x14011974e
movabs rdx, 0x8000000000000001
add rdx, rcx
cmp rdx, 2
setae dl
cmp rcx, r14
sete cl
or cl, dl
je 0x1401199d8
mov qword [r15 - 0x58], r14
cmp rbx, r13
jle 0x1401199db
shr r14, 0x3f
not r14
movabs rcx, 0x8000000000000001
add r14, rcx
mov rbx, r14
movabs rcx, 0x8000000000000001
lea rdx, [rbx + rcx]
mov rcx, qword [r15 - 0x50]
cmp rdx, 2
jae 0x140119789
movabs rdx, 0x8000000000000001
add rdx, rcx
cmp rdx, 2
setae dl
cmp rcx, rbx
sete cl
or cl, dl
jne 0x1401197a0
jmp 0x1401199c9
lea rdx, [rcx + rbx]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rbx
cmovo rcx, rdx
mov rbx, rcx
mov qword [r15 - 0x50], rbx
mov rbx, qword [r15 - 0x68]
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 2
jae 0x1401197d8
movabs rcx, 0x8000000000000001
add rcx, rax
cmp rcx, 1
ja 0x1401197ec
cmp rax, rbx
je 0x1401197ec
jmp 0x1401199cc
lea rcx, [rax + rbx]
sar rcx, 0x3f
btc rcx, 0x3f
add rbx, rax
cmovo rbx, rcx
cmp rbx, 0xf4241
jl 0x140119394
mov rcx, rax
shr rcx, 0x3f
movabs rdx, 0x8000000000000001
add rcx, rdx
add rcx, 0xfffffffffffffffe
imul rax, rax, 0x64
cmovo rax, rcx
lea rcx, [rax + rdx]
cmp rcx, 2
jb 0x1401199ff
cqo
idiv rbx
movsxd rcx, eax
cmp rcx, rax
jne 0x1401199e7
lea rdx, str.Scheduling.ThreadController.ActiveVsWallTimePercentage
mov rcx, qword [rsp + 0x38]
mov r8d, eax
call fcn.140212b30
mov rax, qword [r15 - 0x58]
mov rcx, rax
shr rcx, 0x3f
movabs rdx, 0x8000000000000001
add rcx, rdx
add rcx, 0xfffffffffffffffe
imul rax, rax, 0x64
cmovo rax, rcx
lea rcx, [rax + rdx]
cmp rcx, 2
jb 0x140119a2f
cqo
idiv rbx
movsxd rcx, eax
cmp rcx, rax
jne 0x1401199ef
lea rdx, str.Scheduling.ThreadController.ActiveOnCpuVsWallTimePercentage
mov rcx, qword [rsp + 0x38]
mov r8d, eax
call fcn.140212b30
mov rax, qword [r15 - 0x50]
mov rcx, rax
shr rcx, 0x3f
movabs rdx, 0x8000000000000001
add rcx, rdx
add rcx, 0xfffffffffffffffe
imul rax, rax, 0x64
cmovo rax, rcx
lea rcx, [rax + rdx]
cmp rcx, 2
jb 0x140119a5f
cqo
idiv rbx
lea rdi, [r15 - 0x68]
movsxd rcx, eax
cmp rcx, rax
jne 0x1401199f7
lea rdx, str.Scheduling.ThreadController.ActiveOffCpuVsWallTimePercentage
mov rcx, qword [rsp + 0x38]
mov r8d, eax
call fcn.140212b30
xorpd xmm0, xmm0
movupd xmmword [rdi + 0x10], xmm0
movupd xmmword [rdi], xmm0
jmp 0x140119394
mov rcx, 0xfffffffffff0bdc0
add rcx, qword [rdi + 0x68]
movabs rdx, 0x8000000000000000
cmovno rdx, rcx
mov qword [rsp + 0x70], rdx
cmp byte [rdi + 0x98], 0
je 0x140119494
movzx ecx, al
lea rax, [rdi + 0x88]
lea rdx, str.MessagePumpPhases
lea r8, [rsp + 0x68]
mov qword [r8], rdx
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x58]
mov r9d, 3
call fcn.140026bb0
jmp 0x1401194f1
mov rcx, qword [0x1402c5700]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x14011921f
mov rcx, qword [0x1402c5700]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401193f6
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x1401199de
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x14011982c
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x1401199e1
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x140119883
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x1401199e4
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x1401198da