Function at 0x140012600
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 0x140012899
mov byte [rsp + 0x2f], 0
mov rax, qword [0x140046080]
cmp rax, 3
jne 0x140012633
cmp byte [rsp + 0x2f], 0
je 0x140012644
add rsp, 0x50
pop rsi
ret
lea rcx, [rsp + 0x2f]
call fcn.140012990
cmp byte [rsp + 0x2f], 0
jne 0x14001262d
mov ecx, dword [0x140038088]
test ecx, ecx
je 0x1400126a0
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x1400126b9
mov rsi, rax
cmp byte [rax + 8], 0
je 0x1400126b9
add rsi, 9
mov rax, qword [0x140046048]
cmp rax, rsi
jne 0x1400127a3
mov eax, dword [0x140046078]
inc eax
jne 0x1400127c3
lea rcx, str.lock_count_overflow_in_reentrant_mutexlibrary_std_src_sync_remutex.rs
lea r8, [0x14003fb70]
mov edx, 0x26
call fcn.140004b50
ud2
lea rcx, [0x140038070]
call fcn.140011710
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x14001265b
mov ecx, dword [0x140038088]
test ecx, ecx
je 0x140012707
dec ecx
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14001271f
mov rsi, rax
cmp rax, 1
jne 0x140012789
lea rax, [0x14003f868]
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, [0x14003ee60]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.140004990
ud2
lea rcx, [0x140038070]
call fcn.140011710
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
jne 0x1400126cf
movzx eax, byte [0x140046030]
mov rcx, qword [0x1400460d0]
test rcx, rcx
jne 0x14001274a
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x1400128ba
mov rcx, rax
mov qword [0x1400460d0], rax
mov r8d, 0x10
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x1400128ba
mov rsi, rax
lea rax, [0x140038070]
mov qword [rsi], rax
mov byte [rsi + 8], 0
mov ecx, dword [0x140038088]
test ecx, ecx
je 0x140012886
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
mov word [rsi + 8], 1
add rsi, 9
mov rax, qword [0x140046048]
cmp rax, rsi
je 0x140012678
lea rcx, [0x140046040]
call sub.KERNEL32.dll_TryAcquireSRWLockExclusive
test al, al
je 0x14001262d
mov qword [0x140046048], rsi
mov eax, 1
mov dword [0x140046078], eax
mov qword [rsp + 0x30], 1
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x46], 0
cmp qword [0x140046050], 0
jne 0x1400128b3
mov qword [0x140046050], 0xffffffffffffffff
cmp byte [0x140046070], 0
jne 0x14001281e
lea rcx, [0x140046058]
call fcn.140012a00
test rax, rax
je 0x14001281e
mov rcx, rax
call fcn.140010d70
cmp qword [0x140046060], 0
je 0x14001283d
mov r8, qword [0x140046058]
mov rcx, qword [0x1400460d0]
xor edx, edx
call sub.KERNEL32.dll_HeapFree
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x140046068], xmm1
movups xmmword [0x140046058], xmm0
inc qword [0x140046050]
dec dword [0x140046078]
jne 0x14001262d
mov qword [0x140046048], 0
lea rcx, [0x140046040]
call sub.KERNEL32.dll_ReleaseSRWLockExclusive
nop
add rsp, 0x50
pop rsi
ret
lea rcx, [0x140038070]
call fcn.140011710
mov ecx, eax
jmp 0x140012781
lea rcx, str.called__Option::unwrap____on_a__None__value_rustc_ba7c7a301984967c8c13adb580ef9b86ba706a83library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
lea r8, str.library_std_src_synconce.rs
mov edx, 0x2b
call fcn.140003b70
ud2
call fcn.1400042a0
ud2
mov ecx, 8
mov edx, 0x10
call fcn.140002590
ud2