Function at 0x180221940
Capabilities:
Allocate thread local storage

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rax - 0x58], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov edi, edx
movzx r12d, cl
mov byte [rax - 0x38], 0
lea rcx, [0x1806d5712]
mov qword [rax - 0x40], rcx
call fcn.1801d1270
nop
mov rbx, qword [0x1806d4eb0]
test rbx, rbx
je 0x180221a19
inc dword [rbx + 0xc8]
test r12b, r12b
je 0x1802219af
mov esi, dword [rbx + 0xcc]
lea eax, [rsi + 1]
mov dword [rbx + 0xcc], eax
jmp 0x1802219b4
mov esi, 1
mov byte [0x1806d5712], 0
xor ebp, ebp
mov qword [rsp + 0x38], rbp
test esi, esi
jne 0x1802219d7
mov edx, dword [rbx + 0x18]
mov ecx, edi
call fcn.1802218e0
mov ecx, eax
call fcn.180221d10
call fcn.1801d1f20
dec eax
cmp edi, eax
je 0x180221c3d
mov esi, dword [rbx + 0xdc]
cmp esi, edi
jae 0x180221c3d
mov r8d, edi
mov edx, esi
lea rcx, str.The_number_of_workers_is_currently_limited_to__u._The_request_for__u_workers_is_ignored._Further_requests_for_more_workers_will_be_silently_ignored_until_the_limit_changes._n
call fcn.18022ce50
mov ecx, 0xffffffff
mov eax, esi
lock cmpxchg dword [rbx + 0xdc], ecx
jmp 0x180221c3d
mov rcx, qword [0x1805ccd18]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov r13, rax
call fcn.1801d1f20
mov ebx, 2
mov ecx, 4
cmp eax, 0x80
cmovbe ebx, ecx
mov rcx, qword [0x1806c8370]
xor ebp, ebp
mov r15d, ebp
test rcx, rcx
cmovne r15d, dword [0x1806c8368]
call fcn.1801d1f20
imul eax, ebx
cmp eax, r15d
cmovae r15d, eax
mov rax, qword [0x1806c8370]
test rax, rax
je 0x180221a82
mov rax, qword [0x1806c8368]
test eax, eax
je 0x180221a82
lea edi, [rax - 1]
jmp 0x180221a8e
call fcn.1801d1f20
dec eax
cmp eax, edi
cmovae edi, eax
lea eax, [r15 - 1]
mov r14d, eax
cmp edi, r15d
cmovb r14d, edi
lea rdi, [rax*8 + 0x100]
mov esi, 1
mov eax, esi
lock xadd dword [0x1806d4e6c], eax
inc eax
cmp eax, esi
jne 0x180221af0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x180221c6b
mov dword [0x1806d4e68], eax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x28], xmm0
mov eax, 7
xor ecx, ecx
cpuid
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x2c], ebx
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x34], edx
mov rdx, rdi
mov rcx, rsi
call fcn.18021da20
mov rbx, rax
mov r8, rdi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
lea rax, vtable.tbb::internal::market.0
mov qword [rbx], rax
mov qword [rbx + 8], rbp
mov dword [rbx + 0x18], r15d
mov dword [rbx + 0x1c], r14d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], rsi
lea rcx, [rbx + 0x48]
mov qword [rcx + 0x10], rbp
mov qword [rcx], rcx
mov qword [rcx + 8], rcx
lea rax, [rcx + 0x28]
mov qword [rax + 0x10], rbp
mov qword [rax], rax
mov qword [rax + 8], rax
lea rax, [rcx + 0x50]
mov qword [rax + 0x10], rbp
mov qword [rax], rax
mov qword [rax + 8], rax
mov dword [rbx + 0xc8], esi
mov qword [rbx + 0xd0], r13
mov dword [rbx + 0xdc], r14d
lea rax, [rbx + 0xe0]
mov qword [rax + 0x10], rbp
mov qword [rax], rax
mov qword [rax + 8], rax
mov eax, dword [rbx + 0x1c]
mov dword [rbx + 0x94], eax
mov qword [rsp + 0x90], rbp
cmp byte [0x1806d4ea1], bpl
jne 0x180221bd4
mov r8, rbx
lea rdx, [rsp + 0x90]
lea rcx, [0x1806d4e70]
call qword [0x1806d4e88]
test eax, eax
je 0x180221bc7
mov byte [0x1806d4ea1], sil
mov edx, eax
lea rcx, str.rml::tbb_factory::make_server_failed_with_status__x__falling_back_on_private_rml
call fcn.18022ce50
mov rcx, qword [rsp + 0x90]
test rcx, rcx
jne 0x180221bf7
mov edx, 0x40
mov rcx, rsi
call fcn.18021da20
mov rdx, rbx
mov rcx, rax
call fcn.18022da80
mov rcx, rax
mov qword [rsp + 0x90], rax
mov qword [rbx + 0x10], rcx
test r12b, r12b
je 0x180221c06
mov dword [rbx + 0xcc], esi
mov qword [0x1806d4eb0], rbx
cmp byte [0x1806d4ea1], bpl
jne 0x180221c3d
mov rax, qword [rcx]
call qword [rax + 0x20]
cmp eax, r14d
jae 0x180221c3d
mov rcx, qword [rbx + 0x10]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov edx, eax
mov r8d, r14d
lea rcx, str.RML_might_limit_the_number_of_workers_to__u_while__u_is_requested._n
call fcn.18022ce50
nop
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x180221c4a
mov byte [rax], 0
mov rax, rbx
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov ecx, 0xffffffff
call fcn.18022cfc0
int3