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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp + 0x20], r8
mov qword [rbp - 8], 0
mov qword [rbp - 0x10], 0xffffffffffffffff
cmp dword [rbp + 0x18], 0
jne 0x14001cb2c
cmp qword [rbp + 0x20], 0
jne 0x14001cb22
mov rax, qword [0x140031e00]
test rax, rax
je 0x14001cb22
mov rax, qword [0x140031e00]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
call rax
mov qword [0x140031e00], 0
call sym.free_pthread_mem
jmp 0x14001cde6
cmp dword [rbp + 0x18], 1
jne 0x14001cb56
lea rax, [sym.SetThreadName_VEH]
mov rdx, rax
mov ecx, 1
mov rax, qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
call rax
mov qword [0x140031e00], rax
jmp 0x14001cde6
cmp dword [rbp + 0x18], 3
jne 0x14001cde6
mov eax, dword [0x1400274f0]
cmp eax, 0xffffffff
je 0x14001cb80
mov eax, dword [0x1400274f0]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x14001cc5d
mov rax, qword [rbp - 8]
movzx eax, byte [rax + 0x40]
and eax, 0x30
test al, al
je 0x14001cc5d
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x1d8]
mov rcx, rax
call sym._pthread_cleanup_dest
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
test rax, rax
je 0x14001cc0b
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x14001cbf3
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 8]
mov qword [rax + 0x30], 0
mov rax, qword [rbp - 8]
mov qword [rax + 0x28], 0
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_destroy
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 0x10]
mov rdx, rax
call sym.replace_spin_keys
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.push_pthread_mem
mov qword [rbp - 8], 0
mov eax, dword [0x1400274f0]
mov rdx, qword [rbp - 8]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
jmp 0x14001cde6
cmp qword [rbp - 8], 0
je 0x14001cd8e
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x14001cd8e
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x14001cc9b
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 8]
mov qword [rax + 0x30], 0
mov rax, qword [rbp - 8]
mov dword [rax + 0xbc], 1
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x1d8]
mov rcx, rax
call sym._pthread_cleanup_dest
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x44]
and eax, 4
test eax, eax
je 0x14001cd68
mov rax, qword [rbp - 8]
mov dword [rax], 0xdeadbeef
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
test rax, rax
je 0x14001cd05
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 8]
mov qword [rax + 0x28], 0
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_destroy
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 0x10]
mov rdx, rax
call sym.replace_spin_keys
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.push_pthread_mem
mov qword [rbp - 8], 0
mov eax, dword [0x1400274f0]
mov rdx, qword [rbp - 8]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
mov eax, 1
jmp 0x14001cdeb
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_destroy
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 0x10]
mov rdx, rax
call sym.replace_spin_keys
jmp 0x14001cde6
cmp qword [rbp - 8], 0
je 0x14001cde6
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x14001cdb6
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 8]
mov qword [rax + 0x30], 0
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_destroy
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 0x10]
mov rdx, rax
call sym.replace_spin_keys
mov eax, 1
add rsp, 0x30
pop rbp
ret