Function at 0x1400407e0
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, 0x1a8
movaps xmmword [rsp + 0x190], xmm6
mov qword [rsp + 0xb8], r8
mov qword [rsp + 0x60], rdx
mov rdi, rcx
mov rax, qword [0x1402e0038]
xor rax, rsp
mov qword [rsp + 0x188], rax
movabs r12, 0xaaaaaaaaaaaaaaaa
mov al, byte [0x1402e3230]
mov byte [rsp + 0x5f], al
test al, 0x19
jne 0x140040df7
xor eax, eax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0x98], r12
cmp byte [rdi + 0x178], 0
je 0x140040ce6
lea rbx, [rdi + 0x178]
lea r15, [r12 - 0xaa]
mov esi, 0xffffffff
lea r13, [rdi + 0x1f0]
mov ecx, 0xaaaaaaaa
lea rax, [rdi + 0x18]
mov qword [rsp + 0x70], rax
movaps xmm6, xmmword [0x14029bb90]
lea rax, [rdi + 0x1b8]
mov qword [rsp + 0xa8], rax
xor ebp, ebp
inc esi
cmp esi, dword [rdi + 0x15c]
jge 0x140040bd4
mov rax, qword [rdi + 0x10]
mov dword [rsp + 0x17c], ecx
mov dword [rsp + 0x179], ecx
mov qword [rsp + 0x170], r15
mov byte [rsp + 0x178], bpl
mov qword [rsp + 0x180], rax
cmp byte [rdi + 0x208], 0
je 0x1400408f1
mov rcx, r13
call fcn.1400ac710
mov byte [rdi + 0x208], 0
mov qword [rsp + 0xb0], rbx
mov qword [rsp + 0x68], r13
test r13, r13
je 0x140040cc8
mov qword [rdi + 0x1f8], 0
xor r14d, r14d
mov byte [rdi + 0x200], r14b
mov byte [rdi + 0x1f0], r14b
mov byte [rdi + 0x208], 1
mov rax, qword [rdi + 0x1c0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
mov rcx, qword [rsp + 0x70]
lea rbx, [rsp + 0x170]
mov rdx, rbx
call fcn.140041d80
mov r13, qword [rdi + 0xc0]
sub r13, qword [rdi + 0xb8]
movzx r9d, byte [rdi + 0x1b0]
movaps xmmword [rsp + 0x160], xmm6
movaps xmmword [rsp + 0x150], xmm6
mov rcx, qword [rdi + 0x140]
lea rdx, [rsp + 0x150]
mov r8, rbx
call fcn.140044cb0
movaps xmmword [rsp + 0x130], xmm6
mov rax, qword [rdi + 0x10]
mov byte [rsp + 0x130], r14b
mov byte [rsp + 0x138], r14b
mov qword [rsp + 0x140], rax
cmp byte [rsp + 0x168], r14b
je 0x140040c4a
mov rax, qword [rsp + 0x150]
cmp qword [rax + 0x28], 0
jne 0x140040c4a
mov rdx, qword [rax + 0x20]
shr r13, 6
mov rcx, qword [rsp + 0x70]
lea r8, [rsp + 0x130]
call fcn.1400412d0
cmp byte [rsp + 0x168], 0
je 0x140040c51
mov al, byte [rdi + 0x178]
mov byte [rsp + 0x5e], al
mov byte [rdi + 0x178], 0
mov al, byte [0x1402e3010]
test al, 0x19
mov byte [rsp + 0x5d], al
jne 0x140040ed9
mov qword [rsp + 0x120], r12
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x100], xmm6
movaps xmmword [rsp + 0xf0], xmm6
movaps xmmword [rsp + 0xe0], xmm6
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0xc0], xmm6
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x90], r12
mov qword [rsp + 0x88], r12
mov rbx, qword [rsp + 0xa8]
lea rbp, [rsp + 0xc0]
mov r8, qword [rsp + 0x150]
mov rdx, qword [rdi + 0x10]
mov rcx, rbp
mov r9, rbx
call fcn.140041120
cmp byte [rsp + 0x168], 0
je 0x140040ccb
mov rdx, qword [rsp + 0x150]
mov rcx, rbx
call fcn.14005a850
mov rcx, rbp
call fcn.1400411d0
cmp byte [rsp + 0x168], 0
je 0x140040adf
mov rcx, qword [rsp + 0x158]
test rcx, rcx
jne 0x140040cce
mov byte [rsp + 0x168], 0
movaps xmmword [rsp + 0xc0], xmm6
mov rax, qword [rdi + 0x10]
xor ebx, ebx
mov byte [rsp + 0xc0], bl
mov byte [rsp + 0xc8], bl
mov qword [rsp + 0xd0], rax
mov rcx, qword [rdi + 0x140]
mov rdx, rbp
call fcn.140041660
cmp byte [rdi + 0x208], bl
je 0x140040b24
mov rcx, qword [rsp + 0x68]
call fcn.1400ac710
mov r14, r12
mov qword [rdi + 0x1f8], 0
xor eax, eax
mov byte [rdi + 0x200], al
xor ebx, ebx
mov byte [rdi + 0x1f0], al
mov byte [rdi + 0x208], 1
mov rax, qword [rdi + 0x1c0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
mov rcx, qword [rsp + 0x70]
mov rdx, rbp
mov r8d, r13d
call fcn.140041920
mov bpl, byte [rsp + 0xc8]
test bpl, bpl
je 0x140040b82
mov r15, qword [rsp + 0xc0]
mov r12, r15
cmp byte [rdi + 0x158], bl
sete r15b
test byte [rsp + 0x5d], 0x19
mov rbx, qword [rsp + 0xb0]
mov r13, qword [rsp + 0x68]
jne 0x140040dca
test rbx, rbx
je 0x140040bb2
mov al, byte [rsp + 0x5e]
mov byte [rbx], al
cmp byte [rsp + 0x168], 0
jne 0x140040da1
test r15b, r15b
mov r15, r12
mov r12, r14
mov ecx, 0xaaaaaaaa
jne 0x1400408a1
cmp byte [rdi + 0x158], 0
jne 0x140040d90
mov eax, 5
xchg dword [rdi + 0x190], eax
movzx r9d, byte [rdi + 0x1b0]
mov rcx, qword [rdi + 0x140]
mov rdi, qword [rsp + 0x60]
mov rdx, rdi
mov r8, qword [rsp + 0xb8]
call fcn.140042620
test byte [rsp + 0x5f], 0x19
jne 0x140040d5d
mov rcx, qword [rsp + 0x188]
xor rcx, rsp
call fcn.14010fba0
mov rax, rdi
movaps xmm6, xmmword [rsp + 0x190]
add rsp, 0x1a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor edx, edx
jmp 0x1400409d9
mov r14, r12
mov r12, r15
cmp byte [rdi + 0x208], 0
je 0x140040c6a
mov rcx, qword [rsp + 0x68]
call fcn.1400ac710
mov qword [rdi + 0x1f8], 0
xor r15d, r15d
mov byte [rdi + 0x200], r15b
mov byte [rdi + 0x1f0], r15b
mov byte [rdi + 0x208], 1
mov rax, qword [rdi + 0x1c0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
mov rcx, qword [rsp + 0x70]
lea rdx, [rsp + 0x130]
mov r8d, r13d
call fcn.140041920
mov rbx, qword [rsp + 0xb0]
mov r13, qword [rsp + 0x68]
jmp 0x140040bb2
int3
int3
lock dec dword [rcx]
jne 0x140040ad7
mov rax, qword [rcx + 0x10]
call qword [0x140318008]
jmp 0x140040ad7
mov bpl, byte [0x1402e21a0]
test bpl, 0x19
jne 0x140041006
mov r8, r12
xor esi, esi
mov rbx, r12
mov rax, qword [rdi + 0x170]
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
je 0x140040d28
mov rcx, qword [rsp + 0x60]
mov qword [rcx], rax
xorps xmm0, xmm0
movups xmmword [rcx + 8], xmm0
mov al, 1
jmp 0x140040d32
mov rax, qword [rsp + 0x60]
mov byte [rax], 0
xor eax, eax
mov rdi, qword [rsp + 0x60]
mov byte [rdi + 0x18], al
test bpl, 0x19
je 0x140040c10
cmp byte [rsi], 0
je 0x140040c10
mov rcx, rsi
mov rdx, rbx
call fcn.14016b030
jmp 0x140040c10
mov rax, qword [rsp + 0x80]
cmp byte [rax], 0
je 0x140040c1b
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x98]
call fcn.14016b030
jmp 0x140040c1b
xor eax, eax
mov rdi, qword [rsp + 0x60]
mov byte [rdi], al
mov byte [rdi + 0x18], al
jmp 0x140040c10
mov rcx, qword [rsp + 0x158]
test rcx, rcx
je 0x140040bc0
lock dec dword [rcx]
jne 0x140040bc0
mov rax, qword [rcx + 0x10]
call qword [0x140318008]
jmp 0x140040bc0
mov rax, qword [rsp + 0x78]
cmp byte [rax], 0
je 0x140040ba7
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
call fcn.14016b030
jmp 0x140040ba7
mov rax, qword [0x1402e38a8]
lea rcx, [0x140038fc0]
cmp rax, rcx
jne 0x1400410d9
lea rsi, [rsp + 0xc0]
mov qword [rsi], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsi]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x140040e5c
mov rcx, qword [0x1402f3f50]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140040e6c
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402f3f50]
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x1402e3230]
lea r8, str.ThreadControllerImpl::DoWork
mov cl, 0x58
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0xa0], r8
xor r9d, r9d
call fcn.14016b830
mov qword [rsp + 0x98], rax
jmp 0x140040853
mov rax, qword [0x1402e38a8]
lea rcx, [0x140038fc0]
cmp rax, rcx
jne 0x1400410ec
lea rbx, [rsp + 0xc0]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x140040f3e
mov rcx, qword [0x1402f3f50]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140040f4e
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402f3f50]
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x1402e3010]
lea r8, str.RunTask
mov cl, 0x58
mov qword [rsp + 0x78], rdx
mov qword [rsp + 0x90], r8
xor r9d, r9d
call fcn.14016b830
mov qword [rsp + 0x88], rax
cmp byte [rsp + 0x168], 0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x120], rax
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x100], xmm6
movaps xmmword [rsp + 0xf0], xmm6
movaps xmmword [rsp + 0xe0], xmm6
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0xc0], xmm6
jne 0x140040a6f
int3
mov rax, qword [0x1402e38a8]
lea rcx, [0x140038fc0]
cmp rax, rcx
jne 0x1400410ff
lea rsi, [rsp + 0xc0]
mov qword [rsi], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsi]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x14004106b
mov rcx, qword [0x1402f3f50]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x14004107b
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402f3f50]
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rsi, [0x1402e21a0]
lea rbx, str.ThreadController:_application_tasks_disallowed
mov cl, 0x58
mov rdx, rsi
mov r8, rbx
xor r9d, r9d
call fcn.14016b830
mov r8, rax
jmp 0x140040cff
lea rcx, [rsp + 0xc0]
call qword [0x140318008]
jmp 0x140040e74
lea rcx, [rsp + 0xc0]
call qword [0x140318008]
jmp 0x140040f56
lea rcx, [rsp + 0xc0]
call qword [0x140318008]
jmp 0x140041083