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

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0xa8
mov rdi, rcx
cmp byte [rcx + 0x21], 0
je 0x18002d75c
mov byte [rsp + 0x2f], 3
jmp 0x18002d780
call fcn.180037440
test rax, rax
je 0x18002dbb6
cmp qword [rax], 1
jbe 0x18002d777
mov byte [rsp + 0x2f], 1
jmp 0x18002d780
call fcn.18002b700
mov byte [rsp + 0x2f], al
mov rax, qword [rdi + 0x18]
mov qword [rsp + 0x88], rax
mov rsi, qword [rdi]
mov rdi, qword [rdi + 8]
mov rcx, rsi
call qword [rdi + 0x18]
movabs rcx, 0xfdbc168100b1ef64
xor rcx, rdx
movabs rdx, 0xc1a2c89ccd1e7bc1
xor rdx, rax
or rdx, rcx
jne 0x18002d7be
lea rax, [rsi + 8]
jmp 0x18002d7f1
mov rcx, rsi
call qword [rdi + 0x18]
movabs rcx, 0x37ffbc897ab65311
xor rcx, rdx
movabs rdx, 0xf14f077a2842e537
xor rdx, rax
or rdx, rcx
jne 0x18002d7f9
lea rcx, [rsi + 8]
add rsi, 0x10
mov rax, rsi
mov rsi, rcx
mov rcx, qword [rsi]
mov rax, qword [rax]
jmp 0x18002d805
mov eax, 0xc
lea rcx, [0x180139df4]
mov qword [rsp + 0x98], rcx
mov qword [rsp + 0xa0], rax
mov ecx, dword [0x180039078]
test ecx, ecx
je 0x18002db14
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x18002d83e
mov rdi, rax
cmp qword [rax + 8], 0
jne 0x18002d90a
mov ecx, dword [0x180039078]
test ecx, ecx
je 0x18002db27
dec ecx
call sub.kernel32.dll_TlsGetValue
test rax, rax
je 0x18002d87f
mov rdi, rax
cmp rax, 1
jne 0x18002d8ce
mov qword [rsp + 0x38], 0
mov ecx, 9
lea rax, [0x180139e00]
mov bl, 1
xor esi, esi
jmp 0x18002d95c
mov rax, qword [0x18013ac88]
movzx eax, byte [rax]
mov ecx, 0x18
mov edx, 8
call fcn.18002d430
test rax, rax
je 0x18002dc2a
mov rdi, rax
lea rax, [0x180039060]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x180039078]
test ecx, ecx
je 0x18002db3a
dec ecx
mov rdx, rdi
call sub.kernel32.dll_TlsSetValue
mov rcx, qword [rdi + 8]
mov rax, qword [rdi + 0x10]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rax
mov qword [rdi + 8], 1
mov qword [rdi + 0x10], 0
test rcx, rcx
je 0x18002d90a
test rax, rax
je 0x18002d90a
lock dec qword [rax]
jne 0x18002d90a
lea rcx, [rsp + 0x60]
call fcn.1800187a0
add rdi, 0x10
mov rsi, qword [rdi]
test rsi, rsi
jne 0x18002d92d
xor ecx, ecx
call fcn.18002a440
mov rsi, rax
cmp qword [rdi], 0
jne 0x18002dbdf
mov qword [rdi], rsi
lock inc qword [rsi]
jle 0x18002dc28
mov qword [rsp + 0x38], rsi
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x18002d94e
mov rcx, qword [rsi + 0x20]
dec rcx
jmp 0x18002d95a
mov ecx, 9
lea rax, [0x180139e00]
xor ebx, ebx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rcx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x70], rax
movzx eax, byte [0x180140028]
test al, al
je 0x18002d9f7
mov byte [0x180140028], 1
call fcn.180037550
test rax, rax
je 0x18002db4d
mov r14, qword [rax]
mov qword [rax], 0
mov qword [rsp + 0x40], r14
test r14, r14
je 0x18002da00
mov qword [rsp + 0x90], r14
lea rsi, [r14 + 0x10]
mov rcx, rsi
call sub.kernel32.dll_AcquireSRWLockExclusive
mov rax, qword [0x180140070]
shl rax, 1
test rax, rax
je 0x18002da2f
call fcn.18002de60
mov ebx, eax
xor bl, 1
jmp 0x18002da31
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x30], 0
mov byte [rsp + 0x34], 0
lea r8, [0x180139e60]
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x30]
call fcn.18002dd10
xor edi, edi
test rsi, rsi
jne 0x18002daa2
jmp 0x18002dab2
xor ebx, ebx
movzx eax, byte [r14 + 0x18]
lea rdx, [r14 + 0x20]
lea r8, [0x180139e10]
lea rcx, [rsp + 0x58]
call fcn.18002dd10
test bl, bl
je 0x18002dae3
mov rcx, rsi
call sub.kernel32.dll_ReleaseSRWLockExclusive
mov byte [0x180140028], 1
mov qword [rsp + 0x30], r14
call fcn.180037550
test rax, rax
je 0x18002db7b
mov rcx, qword [rax]
mov qword [rax], r14
mov qword [rsp + 0x30], rcx
test rcx, rcx
je 0x18002da95
lock dec qword [rcx]
jne 0x18002da95
lea rcx, [rsp + 0x30]
call fcn.180018800
mov dil, 1
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x18002dab2
lock dec qword [rsi]
jne 0x18002dab2
lea rcx, [rsp + 0x38]
call fcn.1800187a0
mov rax, qword [rsp + 0x40]
test rax, rax
setne cl
not dil
test dil, cl
je 0x18002dad5
lock dec qword [rax]
jne 0x18002dad5
lea rcx, [rsp + 0x40]
call fcn.180018800
nop
add rsp, 0xa8
pop rbx
pop rdi
pop rsi
pop r14
ret
movabs rax, 0x7fffffffffffffff
mov rcx, qword [0x180140070]
test rcx, rax
je 0x18002da53
call fcn.18002de60
test al, al
jne 0x18002da53
mov byte [r14 + 0x18], 1
jmp 0x18002da53
lea rcx, [0x180039060]
call fcn.180030360
mov ecx, eax
jmp 0x18002d825
lea rcx, [0x180039060]
call fcn.180030360
mov ecx, eax
jmp 0x18002d84e
lea rcx, [0x180039060]
call fcn.180030360
mov ecx, eax
jmp 0x18002d8c6
lea rax, [0x1801397d8]
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, [0x180139100]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.180005120
jmp 0x18002dc28
lock dec qword [r14]
jne 0x18002db8b
lea rcx, [rsp + 0x30]
call fcn.180018800
lea rax, [0x1801397d8]
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, [0x180139100]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.180005120
jmp 0x18002dc28
lea rax, [0x1801397d8]
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, [0x180139100]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.180005120
lea rbx, [rsp + 0x50]
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rdi
lea rax, str.reentrant_init
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], 1
lea rax, str.called__Option::unwrap____on_a__None__value_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrary_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov qword [rsp + 0x68], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
lea rdx, str._rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrarycore_srccellonce.rs
lea rcx, [rsp + 0x58]
call fcn.180004c90
ud2
mov ecx, 8
mov edx, 0x18
call fcn.180003e80
mov rdi, rax
lock dec qword [rsi]
jne 0x18002dcfd
mov rcx, rbx
jmp 0x18002dcf8
call fcn.1800187a0
mov rcx, rdi
call fcn.180037c00
int3