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

Disassembly:
push rbp
push r14
push rsi
push rdi
push rbx
sub rsp, 0x70
lea rbp, [rsp + 0x70]
cmp edx, 3
je 0x14005433c
test edx, edx
jne 0x140054574
mov rdi, qword [0x1400d5160]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x140054390
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x140054580
mov rdi, qword [rdi + 8]
test esi, esi
je 0x140054350
dec esi
mov ecx, esi
call fcn.14009c0fc
test rax, rax
je 0x140054350
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x140054350
test bl, 1
je 0x1400544fe
mov rdi, qword [0x1400d5160]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x1400543f0
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x140054580
mov rdi, qword [rdi + 8]
test esi, esi
je 0x1400543b0
dec esi
mov ecx, esi
call fcn.14009c0fc
test rax, rax
je 0x1400543b0
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x1400543b0
test bl, 1
je 0x1400544fe
mov rdi, qword [0x1400d5160]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x140054450
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x140054580
mov rdi, qword [rdi + 8]
test esi, esi
je 0x140054410
dec esi
mov ecx, esi
call fcn.14009c0fc
test rax, rax
je 0x140054410
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x140054410
test bl, 1
je 0x1400544fe
mov rdi, qword [0x1400d5160]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x1400544b0
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x140054580
mov rdi, qword [rdi + 8]
test esi, esi
je 0x140054470
dec esi
mov ecx, esi
call fcn.14009c0fc
test rax, rax
je 0x140054470
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x140054470
test bl, 1
je 0x1400544fe
mov rbx, qword [0x1400d5160]
nop dword [rax]
test rbx, rbx
je 0x1400544fe
mov esi, dword [rbx + 0x18]
mov r14, qword [rbx]
test r14, r14
je 0x140054580
mov rbx, qword [rbx + 8]
test esi, esi
je 0x1400544c0
dec esi
mov ecx, esi
call fcn.14009c0fc
test rax, rax
je 0x1400544c0
mov rdi, rax
mov ecx, esi
xor edx, edx
call sub.KERNEL32.dll_TlsSetValue
mov rcx, rdi
call r14
jmp 0x1400544c0
mov ecx, dword [0x1400d51a0]
test ecx, ecx
je 0x140054517
dec ecx
call fcn.14009c0fc
cmp rax, 3
jae 0x140054530
jmp 0x140054574
lea rcx, [0x1400d5188]
call sym.std::sys::thread_local::key::windows::LazyKey::init::h3b25bd09068d2560
mov ecx, eax
call fcn.14009c0fc
cmp rax, 3
jb 0x140054574
mov rsi, rax
mov ecx, dword [0x1400d51a0]
test ecx, ecx
je 0x140054541
dec ecx
jmp 0x14005454f
lea rcx, [0x1400d5188]
call sym.std::sys::thread_local::key::windows::LazyKey::init::h3b25bd09068d2560
mov ecx, eax
mov edx, 2
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
add rax, 0xfffffffffffffff0
mov qword [rbp - 0x48], rax
lock dec qword [rsi - 0x10]
jne 0x140054574
lea rcx, [rbp - 0x48]
call sym.alloc::sync::Arc_T_A_::drop_slow::hfbd468a8117a8eec
nop
add rsp, 0x70
pop rbx
pop rdi
pop rsi
pop r14
pop rbp
ret
lea rcx, str._h_n_
call sym.core::option::unwrap_failed::h9508d322d744588d
ud2