Function at 0x140127980
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 [0x1402db040]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rax, qword [rcx + 0xb8]
mov r15, qword [rcx + 0xc0]
cmp rax, r15
je 0x140127b79
mov rsi, rdx
mov rdi, rcx
cmp qword [rcx + 0x80], 0
je 0x140127b61
cmp qword [rdi + 0x68], 0
je 0x140127b61
mov rcx, qword [rdi + 0xa8]
test rcx, rcx
je 0x140127f46
mov rdx, qword [rcx + 0xc0]
sub rdx, qword [rcx + 0xb8]
cmp rdx, 0x80
jne 0x140127b61
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x60], rax
movzx eax, byte [rsi + 8]
test al, al
jne 0x140127a98
mov rax, qword [fcn.1401a83e0]
lea rcx, [0x1401930c0]
cmp rax, rcx
jne 0x140127ba7
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 0x14012803e
imul rax, rax, 0xf4240
cqo
idiv qword [0x14032e5f0]
mov qword [rsp + 0x70], rax
movzx eax, byte [rsi + 8]
cmp al, 1
je 0x140127f74
test rsi, rsi
je 0x140127f44
mov rax, qword [rsp + 0x70]
mov qword [rsi], rax
mov byte [rsi + 8], 1
mov al, 1
test al, al
je 0x140127f44
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 0x140127b32
movabs rax, 0x8000000000000001
lea r8, [rcx + rax]
mov rdx, qword [rdi + 0x50]
cmp r8, 1
jbe 0x140127f54
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 0x140127eee
mov qword [rdi + 0x70], r15
cmp qword [rdi + 0xa8], 0
je 0x140127f49
movzx eax, byte [0x14032e1ea]
test al, al
setne bl
jne 0x140127f81
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 0x140127f44
cmp dword [r15 - 0x38], 0
mov dword [r15 - 0x38], 0
jne 0x140127bb7
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
cmp rcx, qword [0x1402db040]
je 0x140127b93
call fcn.1401ac870
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 [0x1402cbd20]
jmp 0x140127a75
mov eax, dword [0x140335990]
mov ecx, dword [0x1402ea130]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140127c3b
cmp dword [r15 - 0x18], 0
je 0x140127f4c
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, [0x140335008]
lea r8, [rsp + 0x70]
call fcn.140128550
cmp qword [r15 - 0x78], 0
jne 0x140127c7a
mov qword [rsp + 0x60], Ordinal_14
movzx eax, byte [0x14032e14b]
test al, al
je 0x140127b79
jmp 0x14012800b
lea rcx, [0x140335990]
call fcn.1401aa170
cmp dword [0x140335990], 0xffffffff
jne 0x140127bd8
lea rcx, [0x140335008]
call fcn.140003c40
lea rcx, [0x140335990]
call fcn.1401aa094
jmp 0x140127bd8
lea rcx, [rsp + 0x70]
call qword [0x1402cbd20]
jmp 0x140127cd4
mov al, byte [rsi + 8]
test al, al
jne 0x140127cf6
mov rax, qword [fcn.1401a83e0]
lea rcx, [0x1401930c0]
cmp rax, rcx
jne 0x140127c6d
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 0x140128428
imul rax, rax, 0xf4240
cqo
idiv qword [0x14032e5f0]
mov qword [rsp + 0x70], rax
mov al, byte [rsi + 8]
cmp al, 1
je 0x140128110
test rsi, rsi
je 0x140127f44
mov rax, qword [rsp + 0x70]
mov qword [rsi], rax
mov byte [rsi + 8], 1
mov al, 1
test al, al
je 0x140127f44
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 0x140128072
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 0x140128065
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 0x140128097
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 0x14012806f
cmp byte [rax + 0x18], 1
je 0x14012812a
add r15, 0xffffffffffffff88
xorpd xmm0, xmm0
movupd xmmword [r15], xmm0
mov al, byte [rsi + 8]
test al, al
jne 0x140127ecd
mov rax, qword [fcn.1401a83e0]
lea rcx, [0x1401930c0]
cmp rax, rcx
jne 0x140127ee1
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 0x14012844f
imul rax, rax, 0xf4240
cqo
idiv qword [0x14032e5f0]
mov qword [rsp + 0x70], rax
mov al, byte [rsi + 8]
cmp al, 1
je 0x14012811d
test rsi, rsi
je 0x140127f44
mov rax, qword [rsp + 0x70]
mov qword [rsi], rax
mov byte [rsi + 8], 1
mov al, 1
test al, al
je 0x140127f44
mov rax, qword [rsi]
mov rcx, qword [rsp + 0x38]
mov qword [rcx], rax
jmp 0x140127c1e
lea rcx, [rsp + 0x70]
call qword [0x1402cbd20]
jmp 0x140127eab
cvtsi2sd xmm0, rdx
divsd xmm0, qword [0x1402b78c0]
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 [0x1402cbd20]
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 0x140127b20
ud2
int3
int3
xor r9d, r9d
jmp 0x140127bf8
lea r8, [rdx + rax]
cmp r8, 2
setae r8b
cmp rdx, rcx
sete cl
or cl, r8b
je 0x14012847f
dec rax
jmp 0x140127f3b
mov rcx, qword [rsp + 0x70]
mov qword [rsi], rcx
jmp 0x140127a98
cmp byte [rdi + 0xa0], 0
jne 0x140127fa1
mov qword [rsp + 0x58], 0xaa
mov al, byte [0x14032e1ea]
test al, al
jne 0x1401283c0
mov qword [rsp + 0x68], 0xaa
mov al, byte [0x14032e1ea]
test al, al
jne 0x1401280cb
mov qword [rsp + 0x68], 0xaa
mov al, byte [0x14032e1ea]
test al, al
je 0x140127b44
cmp byte [rdi + 0x98], 0
je 0x140127f44
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.14023a690
jmp 0x140127b44
movzx edi, al
lea rbx, [rsp + 0x70]
mov rcx, rsi
mov rdx, rbx
call fcn.1401a92c0
lea r8, [rsp + 0x68]
mov qword [r8], 0
lea rdx, [rsp + 0x60]
mov ecx, edi
mov r9, rbx
call fcn.14023a620
jmp 0x140127b79
mov rcx, qword [0x14032e5f0]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140127a70
mov eax, 0x64
jmp 0x140127e1e
int3
cmp rbx, r13
jle 0x140128482
mov r8, r14
shr r8, 0x3f
not r8
movabs rax, 0x8000000000000001
add r8, rax
jmp 0x140127dae
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x140128485
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x140127e1e
cmp byte [rdi + 0x98], 0
je 0x140127f44
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 0x140127fb8
mov rcx, qword [rsp + 0x70]
mov qword [rsi], rcx
jmp 0x140127cf6
mov rcx, qword [rsp + 0x70]
mov qword [rsi], rcx
jmp 0x140127ecd
movabs rax, 0x8000000000000001
lea rcx, [rbx + rax]
mov rax, qword [r15 - 0x60]
cmp rcx, 2
jae 0x140128168
movabs rcx, 0x8000000000000001
add rcx, rax
cmp rcx, 2
setae cl
cmp rax, rbx
sete al
or al, cl
mov rax, rbx
jne 0x14012817c
jmp 0x140128476
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 0x1401281b8
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 0x1401281fe
movabs rdx, 0x8000000000000001
add rdx, rcx
cmp rdx, 2
setae dl
cmp rcx, r14
sete cl
or cl, dl
je 0x140128488
mov qword [r15 - 0x58], r14
cmp rbx, r13
jle 0x14012848b
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 0x140128239
movabs rdx, 0x8000000000000001
add rdx, rcx
cmp rdx, 2
setae dl
cmp rcx, rbx
sete cl
or cl, dl
jne 0x140128250
jmp 0x140128479
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 0x140128288
movabs rcx, 0x8000000000000001
add rcx, rax
cmp rcx, 1
ja 0x14012829c
cmp rax, rbx
je 0x14012829c
jmp 0x14012847c
lea rcx, [rax + rbx]
sar rcx, 0x3f
btc rcx, 0x3f
add rbx, rax
cmovo rbx, rcx
cmp rbx, 0xf4241
jl 0x140127e44
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 0x1401284af
cqo
idiv rbx
movsxd rcx, eax
cmp rcx, rax
jne 0x140128497
lea rdx, str.Scheduling.ThreadController.ActiveVsWallTimePercentage
mov rcx, qword [rsp + 0x38]
mov r8d, eax
call fcn.140239ee0
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 0x1401284df
cqo
idiv rbx
movsxd rcx, eax
cmp rcx, rax
jne 0x14012849f
lea rdx, str.Scheduling.ThreadController.ActiveOnCpuVsWallTimePercentage
mov rcx, qword [rsp + 0x38]
mov r8d, eax
call fcn.140239ee0
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 0x14012850f
cqo
idiv rbx
lea rdi, [r15 - 0x68]
movsxd rcx, eax
cmp rcx, rax
jne 0x1401284a7
lea rdx, str.Scheduling.ThreadController.ActiveOffCpuVsWallTimePercentage
mov rcx, qword [rsp + 0x38]
mov r8d, eax
call fcn.140239ee0
xorpd xmm0, xmm0
movupd xmmword [rdi + 0x10], xmm0
movupd xmmword [rdi], xmm0
jmp 0x140127e44
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 0x140127f44
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 0x140127fa1
mov rcx, qword [0x14032e5f0]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140127ccf
mov rcx, qword [0x14032e5f0]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140127ea6
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x14012848e
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x1401282dc
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x140128491
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x140128333
movabs rcx, 0x8000000000000001
add rcx, rbx
cmp rcx, 1
jbe 0x140128494
xor rax, rbx
shr rax, 0x3f
movabs rcx, 0x8000000000000001
add rax, rcx
add rax, 0xfffffffffffffffe
jmp 0x14012838a