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

Disassembly:
push rsi
sub rsp, 0x50
mov rax, qword [rcx]
cmp byte [rax], 0
mov byte [rax], 0
je 0x140016f76
mov byte [rsp + 0x2f], 0
mov rax, qword [0x1400560a8]
cmp rax, 3
jne 0x140016f22
cmp byte [rsp + 0x2f], 0
jne 0x140016f37
mov ecx, dword [0x140047100]
test ecx, ecx
je 0x140016f3d
dec ecx
call fcn.140045274
cmp rax, 2
jb 0x140016d6d
mov rsi, rax
cmp byte [rax + 8], 0
jne 0x140016e07
mov ecx, dword [0x140047100]
test ecx, ecx
je 0x140016f50
dec ecx
call fcn.140045274
test rax, rax
je 0x140016db9
mov rsi, rax
cmp rax, 1
jne 0x140016e01
lea rax, str.library_std_src_threadlocal.rs
mov qword [rsp + 0x20], rax
lea rcx, str.cannot_access_a_Thread_Local_Storage_value_during_or_after_destruction_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrary_std_src_threadlocal.rs
lea r9, [0x14004cc90]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.140004f00
movzx eax, byte [0x140056128]
mov ecx, 0x10
mov edx, 8
call fcn.1400021a0
test rax, rax
je 0x140016f95
mov rsi, rax
lea rax, [0x1400470e8]
mov qword [rsi], rax
mov byte [rsi + 8], 0
mov ecx, dword [0x140047100]
test ecx, ecx
je 0x140016f63
dec ecx
mov rdx, rsi
call fcn.14004526c
mov word [rsi + 8], 1
add rsi, 9
mov rax, qword [0x140056070]
cmp rax, rsi
jne 0x140016e39
mov eax, dword [0x1400560a0]
inc eax
jne 0x140016e59
lea rcx, str.lock_count_overflow_in_reentrant_mutexlibrary_std_src_sync_remutex.rs
lea r8, [0x14004df48]
mov edx, 0x26
call fcn.140005160
lea rcx, [0x140056068]
call sub.KERNEL32.dll_TryAcquireSRWLockExclusive
test al, al
je 0x140016f37
mov qword [0x140056070], rsi
mov eax, 1
mov dword [0x1400560a0], eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 1
mov qword [rsp + 0x40], 0
mov byte [rsp + 0x48], 0
mov byte [rsp + 0x4d], 0
mov dword [rsp + 0x49], 0
cmp qword [0x140056078], 0
jne 0x140016f8e
mov qword [0x140056078], 0xffffffffffffffff
cmp byte [0x140056098], 0
jne 0x140016ec7
lea rcx, [0x140056080]
call fcn.1400170d0
test rax, rax
je 0x140016ec7
mov rcx, rax
call fcn.140015b70
cmp qword [0x140056080], 0
je 0x140016ee2
mov rcx, qword [0x140056088]
mov edx, 1
call fcn.140002230
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x140056090], xmm1
movups xmmword [0x140056080], xmm0
inc qword [0x140056078]
dec dword [0x1400560a0]
jne 0x140016f37
mov qword [0x140056070], 0
lea rcx, [0x140056068]
call fcn.1400452b4
jmp 0x140016f37
lea rcx, [rsp + 0x2f]
call fcn.140017060
cmp byte [rsp + 0x2f], 0
je 0x140016d45
add rsp, 0x50
pop rsi
ret
lea rcx, [0x1400470e8]
call fcn.140016330
mov ecx, eax
jmp 0x140016d55
lea rcx, [0x1400470e8]
call fcn.140016330
mov ecx, eax
jmp 0x140016d7d
lea rcx, [0x1400470e8]
call fcn.140016330
mov ecx, eax
jmp 0x140016df9
lea rcx, [0x14004f973]
lea r8, str.library_std_src_synconce.rs
mov edx, 0x2b
call fcn.140003ff0
call fcn.140004720
ud2
mov ecx, 8
mov edx, 0x10
call fcn.140002760
mov rsi, rax
cmp qword [0x140056080], 0
je 0x140016fc2
mov rcx, qword [0x140056088]
mov edx, 1
call fcn.140002230
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x140056090], xmm1
movups xmmword [0x140056080], xmm0
inc qword [0x140056078]
jmp 0x140017014
dec dword [0x1400560a0]
jne 0x140017033
mov qword [0x140056070], 0
lea rcx, [0x140056068]
call fcn.1400452b4
mov rcx, rsi
call fcn.1400458d0
cmp qword [rsp + 0x30], 0
je 0x140017052
mov rcx, qword [rsp + 0x38]
mov edx, 1
call fcn.140002230
call fcn.140005550
int3