Function at 0x14002a150
Capabilities:
Check for time delay via queryperformancecounter
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r12
push r13
push r14
lea rbp, [rsp - 0x2f]
sub rsp, 0xf0
xor esi, esi
mov r13d, r9d
mov dword [rbp + 0x5f], esi
mov r12d, r8d
mov rbx, rdx
mov r14d, ecx
call fcn.1400ad850
test al, al
jne 0x14002a18c
call fcn.14005e2c0
test al, al
je 0x14002a18e
mov al, 1
mov qword [rsp + 0x128], rdi
mov qword [rsp + 0x130], r15
cmp r14d, 1
jle 0x14002aadb
test r12b, 1
jne 0x14002aadb
test al, al
je 0x14002aadb
call fcn.140025420
mov rdx, rax
lea edi, [r14 - 1]
mov rcx, qword [rax]
mov rax, qword [rcx + 0x18]
mov rcx, rdx
call qword [case.0x140041db8.0]
cmp eax, edi
cmovle edi, eax
test edi, edi
je 0x14002aadb
mov eax, dword [rbp + 0x7f]
test eax, eax
jle 0x14002a1fb
cmp eax, edi
cmovle edi, eax
mov eax, edi
mov edi, 1
cmp eax, edi
cmovge edi, eax
mov r15d, r12d
mov eax, r12d
shr r15d, 3
and r15d, 1
shr eax, 2
shl r15d, 9
and al, 1
add r15d, 0x6ff
mov dword [rsp + 0x30], eax
cmp r13d, 1
jne 0x14002a594
lea ecx, [r13 + 0x2f]
call fcn.14001c7e0
test rax, rax
je 0x14002a260
mov rcx, qword [rbx]
mov qword [rbp - 0x51], rcx
test rcx, rcx
je 0x14002a249
mov rcx, qword [rbx + 8]
mov qword [rbp - 0x49], rcx
mov r9d, r12d
lea r8, [rbp - 0x51]
mov edx, r14d
mov rcx, rax
call fcn.14002b0c0
mov rbx, rax
jmp 0x14002a263
mov rbx, rsi
mov ecx, 0x18
call fcn.14001c7e0
test rax, rax
je 0x14002a290
lea rcx, [0x140290c68]
mov dword [rax + 8], 1
mov qword [rax], rcx
mov dword [rax + 0xc], 1
mov qword [rax + 0x10], rbx
jmp 0x14002a293
mov rax, rsi
mov r8, rbx
mov qword [rsp + 0x40], rbx
mov rdx, rbx
mov qword [rbp - 0x79], rax
lea rcx, [rsp + 0x40]
call fcn.140024e80
lea rcx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov r15d, 0xffffffff
test edi, edi
jle 0x14002a454
mov r12, qword [rbp - 9]
mov r13d, edi
nop dword [rax + rax]
call fcn.140025430
mov r14, rax
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
jne 0x14002a313
lea ecx, [rax + 0x18]
call fcn.14001c7e0
mov rbx, rax
test rax, rax
je 0x14002a304
mov qword [rax], rsi
mov qword [rax + 8], rsi
mov dword [rax + 0x10], esi
jmp 0x14002a307
mov rbx, rsi
mov ecx, dword [r14]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rdi, qword [rbx + 8]
test rdi, rdi
jne 0x14002a388
mov rax, qword [rbx]
test rax, rax
je 0x14002a32d
mov qword [rbx + 8], rax
mov qword [rbx], rsi
jmp 0x14002a376
lea rcx, [r14 + 8]
call fcn.140026290
mov qword [rbx + 8], rax
test rax, rax
jne 0x14002a376
xor edx, edx
mov ecx, 0x2000
call fcn.14005e7b0
mov qword [rbx + 8], rax
mov edx, 0x1f
nop dword [rax]
nop dword [rax + rax]
lea rcx, [rax + 0x100]
mov qword [rax], rcx
mov rax, rcx
sub rdx, 1
jne 0x14002a360
mov qword [rcx], rsi
mov rdi, qword [rbx + 8]
mov ecx, 0x20
mov dword [rbx + 0x10], 0x20
jmp 0x14002a38b
mov ecx, dword [rbx + 0x10]
mov rax, qword [rdi]
mov qword [rbx + 8], rax
lea eax, [rcx - 1]
mov dword [rbx + 0x10], eax
lea rax, [0x1402826d8]
mov ebx, dword [rbp + 0x5f]
mov qword [rdi], rax
or ebx, 1
mov dword [rdi + 8], 0xff
lea rax, [0x140290900]
mov qword [rdi], rax
mov dword [rdi + 0xc], 1
mov byte [rdi + 0x20], sil
mov qword [rdi + 0x28], rsi
test bl, 2
je 0x14002a3ec
and ebx, 0xfffffffd
test r12, r12
je 0x14002a3ec
mov eax, r15d
lock xadd dword [r12 + 0x48], eax
cmp eax, 1
jne 0x14002a3ec
mov rcx, r12
call fcn.140026b60
mov rax, qword [rsp + 0x40]
and ebx, 0xfffffffe
mov qword [rdi + 0x10], rax
mov rax, qword [rbp - 0x79]
mov qword [rdi + 0x18], rax
mov rax, qword [rbp - 0x79]
mov dword [rbp + 0x5f], ebx
test rax, rax
je 0x14002a410
lock inc dword [rax + 8]
mov rbx, qword [rdi + 0x28]
test rbx, rbx
je 0x14002a41d
lock inc dword [rbx + 0x48]
mov r9b, 1
xor edx, edx
mov r8d, 0xff
mov rcx, rdi
call fcn.140041310
test rbx, rbx
je 0x14002a44a
mov eax, r15d
lock xadd dword [rbx + 0x48], eax
cmp eax, 1
jne 0x14002a44a
mov rcx, rbx
call fcn.140026b60
sub r13, 1
jne 0x14002a2d0
cmp qword [0x1403ebb08], rsi
je 0x14002a4a9
lea rcx, [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [0x1403ebb08]
mov rdi, qword [rbp - 0x21]
mov rbx, qword [rbp - 0x31]
sub rdi, rbx
cmp rdi, qword [rax + 0x40]
jbe 0x14002a4a9
xor ecx, ecx
call fcn.1400cd940
mov rcx, qword [0x1403ebb08]
lea rdx, str.ParallelForInternal_Greedy_ConstructAndDispatchWhenReady
mov r8d, eax
mov r9, rbx
mov byte [rsp + 0x28], sil
mov qword [rsp + 0x20], rdi
call fcn.1400cac50
mov rcx, qword [rsp + 0x40]
call fcn.140039800
test al, al
jne 0x14002a54f
cmp byte [rsp + 0x30], sil
je 0x14002a531
call fcn.14005e2f0
test al, al
je 0x14002a531
mov rax, qword [rsp + 0x40]
xor r8d, r8d
mov rcx, qword [rax + 0x18]
lea edx, [r8 + 1]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
test al, al
jne 0x14002a54f
nop dword [rax]
call fcn.140025420
mov edx, dword [0x14036e118]
mov r8, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0x30]
mov rcx, r8
call qword [case.0x140041db8.0]
mov rax, qword [rsp + 0x40]
xor r8d, r8d
mov rcx, qword [rax + 0x18]
lea edx, [r8 + 1]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
test al, al
je 0x14002a4f0
jmp 0x14002a54f
mov rax, qword [rsp + 0x40]
xor r8d, r8d
mov edx, 0xffffffff
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x28], 1
mov rbx, qword [rbp - 0x79]
test rbx, rbx
je 0x14002aafd
mov eax, r15d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x14002aafd
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x140041db8.0]
lock xadd dword [rbx + 0xc], r15d
cmp r15d, 1
jmp 0x14002a804
cmp r13d, 2
jne 0x14002a824
lea ecx, [rdi + 1]
mov eax, r14d
cdq
mov r13d, r14d
idiv ecx
imul ecx, eax
mov r15d, eax
sub r13d, ecx
mov ecx, 0x28
call fcn.14001c7e0
test rax, rax
je 0x14002a5ed
mov rcx, qword [rbx]
mov qword [rbp - 0x51], rcx
test rcx, rcx
je 0x14002a5d6
mov rcx, qword [rbx + 8]
mov qword [rbp - 0x49], rcx
mov r9d, r12d
lea r8, [rbp - 0x51]
mov edx, r14d
mov rcx, rax
call fcn.14002aff0
mov rbx, rax
jmp 0x14002a5f0
mov rbx, rsi
mov ecx, 0x18
call fcn.14001c7e0
test rax, rax
je 0x14002a61d
lea rcx, [0x140290c58]
mov dword [rax + 8], 1
mov qword [rax], rcx
mov dword [rax + 0xc], 1
mov qword [rax + 0x10], rbx
jmp 0x14002a620
mov rax, rsi
mov r8, rbx
mov qword [rbp - 0x71], rbx
mov rdx, rbx
mov qword [rbp - 0x69], rax
lea rcx, [rbp - 0x71]
call fcn.140024e80
lea rcx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea r12d, [r15 + r13]
mov r14d, 0xffffffff
mov esi, r12d
test edi, edi
jle 0x14002a6cd
xor edx, edx
lea rcx, [rbp - 1]
mov r8d, 0xff
call fcn.140030ba0
mov rcx, qword [rbp - 0x71]
mov rdx, qword [rax]
mov qword [rdx + 0x10], rcx
mov rcx, qword [rbp - 0x69]
mov qword [rdx + 0x18], rcx
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x14002a683
lock inc dword [rcx + 8]
mov dword [rdx + 0x20], esi
mov dword [rdx + 0x24], r15d
mov rcx, qword [rax]
mov r8d, dword [rax + 0x10]
mov rdx, qword [rax + 8]
mov rbx, qword [rcx + 0x30]
test rbx, rbx
je 0x14002a6a2
lock inc dword [rbx + 0x48]
mov r9b, 1
call fcn.1400410f0
test rbx, rbx
je 0x14002a6c4
mov eax, r14d
lock xadd dword [rbx + 0x48], eax
cmp eax, 1
jne 0x14002a6c4
mov rcx, rbx
call fcn.140026b60
add esi, r15d
sub rdi, 1
jne 0x14002a652
cmp qword [0x1403ebb08], 0
je 0x14002a723
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [0x1403ebb08]
mov rdi, qword [rbp - 0x19]
mov rbx, qword [rbp - 0x31]
sub rdi, rbx
cmp rdi, qword [rax + 0x40]
jbe 0x14002a723
xor ecx, ecx
call fcn.1400cd940
mov rcx, qword [0x1403ebb08]
lea rdx, str.ParallelForInternal_EvenDistribution_ConstructAndDispatchWhenReady
mov r8d, eax
mov r9, rbx
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], rdi
call fcn.1400cac50
mov rcx, qword [rbp - 0x71]
mov r8d, r12d
xor edx, edx
call fcn.140039790
test al, al
jne 0x14002a7c5
cmp byte [rsp + 0x30], al
je 0x14002a7a8
call fcn.14005e2f0
test al, al
je 0x14002a7a8
mov rax, qword [rbp - 0x71]
xor r8d, r8d
mov rcx, qword [rax + 0x18]
lea edx, [r8 + 1]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
test al, al
jne 0x14002a7c5
call fcn.140025420
mov edx, dword [0x14036e118]
mov r8, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0x30]
mov rcx, r8
call qword [case.0x140041db8.0]
mov rax, qword [rbp - 0x71]
xor r8d, r8d
mov rcx, qword [rax + 0x18]
lea edx, [r8 + 1]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
test al, al
je 0x14002a768
jmp 0x14002a7c5
mov rax, qword [rbp - 0x71]
xor r8d, r8d
mov edx, 0xffffffff
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
mov rax, qword [rbp - 0x71]
mov byte [rax + 0x24], 1
mov rbx, qword [rbp - 0x69]
test rbx, rbx
je 0x14002aafd
mov eax, r14d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x14002aafd
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x140041db8.0]
lock xadd dword [rbx + 0xc], r14d
cmp r14d, 1
jne 0x14002aafd
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [case.0x140041db8.0]
jmp 0x14002aafd
mov ecx, 0x38
call fcn.14001c7e0
mov rcx, rax
test rax, rax
je 0x14002a87d
lea r8d, [rdi + 1]
cmp r14d, r8d
jle 0x14002a84b
cmp byte [rsp + 0x30], sil
je 0x14002a84b
mov r9b, 1
jmp 0x14002a84e
xor r9d, r9d
mov rax, qword [rbx]
mov qword [rbp - 0x51], rax
test rax, rax
je 0x14002a862
mov rax, qword [rbx + 8]
mov qword [rbp - 0x49], rax
lea rax, [rbp - 0x51]
mov dword [rsp + 0x28], r12d
mov edx, r14d
mov qword [rsp + 0x20], rax
call fcn.14002ae90
mov rbx, rax
jmp 0x14002a880
mov rbx, rsi
mov ecx, 0x18
call fcn.14001c7e0
test rax, rax
je 0x14002a8ad
lea rcx, [0x140290c48]
mov dword [rax + 8], 1
mov qword [rax], rcx
mov dword [rax + 0xc], 1
mov qword [rax + 0x10], rbx
jmp 0x14002a8b0
mov rax, rsi
mov r8, rbx
mov qword [rbp - 0x61], rbx
mov rdx, rbx
mov qword [rbp - 0x59], rax
lea rcx, [rbp - 0x61]
call fcn.140024e80
xor edx, edx
lea rcx, [rbp + 0x17]
mov r8d, 0xff
call fcn.140030a40
mov rcx, qword [rbp - 0x61]
dec edi
mov rdx, qword [rax]
mov qword [rdx + 0x10], rcx
mov rcx, qword [rbp - 0x59]
mov qword [rdx + 0x18], rcx
test rcx, rcx
je 0x14002a8f6
lock inc dword [rcx + 8]
mov dword [rdx + 0x20], r15d
mov dword [rdx + 0x24], edi
mov rcx, qword [rax]
mov r8d, dword [rax + 0x10]
mov rdx, qword [rax + 8]
mov rbx, qword [rcx + 0x30]
test rbx, rbx
je 0x14002a915
lock inc dword [rbx + 0x48]
mov r9b, 1
call fcn.140040eb0
test rbx, rbx
je 0x14002a939
mov eax, 0xffffffff
lock xadd dword [rbx + 0x48], eax
cmp eax, 1
jne 0x14002a939
mov rcx, rbx
call fcn.140026b60
mov r15, qword [rbp - 0x61]
xor eax, eax
lock cmpxchg dword [r15 + 0x28], esi
mov rax, qword [r15 + 0x10]
movzx r8d, byte [r15 + 0x32]
mov ecx, dword [r15 + 4]
mov edx, dword [r15]
mov dword [rbp - 0x35], ecx
mov dword [rsp + 0x38], edx
mov byte [rbp + 0x5f], r8b
mov qword [rbp - 0x11], rax
test rax, rax
je 0x14002a96f
mov rax, qword [r15 + 0x18]
jmp 0x14002a973
mov rax, qword [rbp - 9]
lea r13d, [rdx - 1]
mov qword [rbp - 0x29], rax
mov dword [rbp - 0x39], r13d
nop
mov ebx, 1
lock xadd dword [r15 + 0x28], ebx
test r8b, r8b
je 0x14002a997
cmp ebx, r13d
cmovg ebx, r13d
cmp ebx, edx
jge 0x14002aa05
mov r14d, ecx
cmp ebx, r13d
jne 0x14002a9aa
mov r14d, dword [r15 + 8]
add r14d, ecx
mov edi, esi
test r14d, r14d
jle 0x14002a9f0
mov r13, qword [rbp - 0x29]
mov r12d, ebx
mov rsi, qword [rbp - 0x11]
imul r12d, ecx
lea eax, [rdi + r12]
mov rcx, r13
mov dword [rbp - 0x41], eax
lea rdx, [rbp - 0x41]
mov rax, rsi
call qword [case.0x140041db8.0]
inc edi
cmp edi, r14d
jl 0x14002a9c0
mov r13d, dword [rbp - 0x39]
xor esi, esi
mov ecx, dword [rbp - 0x35]
mov edx, dword [rsp + 0x38]
movzx r8d, byte [rbp + 0x5f]
mov eax, 1
lock xadd dword [r15 + 0x2c], eax
inc eax
cmp eax, edx
je 0x14002aa9d
cmp ebx, r13d
jl 0x14002a980
cmp byte [rsp + 0x30], 0
je 0x14002aa80
call fcn.14005e2d0
test al, al
je 0x14002aa80
mov rax, qword [rbp - 0x61]
xor r8d, r8d
mov rcx, qword [rax + 0x20]
lea edx, [r8 + 1]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
test al, al
jne 0x14002aa9d
nop
call fcn.140025420
mov edx, dword [0x14036e118]
mov r8, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0x30]
mov rcx, r8
call qword [case.0x140041db8.0]
mov rax, qword [rbp - 0x61]
xor r8d, r8d
mov rcx, qword [rax + 0x20]
lea edx, [r8 + 1]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
test al, al
je 0x14002aa40
jmp 0x14002aa9d
mov rax, qword [rbp - 0x61]
xor r8d, r8d
mov edx, 0xffffffff
mov rcx, qword [rax + 0x20]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140041db8.0]
mov rax, qword [rbp - 0x61]
mov byte [rax + 0x30], 1
mov rbx, qword [rbp - 0x59]
test rbx, rbx
je 0x14002aafd
mov edi, 0xffffffff
mov eax, edi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x14002aafd
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x140041db8.0]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jmp 0x14002a804
test r14d, r14d
jle 0x14002aafd
mov rcx, qword [rbx + 8]
lea rdx, [rsp + 0x30]
mov rax, qword [rbx]
mov dword [rsp + 0x30], esi
call qword [case.0x140041db8.0]
inc esi
cmp esi, r14d
jl 0x14002aae0
mov r15, qword [rsp + 0x130]
mov rdi, qword [rsp + 0x128]
mov rbx, qword [rsp + 0x138]
add rsp, 0xf0
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret