Function at 0x1800a8130
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0x20
mov rax, qword [0x1801902f8]
mov rbp, rcx
mov r13d, r9d
mov r12, r8
mov r14, rdx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x18018fdf0]
xor ebx, ebx
mov esi, ebx
test rax, rax
je 0x1800a817c
test ecx, ecx
jle 0x1800a817c
cmp ecx, dword [rax + 8]
jge 0x1800a817c
mov rax, qword [rax]
mov rsi, qword [rax + rcx*8]
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], r15
test rsi, rsi
jne 0x1800a81d3
lea ecx, [rsi + 0x48]
call sym.tcl86t.dll_hclpAlloc
mov rsi, rax
test rax, rax
je 0x1800a861b
xor eax, eax
lea rcx, [0x18018fdf0]
mov qword [rsi], rax
mov rdx, rsi
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], rax
mov qword [rsi + 0x20], rax
mov qword [rsi + 0x28], rax
mov qword [rsi + 0x30], rax
mov qword [rsi + 0x38], rax
mov qword [rsi + 0x40], rax
call fcn.180106bc0
cmp qword [rbp + 0x10], rbx
je 0x1800a8592
test r13b, 2
je 0x1800a81ed
cmp qword [rbp + 0x18], rbx
je 0x1800a85a3
test r13b, 4
je 0x1800a81fd
cmp qword [rbp + 0x20], rbx
je 0x1800a85b4
cmp qword [rbp + 0x40], rbx
je 0x1800a85c5
cmp qword [rbp + 0x70], rbx
je 0x1800a8217
cmp qword [rbp + 0x28], rbx
je 0x1800a85d6
mov ecx, 0x40
call sym.tcl86t.dll_hclpAlloc
mov r15, rax
test rax, rax
je 0x1800a85e7
mov ecx, 0x100
call sym.tcl86t.dll_hclpAlloc
mov rdi, rax
test rax, rax
je 0x1800a85f9
mov qword [r15], rax
mov qword [r15 + 8], r12
mov qword [r15 + 0x10], rbp
test r14, r14
je 0x1800a82a2
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp byte [r14 + rax], bl
jne 0x1800a8260
inc eax
mov r12d, 7
cmp eax, r12d
cmovb eax, r12d
mov ecx, eax
call sym.tcl86t.dll_hcl_Alloc
mov rbp, rax
sub rax, r14
nop word [rax + rax]
movzx ecx, byte [r14]
mov byte [rax + r14], cl
lea r14, [r14 + 1]
test cl, cl
jne 0x1800a8290
jmp 0x1800a82be
mov r12d, 7
mov ecx, r12d
call sym.tcl86t.dll_hclpAlloc
mov rbp, rax
test rax, rax
je 0x1800a860b
mov byte [rax], bl
mov rax, qword [0x18018fb58]
lea r8, str.binary
mov qword [rdi], rbp
mov rcx, rbx
mov dword [rdi + 8], r13d
mov qword [rdi + 0x10], rbx
mov rdx, qword [rax]
nop dword [rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1800a82f5
cmp rcx, r12
jne 0x1800a82e0
jmp 0x1800a8300
xor ecx, ecx
call sym.tcl86t.dll_hcl_GetEncoding
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rbx
mov dword [rdi + 0x20], 1
mov qword [rdi + 0x28], rbx
mov qword [rdi + 0x30], 1
mov qword [rdi + 0x38], 3
mov qword [rdi + 0x40], rbx
mov dword [rdi + 0x48], ebx
mov qword [rdi + 0x50], rbx
mov qword [rdi + 0x60], rbx
mov qword [rdi + 0x68], rbx
mov qword [rdi + 0x70], rbx
mov qword [rdi + 0x78], rbx
mov qword [rdi + 0x80], rbx
mov qword [rdi + 0x88], rbx
mov qword [rdi + 0x90], rbx
mov dword [rdi + 0x98], ebx
mov qword [rdi + 0xa0], rbx
mov dword [rdi + 0xa8], 0x1000
mov qword [rdi + 0xb0], rbx
mov qword [rdi + 0xb8], rbx
mov qword [rdi + 0xc0], rbx
mov qword [rdi + 0x58], rbx
mov qword [rdi + 0xc8], r15
mov qword [rdi + 0xd0], r15
mov qword [r15 + 0x18], rbx
mov qword [r15 + 0x20], rbx
mov qword [r15 + 0x28], rbx
mov qword [r15 + 0x30], rbx
mov dword [r15 + 0x38], ebx
mov qword [rdi + 0xe8], rbx
mov qword [rdi + 0xf0], rbx
mov dword [rdi + 0xf8], ebx
mov qword [rdi + 0xd8], rbx
mov rax, qword [0x1801902f8]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x18018fdf0]
test rax, rax
je 0x1800a83e7
test ecx, ecx
jle 0x1800a83e7
cmp ecx, dword [rax + 8]
jge 0x1800a83e7
mov rax, qword [rax]
mov rbx, qword [rax + rcx*8]
test rbx, rbx
jne 0x1800a8434
lea ecx, [rbx + 0x48]
call sym.tcl86t.dll_hclpAlloc
mov rbx, rax
test rax, rax
je 0x1800a861b
xor eax, eax
lea rcx, [0x18018fdf0]
mov qword [rbx], rax
mov rdx, rbx
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x30], rax
mov qword [rbx + 0x38], rax
mov qword [rbx + 0x40], rax
call fcn.180106bc0
mov rdi, qword [r15]
cmp qword [rdi + 0xd8], 0
jne 0x1800a862d
mov rax, qword [rbx + 8]
mov qword [rdi + 0xd8], rax
mov qword [rbx + 8], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, eax
mov qword [rdi + 0xe0], rax
mov rcx, qword [r15 + 0x10]
mov rax, qword [rcx + 8]
sub rax, 4
cmp rax, 1
ja 0x1800a8486
mov rax, qword [rcx + 0x78]
test rax, rax
je 0x1800a8486
mov rcx, qword [r15 + 8]
xor edx, edx
call rax
cmp qword [rsi + 0x10], 0
jne 0x1800a84d0
cmp dword [rsi + 0x18], 1
jne 0x1800a84d0
mov eax, dword [str.stdin]
mov edx, 2
mov dword [rbp], eax
mov rcx, r15
movzx eax, word [0x180169ce8]
mov word [rbp + 4], ax
call sym.tcl86t.dll_hcl_SetStdChannel
mov rax, qword [r15]
mov rcx, qword [rax + 0xd0]
mov rax, qword [rcx]
cmp qword [rax], 0
je 0x1800a863a
jmp 0x1800a8570
cmp qword [rsi + 0x20], 0
jne 0x1800a8521
cmp dword [rsi + 0x28], 1
jne 0x1800a8521
mov eax, dword [str.stdout]
mov edx, 4
mov dword [rbp], eax
mov rcx, r15
movzx eax, word [0x180169cf0]
mov word [rbp + 4], ax
movzx eax, byte [0x180169cf2]
mov byte [rbp + 6], al
call sym.tcl86t.dll_hcl_SetStdChannel
mov rax, qword [r15]
mov rcx, qword [rax + 0xd0]
mov rax, qword [rcx]
cmp qword [rax], 0
je 0x1800a8647
jmp 0x1800a8570
cmp qword [rsi + 0x30], 0
jne 0x1800a8573
cmp dword [rsi + 0x38], 1
jne 0x1800a8573
mov eax, dword [str.stderr]
mov edx, 8
mov dword [rbp], eax
mov rcx, r15
movzx eax, word [0x180169cf8]
mov word [rbp + 4], ax
movzx eax, byte [0x180169cfa]
mov byte [rbp + 6], al
call sym.tcl86t.dll_hcl_SetStdChannel
mov rax, qword [r15]
mov rcx, qword [rax + 0xd0]
mov rax, qword [rcx]
cmp qword [rax], 0
je 0x1800a8654
inc dword [rax + 0x48]
mov rdi, qword [rsp + 0x50]
mov rax, r15
mov r15, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret
mov rdx, qword [rbp]
lea rcx, str.channel_type__s_must_define_closeProc
call sym.tcl86t.dll_hcl_Panic
int3
mov rdx, qword [rbp]
lea rcx, str.channel_type__s_must_define_inputProc_when_used_for_reader_channel
call sym.tcl86t.dll_hcl_Panic
int3
mov rdx, qword [rbp]
lea rcx, str.channel_type__s_must_define_outputProc_when_used_for_writer_channel
call sym.tcl86t.dll_hcl_Panic
int3
mov rdx, qword [rbp]
lea rcx, str.channel_type__s_must_define_watchProc
call sym.tcl86t.dll_hcl_Panic
int3
mov rdx, qword [rbp]
lea rcx, str.channel_type__s_must_define_seekProc_if_defining_wideSeekProc
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 0x40
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 0x100
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, r12d
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 0x48
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.SpliceChannel:_trying_to_add_channel_used_in_different_list
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.Tcl_RegisterChannel:_channel_without_name
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.Tcl_RegisterChannel:_channel_without_name
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.Tcl_RegisterChannel:_channel_without_name
call sym.tcl86t.dll_hcl_Panic
int3