Function at 0x18001ea60
Capabilities:
Allocate thread local storage
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
mov rbp, r9
mov r14, r8
mov rsi, rdx
mov rdi, rcx
test rdx, rdx
je 0x18001ec5b
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], r15
test rcx, rcx
je 0x18001eab9
mov rcx, qword [rcx + 0x4a0]
mov r8d, dword [rcx + 0x18]
test r8d, r8d
je 0x18001eab9
mov rdx, qword [rcx + 0x10]
mov rax, qword [rdx + 0x20]
mov qword [rcx + 0x10], rax
lea eax, [r8 - 1]
mov dword [rcx + 0x18], eax
jmp 0x18001ec0c
cmp dword [0x1801905e4], 0
jne 0x18001eae3
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1801905ac], eax
mov dword [0x1801905e4], 1
cmp eax, 0xffffffff
je 0x18001ec68
jmp 0x18001eae9
mov eax, dword [0x1801905ac]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
jne 0x18001eb07
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18001ec75
test rbx, rbx
jne 0x18001eb14
call fcn.180105bb0
mov rbx, rax
mov ecx, dword [rbx + 0x18]
test ecx, ecx
jne 0x18001ebfa
mov rcx, qword [0x180190148]
call sym.tcl86t.dll_hcl_MutexLock
mov rdx, qword [0x18018f158]
mov r15d, 0x320
mov eax, dword [rdx + 0x18]
test eax, eax
jle 0x18001eb81
mov rcx, qword [rdx + 0x10]
cmp eax, r15d
mov r8, rcx
cmovg eax, r15d
add dword [rbx + 0x18], eax
sub dword [rdx + 0x18], eax
sub eax, 1
je 0x18001eb69
nop dword [rax + rax]
mov rcx, qword [rcx + 0x20]
sub eax, 1
jne 0x18001eb60
mov rax, qword [rcx + 0x20]
mov qword [rdx + 0x10], rax
mov rax, qword [rbx + 0x10]
mov qword [rbx + 0x20], rcx
mov qword [rcx + 0x20], rax
mov qword [rbx + 0x10], r8
mov rcx, qword [0x180190148]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [rbx + 0x18]
test ecx, ecx
jne 0x18001ebfa
mov dword [rbx + 0x18], r15d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov r8d, 0x9600
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r9, rax
test rax, rax
je 0x18001ec82
mov r8, qword [rbx + 0x10]
lea rdx, [r9 + 0x95f0]
add rax, 0x95d0
mov ecx, 0x31f
mov qword [rbx + 0x20], rax
nop dword [rax]
mov qword [rdx], r8
lea rdx, [rdx - 0x30]
mov r8, rax
sub rax, 0x30
sub ecx, 1
jns 0x18001ebe0
mov ecx, dword [rbx + 0x18]
mov qword [rbx + 0x10], r9
mov rdx, qword [rbx + 0x10]
mov rax, qword [rdx + 0x20]
mov qword [rbx + 0x10], rax
lea eax, [rcx - 1]
mov dword [rbx + 0x18], eax
mov rax, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x40]
mov r15, qword [rsp + 0x48]
mov qword [rdx], rsi
mov qword [rdx + 0x18], rax
mov rax, qword [rsp + 0x68]
mov qword [rdx + 0x10], rbp
mov rbp, qword [rsp + 0x50]
mov qword [rdx + 0x20], rax
mov qword [rdx + 8], r14
mov rax, qword [rdi + 0x1c0]
mov rcx, qword [rax + 0x20]
mov qword [rdx + 0x28], rcx
mov rax, qword [rdi + 0x1c0]
mov qword [rax + 0x20], rdx
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret
lea rcx, str.Adding_a_callback_without_an_objProc__
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.could_not_allocate_thread_local_storage
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.TlsGetValue_failed_from_TclpGetAllocCache
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, r15d
lea rcx, str.alloc:_could_not_allocate__d_new_objects
call sym.tcl86t.dll_hcl_Panic
int3