Function at 0x140046560
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov r14, rcx
movzx eax, byte [0x140061050]
test al, al
je 0x1400465da
call fcn.140046330
test rax, rax
je 0x1400465da
mov rbx, rax
mov rsi, qword [rax]
mov qword [rax], 0
test rsi, rsi
je 0x1400465da
lea rdi, [rsi + 0x10]
mov cl, 1
xor eax, eax
lock cmpxchg byte [rsi + 0x10], cl
jne 0x1400468c6
movabs r13, 0x8000000000000001
mov rax, qword [0x1400610e0]
add r13, 0xfffffffffffffffe
test rax, r13
je 0x140046621
call fcn.1400272f0
mov r15d, eax
xor r15b, 1
jmp 0x140046624
mov ecx, dword [0x140061130]
test ecx, ecx
je 0x1400466f2
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rsi, rax
test rax, rax
je 0x140046711
mov rax, qword [0x140061098]
cmp rsi, rax
jne 0x140046729
mov eax, dword [0x1400610a0]
cmp eax, 0xffffffff
je 0x1400468d3
inc eax
jmp 0x140046747
xor r15d, r15d
movzx eax, byte [rsi + 0x11]
lea rcx, [rsi + 0x18]
mov rdx, r14
call fcn.140046a10
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x140046696
mov qword [rbp], rdi
mov r14, rax
dec r14
mov r12, qword [rax - 1]
mov rdi, qword [rax + 7]
mov rax, qword [rdi]
test rax, rax
je 0x14004665d
mov rcx, r12
call rax
cmp qword [rdi + 8], 0
je 0x140046681
cmp qword [rdi + 0x10], 0x11
jb 0x140046670
mov r12, qword [r12 - 8]
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, r12
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, r14
call sub.KERNEL32.dll_HeapFree
mov rdi, qword [rbp]
test r15b, r15b
jne 0x1400466b4
mov rax, qword [0x1400610e0]
test rax, r13
je 0x1400466b4
call fcn.1400272f0
test al, al
jne 0x1400466b4
mov byte [rsi + 0x11], 1
xor eax, eax
xchg byte [rdi], al
cmp al, 2
jne 0x1400466c4
mov rcx, rdi
call fcn.14004a234
mov rcx, qword [rbx]
mov qword [rbx], rsi
test rcx, rcx
je 0x1400468a3
lock dec qword [rcx]
jne 0x1400468a3
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp fcn.140046410
lea rcx, [0x140061118]
call fcn.140020a10
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
mov rsi, rax
test rax, rax
jne 0x1400465fb
call fcn.140022e10
mov rsi, rax
mov rax, qword [0x140061098]
cmp rsi, rax
je 0x14004660b
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1400610a4], cl
jne 0x1400468b5
mov qword [0x140061098], rsi
mov eax, 1
mov dword [0x1400610a0], eax
lea rax, [0x140061098]
mov qword [rbp - 8], rax
lea rax, [rbp - 8]
mov qword [rbp - 0x18], rax
lea rsi, [rbp - 0x10]
mov qword [rbp - 0x10], 0
lea rdx, [0x140057a08]
lea rcx, [rbp - 0x18]
mov r8, r14
call fcn.140007270
mov rbx, qword [rbp - 0x10]
test al, al
je 0x1400467c4
test rbx, rbx
jne 0x14004681d
lea rax, str.a_formatting_trait_implementation_returned_an_error_when_the_underlying_stream_did_not
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], 1
mov qword [rbp - 0x38], 8
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
lea rdx, [0x1400585a8]
lea rcx, [rbp - 0x48]
call fcn.140006190
ud2
mov eax, ebx
and eax, 3
cmp eax, 1
jne 0x140046828
lea rsi, [rbx - 1]
mov rdi, qword [rbx - 1]
mov r14, qword [rbx + 7]
mov rax, qword [r14]
test rax, rax
je 0x1400467e7
mov rcx, rdi
call rax
cmp qword [r14 + 8], 0
je 0x14004680a
cmp qword [r14 + 0x10], 0x11
jb 0x1400467f9
mov rdi, qword [rdi - 8]
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, rdi
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x140061108]
xor ebx, ebx
xor edx, edx
mov r8, rsi
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [rbp - 8]
dec dword [rcx + 8]
jne 0x14004684c
jmp 0x140046833
xor ebx, ebx
mov rcx, qword [rbp - 8]
dec dword [rcx + 8]
jne 0x14004684c
mov qword [rcx], 0
xor eax, eax
xchg byte [rcx + 0xc], al
cmp al, 2
jne 0x14004684c
add rcx, 0xc
call fcn.14004a234
mov eax, ebx
and eax, 3
cmp eax, 1
jne 0x1400468a3
lea rsi, [rbx - 1]
mov rdi, qword [rbx - 1]
mov r14, qword [rbx + 7]
mov rax, qword [r14]
test rax, rax
je 0x14004686f
mov rcx, rdi
call rax
cmp qword [r14 + 8], 0
je 0x140046892
cmp qword [r14 + 0x10], 0x11
jb 0x140046881
mov rdi, qword [rdi - 8]
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, rdi
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, rsi
call sub.KERNEL32.dll_HeapFree
nop
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [0x1400610a4]
call fcn.140027240
jmp 0x14004673b
mov rcx, rdi
call fcn.140027240
jmp 0x1400465b2
lea rcx, str.lock_count_overflow_in_reentrant_mutexstd_src_sync_reentrant_lock.rs
lea r8, [0x1400588b8]
mov edx, 0x26
call fcn.140008980
mov rbx, rax
cmp qword [rdi + 8], 0
je 0x140046912
cmp qword [rdi + 0x10], 0x11
jb 0x140046901
mov r12, qword [r12 - 8]
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, r12
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x140061108]
xor edx, edx
mov r8, r14
call sub.KERNEL32.dll_HeapFree
jmp 0x1400469bb
mov rcx, qword [rbp]
mov edx, r15d
call fcn.140027340
lock dec qword [rsi]
jne 0x1400469d5
mov rcx, rsi
call fcn.140046410
mov rcx, rbx
call fcn.14004a850
call fcn.140008b91
mov rbx, rax
cmp qword [rbp - 0x10], 0
je 0x1400469f4
mov rcx, rsi
call fcn.140020d50
mov rcx, qword [rbp - 8]
call fcn.1400233f0
mov rcx, rbx
call fcn.14004a850
call fcn.140008b91
int3