Function at 0x180086dc0
Capabilities:
Allocate thread local storage
Get thread local storage value
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x18018f008]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
cmp dword [0x18018fdbc], 0
jne 0x180087021
cmp dword [0x18018fdb8], 0
mov qword [rsp + 0x1e0], rbx
jne 0x180086f1f
call fcn.180144d40
cmp dword [0x18018fdb8], 0
jne 0x180086f12
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x18008702e
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
cmp eax, 0xffffffff
je 0x18008703b
mov ecx, 0x202
mov qword [0x1801902f8], rbx
lea rdx, [rsp + 0x20]
mov dword [0x18018f818], 2
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea rcx, str.KERNEL32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.CancelSynchronousIo
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180190a70], rax
call fcn.1801045f0
call fcn.1800e2340
mov rax, qword [0x1801902f8]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x18018fdf0]
test rax, rax
je 0x180086ebc
test ecx, ecx
jle 0x180086ebc
cmp ecx, dword [rax + 8]
jge 0x180086ebc
mov rax, qword [rax]
cmp qword [rax + rcx*8], 0
jne 0x180086f03
mov ecx, 0x48
call sym.tcl86t.dll_hclpAlloc
test rax, rax
je 0x180087048
xor ecx, ecx
mov rdx, rax
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rcx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rcx
mov qword [rax + 0x38], rcx
mov qword [rax + 0x40], rcx
lea rcx, [0x18018fdf0]
call fcn.180106bc0
call fcn.18007acb0
mov dword [0x18018fdb8], 1
lea rcx, [0x1801905b0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x1d0], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [0x18018fea0]
mov edi, eax
call sym.tcl86t.dll_hcl_MutexLock
mov rax, qword [0x18018fea8]
test rax, rax
je 0x180086f63
nop word [rax + rax]
cmp qword [rax + 0x40], rdi
je 0x180086fec
mov rax, qword [rax + 0x58]
test rax, rax
jne 0x180086f50
mov rax, qword [0x1801902f8]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x18018feb0]
xor ebx, ebx
test rax, rax
je 0x180086f90
test ecx, ecx
jle 0x180086f90
cmp ecx, dword [rax + 8]
jge 0x180086f90
mov rax, qword [rax]
mov rbx, qword [rax + rcx*8]
test rbx, rbx
jne 0x180086fc6
lea ecx, [rbx + 0x60]
call sym.tcl86t.dll_hclpAlloc
mov rbx, rax
test rax, rax
je 0x18008705a
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x60]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
lea rcx, [0x18018feb0]
call fcn.180106bc0
mov qword [rbx + 0x40], rdi
call sym.tcl86t.dll_hcl_InitNotifier
mov qword [rbx + 0x48], rax
mov dword [rbx + 0x50], 1
mov rax, qword [0x18018fea8]
mov qword [rbx + 0x58], rax
mov qword [0x18018fea8], rbx
mov rcx, qword [0x18018fea0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, qword [rsp + 0x1d0]
mov rbx, qword [rsp + 0x1e0]
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.180146240
add rsp, 0x1d8
ret
lea rcx, str.TclInitSubsystems_called_while_exiting
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.unable_to_allocate_thread_key_
call sym.tcl86t.dll_hcl_Panic
int3
lea rcx, str.unable_to_allocate_thread_local_storage
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
mov edx, 0x60
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3