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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov rdi, qword [r8 + 8]
xor r15d, r15d
mov rsi, r8
mov qword [rsp + 0x40], rdi
mov rbx, rcx
mov ebp, r15d
mov r12d, r15d
mov r10d, dword [rdi + 0x28]
nop
cmp ebp, r10d
jge 0x180119c4f
mov rax, qword [rdi]
movsxd rcx, ebp
inc ebp
mov r12, qword [rax + rcx*8]
test r12, r12
je 0x180119c30
mov rax, r12
mov r12, qword [r12]
jmp 0x180119c52
mov rax, r15
test rax, rax
mov qword [rsp + 0x58], r13
lea r14, [rax - 0x18]
cmove r14, r15
test r14, r14
je 0x18011a035
nop dword [rax + rax]
mov ecx, dword [r14]
test cl, 3
jne 0x180119cec
mov rbx, qword [r14 + 8]
test rbx, rbx
je 0x180119ce4
mov edx, dword [rbx]
lea eax, [rdx - 1]
mov dword [rbx], eax
cmp edx, 1
jg 0x180119cd5
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x180119ca7
cmp qword [rax + 8], 0
je 0x180119ca7
mov rcx, rbx
call sym.tcl86t.dll_hclFreeObj
jmp 0x180119ccd
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180119cbe
cmp rcx, qword [0x18018f080]
je 0x180119cbe
call sym.tcl86t.dll_hclpFree
mov rcx, rbx
mov dword [rbx + 0x10], 0xffffffff
call fcn.1801063c0
mov r9d, dword [rsp + 0xb8]
mov ecx, dword [r14]
mov rdx, qword [rsp + 0xa8]
mov qword [r14 + 8], r15
mov rbx, qword [rsp + 0xa0]
or ecx, 8
mov dword [r14], ecx
test ecx, 0x870
je 0x180119f85
test cl, 0x40
je 0x180119d38
mov eax, dword [rsp + 0xc0]
btr ecx, 0xd
mov dword [rsp + 0x38], eax
mov r8, r14
mov rax, qword [r14 + 0x38]
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r9d
mov r9, rdx
mov dword [r14], ecx
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.18010b330
lea rcx, [rbx + 0x3f0]
mov rdx, r14
call qword [rbx + 0x430]
mov r13, rax
mov r15, qword [rax + 0x18]
test r15, r15
je 0x180119f45
nop dword [rax + rax]
lea rcx, [r15 + 0x18]
mov rsi, r15
mov r15, qword [rcx]
mov qword [rcx], 0
mov rcx, qword [0x18018ff58]
test rcx, rcx
jne 0x180119eee
cmp dword [0x1801905a8], ecx
jne 0x180119dba
lea rcx, [0x180190558]
mov dword [0x1801905a8], 1
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 [0x18018ff58], 0
jne 0x180119eda
mov ecx, 0x28
call sym.tcl86t.dll_hclpAlloc
mov rbx, rax
test rax, rax
je 0x18011a069
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rdi, qword [0x1801901f8]
xor r11d, r11d
mov qword [0x18018ff58], rbx
mov ecx, r11d
mov ebx, dword [0x1801901f0]
mov eax, r11d
test ebx, ebx
jle 0x180119e28
cmp qword [rdi + rax*8], r11
je 0x180119ff1
inc ecx
inc rax
cmp ecx, ebx
jl 0x180119e15
mov eax, dword [0x1801901f4]
cmp ebx, eax
jl 0x180119ec6
add eax, 8
mov dword [0x1801901f4], eax
lea ebx, [rax*8]
mov ecx, ebx
call sym.tcl86t.dll_hclpAlloc
mov rdi, rax
test rax, rax
jne 0x180119e5d
test ebx, ebx
jne 0x18011a05a
mov r8d, dword [0x1801901f0]
xor r11d, r11d
mov rdx, qword [0x1801901f8]
mov r9d, r11d
mov ebx, r11d
test r8d, r8d
jle 0x180119eac
mov ecx, r11d
mov r10, rdi
nop
mov rax, qword [rcx + rdx]
test rax, rax
je 0x180119ea0
mov qword [r10], rax
inc ebx
mov rdx, qword [0x1801901f8]
add r10, 8
mov r8d, dword [0x1801901f0]
inc r9d
add rcx, 8
cmp r9d, r8d
jl 0x180119e80
test rdx, rdx
je 0x180119eb9
mov rcx, rdx
call sym.tcl86t.dll_hclpFree
mov qword [0x1801901f8], rdi
mov dword [0x1801901f0], ebx
movsxd rax, ebx
lea rcx, [0x18018ff58]
mov qword [rdi + rax*8], rcx
inc dword [0x1801901f0]
lea rcx, [0x180190580]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [0x18018ff58]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x18018fecc]
xor ecx, ecx
mov rax, qword [0x18018ff68]
test edx, edx
jle 0x180119f1a
cmp qword [rax], rsi
je 0x18011a001
inc ecx
add rax, 0x18
cmp ecx, edx
jl 0x180119f07
mov rcx, qword [0x18018ff58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, rsi
call sym.tcl86t.dll_hclpFree
test r15, r15
jne 0x180119d60
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0xa0]
mov rcx, r13
call sym.tcl86t.dll_hcl_DeleteHashEntry
and dword [r14], 0xfffff78f
mov rax, qword [rbx + 0xb0]
mov ecx, dword [r14]
test rax, rax
je 0x180119f82
xor ebx, ebx
cmp qword [rax], r14
jne 0x180119f6e
mov qword [rax + 0x10], rbx
mov rax, qword [rax + 8]
test rax, rax
jne 0x180119f65
mov rbx, qword [rsp + 0xa0]
mov ecx, dword [r14]
xor r15d, r15d
and ecx, 0xfffffffc
mov qword [r14 + 8], r15
mov dword [r14], ecx
test cl, cl
jns 0x180119fa3
btr ecx, 7
mov dword [r14], ecx
test cl, 4
je 0x180119fa3
dec dword [r14 + 0x10]
test r12, r12
jne 0x180119fc5
mov edx, dword [rdi + 0x28]
nop dword [rax + rax]
cmp ebp, edx
jge 0x18011a028
mov rax, qword [rdi]
movsxd rcx, ebp
inc ebp
mov r12, qword [rax + rcx*8]
test r12, r12
je 0x180119fb0
mov rax, r12
mov r12, qword [r12]
test rax, rax
lea r14, [rax - 0x18]
cmove r14, r15
test r14, r14
je 0x18011a02d
mov r9d, dword [rsp + 0xb8]
mov rdx, qword [rsp + 0xa8]
jmp 0x180119c70
lea rcx, [0x18018ff58]
mov qword [rdi + rax*8], rcx
jmp 0x180119eda
cmp dword [rax + 0xc], 0
jne 0x18011a07b
mov dword [rax + 0xc], 1
mov qword [rax + 0x10], 3
mov rcx, qword [0x18018ff58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180119f2f
mov rax, r15
jmp 0x180119fcc
mov rsi, qword [rsp + 0xb0]
mov rcx, qword [rsi + 8]
call sym.tcl86t.dll_hcl_DeleteHashTable
mov rcx, qword [rsi + 8]
mov r13, qword [rsp + 0x58]
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp sym.tcl86t.dll_hclpFree
mov edx, ebx
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 0x28
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov rdx, rsi
lea rcx, str.Tcl_EventuallyFree_called_twice_for__p
call sym.tcl86t.dll_hcl_Panic
int3