Function at 0x140016130
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 0x140016391
mov byte [rsp + 0x2f], 0
mov rax, qword [0x1400be078]
cmp rax, 3
jne 0x14001633d
cmp byte [rsp + 0x2f], 0
jne 0x140016352
mov ecx, dword [0x14003e098]
test ecx, ecx
je 0x140016358
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x14001618d
mov rsi, rax
cmp byte [rax + 8], 0
jne 0x140016222
mov ecx, dword [0x14003e098]
test ecx, ecx
je 0x14001636b
dec ecx
call sub.kernel32.dll_TlsGetValue
test rax, rax
je 0x1400161d9
mov rsi, rax
cmp rax, 1
jne 0x14001621c
lea rax, [0x1400b5dd0]
mov qword [rsp + 0x20], rax
lea rcx, str.cannot_access_a_Thread_Local_Storage_value_during_or_after_destructionlibrary_std_src_threadlocal.rs
lea r9, [0x1400b5290]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.140005260
movzx eax, byte [0x1400be0e4]
mov ecx, 0x10
call fcn.140033f30
test rax, rax
je 0x1400163a4
mov rsi, rax
lea rax, [0x14003e080]
mov qword [rsi], rax
mov byte [rsi + 8], 0
mov ecx, dword [0x14003e098]
test ecx, ecx
je 0x14001637e
dec ecx
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
mov word [rsi + 8], 1
add rsi, 9
mov rax, qword [0x1400be040]
cmp rax, rsi
jne 0x140016254
mov eax, dword [0x1400be070]
inc eax
jne 0x140016274
lea rcx, str.lock_count_overflow_in_reentrant_mutexlibrary_std_src_sync_remutex.rs
lea r8, [0x1400b60a8]
mov edx, 0x26
call fcn.1400054e0
lea rcx, [0x1400be038]
call sub.kernel32.dll_TryAcquireSRWLockExclusive
test al, al
je 0x140016352
mov qword [0x1400be040], rsi
mov eax, 1
mov dword [0x1400be070], 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 [0x1400be048], 0
jne 0x14001639d
mov qword [0x1400be048], 0xffffffffffffffff
cmp byte [0x1400be068], 0
jne 0x1400162e2
lea rcx, [0x1400be050]
call fcn.140016510
test rax, rax
je 0x1400162e2
mov rcx, rax
call fcn.1400166c0
cmp qword [0x1400be050], 0
je 0x1400162fd
mov rcx, qword [0x1400be058]
mov edx, 1
call fcn.140001f00
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x1400be060], xmm1
movups xmmword [0x1400be050], xmm0
inc qword [0x1400be048]
dec dword [0x1400be070]
jne 0x140016352
mov qword [0x1400be040], 0
lea rcx, [0x1400be038]
call sub.kernel32.dll_ReleaseSRWLockExclusive
jmp 0x140016352
lea rcx, [rsp + 0x2f]
call fcn.140016430
cmp byte [rsp + 0x2f], 0
je 0x140016165
add rsp, 0x50
pop rsi
ret
lea rcx, [0x14003e080]
call fcn.140015d60
mov ecx, eax
jmp 0x140016175
lea rcx, [0x14003e080]
call fcn.140015d60
mov ecx, eax
jmp 0x14001619d
lea rcx, [0x14003e080]
call fcn.140015d60
mov ecx, eax
jmp 0x140016214
lea rcx, str.library_std_src_synconce.rs
call fcn.1400054c0
call fcn.140004a80
ud2
mov ecx, 8
mov edx, 0x10
call fcn.140002300
mov rsi, rax
cmp qword [0x1400be050], 0
je 0x1400163d1
mov rcx, qword [0x1400be058]
mov edx, 1
call fcn.140001f00
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x1400be060], xmm1
movups xmmword [0x1400be050], xmm0
inc qword [0x1400be048]
jmp 0x1400163ff
dec dword [0x1400be070]
jne 0x14001641e
mov qword [0x1400be040], 0
lea rcx, [0x1400be038]
call sub.kernel32.dll_ReleaseSRWLockExclusive
mov rcx, rsi
call fcn.14003b800
call fcn.1400058e0
int3