Function at 0x140021da0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xb0
mov qword [rbp + 0xf], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov r15, rcx
mov ecx, dword [0x14007d6a8]
cmp byte [0x14007d6ac], 0
je 0x140021de5
call qword [sym.imp.KERNEL32.dll_FlsGetValue]
jmp 0x140021dec
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
nop
test rax, rax
jne 0x140021fd4
mov ecx, dword [0x14007d698]
cmp byte [0x14007d69c], al
je 0x140021e0b
call qword [sym.imp.KERNEL32.dll_FlsGetValue]
jmp 0x140021e12
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
nop
mov ebx, 1
test rax, rax
je 0x140021ff5
mov rcx, qword [r15]
lea rax, [0x1400450e0]
mov qword [rbp - 0x29], rax
and qword [rbp - 0x21], 0
mov word [rbp - 0x19], 0x101
mov qword [rbp - 0x11], rcx
mov rax, qword [rcx]
lea rdx, [rbp - 0x29]
mov rax, qword [rax]
call qword [case.0x14003f18e.0]
cmp byte [rbp - 0x19], 0
je 0x140021fd4
lea rcx, [rbp + 0x17]
call fcn.1400254a4
mov r12, qword [rax]
mov rdi, qword [rax + 8]
and qword [rax], 0
and qword [rax + 8], 0
or esi, 0xffffffff
mov r14, qword [rbp + 0x1f]
test r14, r14
je 0x140021eb8
nop dword [rax]
mov eax, esi
lock xadd dword [r14 + 8], eax
add eax, esi
jne 0x140021eb8
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax]
call qword [case.0x14003f18e.0]
mov eax, esi
lock xadd dword [r14 + 0xc], eax
add eax, esi
jne 0x140021eb8
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
lea rax, [0x140045290]
mov qword [rbp - 9], rax
test rdi, rdi
je 0x140021ecc
lock add dword [rdi + 8], ebx
mov qword [rbp - 1], r12
mov qword [rbp + 7], rdi
test r12, r12
je 0x14002209e
mov rcx, qword [r15]
mov rax, qword [rcx]
lea rdx, [rbp - 9]
mov rax, qword [rax]
call qword [case.0x14003f18e.0]
test rdi, rdi
je 0x140021ef9
lock add dword [rdi + 8], ebx
mov qword [rbp - 0x39], r12
mov qword [rbp - 0x31], rdi
mov rax, qword [r15 + 0x10]
lea r8, [rbp - 0x39]
mov rdx, qword [rax]
mov rcx, qword [r15 + 8]
call fcn.140022374
nop
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x140021f5a
mov eax, esi
lock xadd dword [rcx + 8], eax
add eax, esi
jne 0x140021f5a
mov rbx, qword [rbp - 0x31]
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x14003f18e.0]
mov eax, esi
lock xadd dword [rbx + 0xc], eax
add eax, esi
jne 0x140021f5a
mov rcx, qword [rbp - 0x31]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
mov rbx, qword [rbp + 7]
test rbx, rbx
je 0x140021f99
mov eax, esi
lock xadd dword [rbx + 8], eax
add eax, esi
jne 0x140021f99
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x14003f18e.0]
mov eax, esi
lock xadd dword [rbx + 0xc], eax
add eax, esi
jne 0x140021f99
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
test rdi, rdi
je 0x140021fd4
mov eax, esi
lock xadd dword [rdi + 8], eax
add eax, esi
jne 0x140021fd4
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax]
call qword [case.0x14003f18e.0]
mov eax, esi
lock xadd dword [rdi + 0xc], eax
add eax, esi
jne 0x140021fd4
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x14003f18e.0]
nop
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
lea rax, [0x14007d698]
mov qword [rbp - 0x49], rax
and dword [rbp - 0x41], 0
mov edi, 7
mov ecx, dword [0x14007d698]
mov rdx, rbx
cmp byte [0x14007d69c], 0
je 0x140022023
call qword [sym.imp.KERNEL32.dll_FlsSetValue]
jmp 0x140022030
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
nop word [rax + rax]
test eax, eax
jne 0x140022039
mov rcx, rdi
int 0x29
lock xadd dword [rbp - 0x41], ebx
mov r8, qword [r15 + 0x10]
mov rcx, qword [r15 + 0x18]
add rcx, 8
mov r9, qword [r15]
mov r8, qword [r8]
mov rdx, qword [r15 + 8]
call fcn.14001ec90
mov rcx, qword [r15 + 0x18]
call fcn.1400227e0
or esi, 0xffffffff
mov eax, dword [rbp - 0x41]
test eax, eax
je 0x140021fd4
mov eax, esi
lock xadd dword [rbp - 0x41], eax
mov rcx, qword [rbp - 0x49]
xor edx, edx
cmp byte [rcx + 4], dl
mov ecx, dword [rcx]
je 0x14002208c
call qword [sym.imp.KERNEL32.dll_FlsSetValue]
jmp 0x140022093
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
test eax, eax
jne 0x140022065
mov rcx, rdi
int 0x29
jmp 0x140022065
lea rdx, str.StructuredTraceCopier_requires_non_null_IStructuredTrace_to_receive_the_copy.
lea rcx, [rbp + 0x27]
call fcn.14001e5ac
lea rdx, [0x14006d2c8]
lea rcx, [rbp + 0x27]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
nop
mov r11, rsp
mov byte [r11 + 0x18], r8b
mov dword [rsp + 0x10], edx
sub rsp, 0x48
lea rax, [r11 + 0x10]
mov qword [r11 - 0x28], rcx
mov qword [r11 - 0x20], rax
lea rcx, [r11 + 8]
lea rax, [r11 + 0x18]
mov qword [r11 - 0x18], rax
lea rax, [r11 - 0x28]
mov qword [r11 + 8], rax
call fcn.140024a8c
add rsp, 0x48
ret