Function at 0x140056480
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 0x14005649c
test edx, edx
jne 0x1400566e9
mov rdi, qword [0x140125170]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x1400564f0
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x1400566f5
mov rdi, qword [rdi + 8]
test esi, esi
je 0x1400564b0
dec esi
mov ecx, esi
call fcn.14009e504
test rax, rax
je 0x1400564b0
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.kernel32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x1400564b0
test bl, 1
je 0x14005665e
mov rdi, qword [0x140125170]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x140056550
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x1400566f5
mov rdi, qword [rdi + 8]
test esi, esi
je 0x140056510
dec esi
mov ecx, esi
call fcn.14009e504
test rax, rax
je 0x140056510
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.kernel32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x140056510
test bl, 1
je 0x14005665e
mov rdi, qword [0x140125170]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x1400565b0
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x1400566f5
mov rdi, qword [rdi + 8]
test esi, esi
je 0x140056570
dec esi
mov ecx, esi
call fcn.14009e504
test rax, rax
je 0x140056570
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.kernel32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x140056570
test bl, 1
je 0x14005665e
mov rdi, qword [0x140125170]
xor ebx, ebx
nop word cs:[rax + rax]
test rdi, rdi
je 0x140056610
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x1400566f5
mov rdi, qword [rdi + 8]
test esi, esi
je 0x1400565d0
dec esi
mov ecx, esi
call fcn.14009e504
test rax, rax
je 0x1400565d0
mov ecx, esi
xor edx, edx
mov rsi, rax
call sub.kernel32.dll_TlsSetValue
mov rcx, rsi
call r14
mov bl, 1
jmp 0x1400565d0
test bl, 1
je 0x14005665e
mov rbx, qword [0x140125170]
nop dword [rax]
test rbx, rbx
je 0x14005665e
mov esi, dword [rbx + 0x18]
mov r14, qword [rbx]
test r14, r14
je 0x1400566f5
mov rbx, qword [rbx + 8]
test esi, esi
je 0x140056620
dec esi
mov ecx, esi
call fcn.14009e504
test rax, rax
je 0x140056620
mov rdi, rax
mov ecx, esi
xor edx, edx
call sub.kernel32.dll_TlsSetValue
mov rcx, rdi
call r14
jmp 0x140056620
mov ecx, dword [0x1401251b0]
test ecx, ecx
je 0x140056677
dec ecx
call fcn.14009e504
cmp rax, 3
jae 0x140056690
jmp 0x1400566e9
lea rcx, [0x140125198]
call sym.std::sys::thread_local::key::windows::LazyKey::init::h5f4686820bf88fde
mov ecx, eax
call fcn.14009e504
cmp rax, 3
jb 0x1400566e9
mov rsi, rax
mov ecx, dword [0x1401251b0]
test ecx, ecx
je 0x1400566a1
dec ecx
jmp 0x1400566af
lea rcx, [0x140125198]
call sym.std::sys::thread_local::key::windows::LazyKey::init::h5f4686820bf88fde
mov ecx, eax
mov edx, 2
call sub.kernel32.dll_TlsSetValue
lea rcx, [0x140125048]
lea rax, [rsi - 0x10]
xor edx, edx
cmp rsi, rcx
setne dl
cmovne rcx, rax
mov qword [rbp - 0x48], rdx
mov qword [rbp - 0x40], rcx
je 0x1400566e9
lock dec qword [rax]
jne 0x1400566e9
lea rcx, [rbp - 0x40]
call sym.alloc::sync::Arc_T_A_::drop_slow::hd13b688a3bae1643
nop
add rsp, 0x70
pop rbx
pop rdi
pop rsi
pop r14
pop rbp
ret
lea rcx, str.std_src_sys_thread_localkeywindows.rs
call sym.core::option::unwrap_failed::h3d6bb5ee813e802d
ud2