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

Disassembly:
push rsi
push rbx
sub rsp, 0x28
test edx, edx
jne 0x1400aaac0
test r8, r8
je 0x1400aaba0
add rsp, 0x28
pop rbx
pop rsi
ret
cmp edx, 1
je 0x1400aab70
cmp edx, 3
jne 0x1400aaab3
mov ecx, dword [0x14016c498]
cmp ecx, 0xffffffff
je 0x1400aaab3
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400aaab3
test byte [rax + 0x40], 0x30
je 0x1400aabd0
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
je 0x1400aab02
call sym._pthread_cleanup_dest.part.0
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1400aab27
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1400aab1f
call rsi
pxor xmm0, xmm0
movups xmmword [rbx + 0x28], xmm0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x1400aac98
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je case.default.0x1400aab66
mov ecx, dword [0x14016c498]
xor edx, edx
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rax, qword [0x1401bc148]
test rax, rax
je 0x1400aabbe
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call rax
mov qword [0x1401bc150], rax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [0x1401bc150]
test rcx, rcx
je 0x1400aaab3
mov rax, qword [0x1401bc140]
test rax, rax
je 0x1400aabbe
call rax
mov qword [0x1401bc150], 0
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x1400aac45
test rcx, rcx
je 0x1400aabe9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x1d8]
mov qword [rbx + 0x30], 0
mov dword [rbx + 0xbc], 1
test rcx, rcx
je 0x1400aac0c
call sym._pthread_cleanup_dest.part.0
test byte [rbx + 0x44], 4
je 0x1400aac7c
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x1400aab27
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
jmp 0x1400aab34
test rcx, rcx
je 0x1400aac7c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x30], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x1400aac98
mov qword [rbx + 0x68], 0xffffffffffffffff
jmp 0x1400aaab3
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
jmp 0x1400aac65
mov rcx, rbx
call sym.push_pthread_mem.part.0
jmp 0x1400aab58
call sym.replace_spin_keys.part.0
nop
nop
add dword [rsi], eax
jae 0x14037c70a
jo 0x14037c70c
and bl, byte [rdi]
add byte [rsi], al
inc byte [rcx]
add dword [rax], eax
add byte [rax], al
add al, 0
adc eax, dword [rdx]
cmp bl, byte [rdi + 0x1ab7504]
add bh, byte [rdx]
lahf
add byte [rcx], al
add byte [rax], cl
inc byte [rcx]
add dword [rax], eax
add byte [rax], al
or dword [rcx], eax
push rsp
add byte [rax], al
add byte [rax], al
add byte [rsi], al
push rdi
inc byte [rcx]
add dword [rax], eax
add byte [rax], al
add al, 0
or al, byte [rdx]
cmp bl, byte [rdi + 0x1a26c04]
add bh, byte [rdx]
lahf
add byte [rax], al
add byte [rax], al
add byte [rsi], al
push rdi
inc byte [rcx]
add dword [rax], eax
add byte [rax], al
add al, 0
or al, byte [rcx]
push rsp
add al, 0x6c
movabs byte [0xc308000000540101], al
inc byte [rcx]
add dword [rax], eax
add byte [rax], al
add bh, byte ss:[rdx]
lahf
add byte [rax], al
add byte [rax], cl
ret