Function at 0x180144ea0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rax, qword [0x1801902f8]
mov r14, rcx
xor esi, esi
mov r15, r8
mov r12, rdx
mov edi, esi
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x1801905d8]
mov ebx, esi
test rax, rax
je 0x180144eeb
test ecx, ecx
jle 0x180144eeb
cmp ecx, dword [rax + 8]
jge 0x180144eeb
mov rax, qword [rax]
mov rbx, qword [rax + rcx*8]
test rbx, rbx
jne 0x180144f24
lea ecx, [rbx + 0x20]
call sym.tcl86t.dll_hclpAlloc
mov rbx, rax
test rax, rax
je 0x18014517d
xor eax, eax
lea rcx, [0x1801905d8]
mov qword [rbx], rax
mov rdx, rbx
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
call fcn.180106bc0
mov qword [rsp + 0x58], r13
mov r13d, 1
cmp dword [rbx + 0x18], esi
jne 0x180144fc3
cmp dword [0x1801905a8], esi
jne 0x180144f6e
lea rcx, [0x180190558]
mov dword [0x1801905a8], r13d
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x1801905b0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [rbx + 0x18], esi
jne 0x180144fa3
xor r9d, r9d
xor r8d, r8d
mov edx, r13d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 8], rsi
mov edi, r13d
mov qword [rbx], rax
mov qword [rbx + 0x10], rsi
mov dword [rbx + 0x18], r13d
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x180144fc3
mov rdx, rbx
lea rcx, [0x180145230]
call sym.tcl86t.dll_hcl_CreateThreadExitHandler
cmp qword [r14], rsi
jne 0x18014505a
cmp dword [0x1801905a8], esi
jne 0x180145002
lea rcx, [0x180190558]
mov dword [0x1801905a8], r13d
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x1801905b0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [r14], rsi
jne 0x18014504d
mov ecx, gethostname
call sym.tcl86t.dll_hclpAlloc
mov rdi, rax
test rax, rax
je 0x18014518f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [rdi + 0x28], rsi
lea rdx, [0x1801901d0]
mov qword [rdi + 0x30], rsi
mov rcx, r14
mov qword [r14], rdi
call fcn.180105860
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r12, qword [r12]
mov rdi, qword [r14]
mov qword [rsp + 0x50], rbp
test r15, r15
jne 0x180145072
mov ebp, 0xffffffff
jmp 0x180145090
mov eax, 0x10624dd3
imul dword [r15 + 4]
mov ebp, edx
sar ebp, 6
mov eax, ebp
shr eax, 0x1f
add ebp, eax
imul eax, dword [r15], 0x3e8
add ebp, eax
mov rcx, rdi
mov dword [rbx + 0x18], 2
mov qword [rbx + 8], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rdi + 0x30]
mov qword [rbx + 0x10], rax
mov qword [rdi + 0x30], rbx
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1801450bd
mov qword [rax + 8], rbx
cmp qword [rdi + 0x28], rsi
jne 0x1801450c7
mov qword [rdi + 0x28], rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [rbx + 0x18]
test al, 2
je 0x180145112
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbx]
mov r8d, r13d
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0x102
mov rcx, rdi
cmove esi, r13d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test esi, esi
je 0x1801450d0
mov eax, dword [rbx + 0x18]
jmp 0x180145116
test esi, esi
je 0x18014514f
test r13b, al
jne 0x18014514f
mov rcx, qword [rbx + 8]
cmp qword [rdi + 0x28], rbx
jne 0x18014512b
mov qword [rdi + 0x28], rcx
jmp 0x180145133
mov rax, qword [rbx + 0x10]
mov qword [rax + 8], rcx
mov rcx, qword [rbx + 0x10]
cmp qword [rdi + 0x30], rbx
jne 0x180145143
mov qword [rdi + 0x30], rcx
jmp 0x18014514b
mov rax, qword [rbx + 8]
mov qword [rax + 0x10], rcx
mov dword [rbx + 0x18], r13d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, r12
mov rbp, qword [rsp + 0x50]
mov r13, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rsi
jmp qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, 0x20
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, gethostname
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3