Function at 0x1800bcd30
Capabilities:
Get thread local storage value

Disassembly:
push rbp
sub rsp, 0x20
cmp dword [rcx + 0x40], 0
mov rbp, rcx
jne 0x1800bcf70
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rsi
mov rsi, qword [rcx + 0x30]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r14
xor r14d, r14d
test rsi, rsi
je 0x1800bcf19
mov edx, dword [rsi]
lea eax, [rdx - 1]
mov dword [rsi], eax
cmp edx, 1
jg 0x1800bcf15
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1800bcd92
cmp rcx, qword [0x18018f080]
je 0x1800bcd8e
call sym.tcl86t.dll_hclpFree
mov qword [rsi + 8], r14
mov rax, qword [rsi + 0x18]
mov dword [rsi + 0x10], 0xffffffff
test rax, rax
je 0x1800bce88
cmp qword [rax + 8], r14
je 0x1800bce88
mov rax, qword [0x1801902f8]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x18018fec0]
mov rdi, r14
test rax, rax
je 0x1800bcdde
test ecx, ecx
jle 0x1800bcdde
cmp ecx, dword [rax + 8]
jge 0x1800bcdde
mov rax, qword [rax]
mov rdi, qword [rax + rcx*8]
test rdi, rdi
jne 0x1800bce0f
lea ecx, [rdi + 0x10]
call sym.tcl86t.dll_hclpAlloc
mov rdi, rax
test rax, rax
je 0x1800bcf76
xor eax, eax
lea rcx, [0x18018fec0]
mov qword [rdi], rax
mov rdx, rdi
mov qword [rdi + 8], rax
call fcn.180106bc0
mov eax, dword [rdi]
test eax, eax
jle 0x1800bce23
mov rax, qword [rdi + 8]
mov qword [rsi + 8], rax
mov qword [rdi + 8], rsi
jmp 0x1800bce90
inc eax
mov rcx, rsi
mov dword [rdi], eax
mov rax, qword [rsi + 0x18]
call qword [rax + ioctlsocket]
dec dword [rdi]
mov rcx, rsi
call fcn.1801063c0
inc dword [rdi]
mov rbx, qword [rdi + 8]
mov eax, dword [rdi]
test rbx, rbx
je 0x1800bce82
nop dword [rax + rax]
mov rax, qword [rbx + 8]
mov qword [rdi + 8], rax
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x1800bce6f
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x1800bce6f
mov rcx, rbx
call rdx
mov rcx, rbx
call fcn.1801063c0
mov rbx, qword [rdi + 8]
test rbx, rbx
jne 0x1800bce50
mov eax, dword [rdi]
dec eax
mov dword [rdi], eax
jmp 0x1800bce90
mov rcx, rsi
call fcn.1801063c0
mov rax, qword [0x1801902f8]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
movsxd rcx, dword [0x18018ff28]
mov rbx, r14
test rax, rax
je 0x1800bcebe
test ecx, ecx
jle 0x1800bcebe
cmp ecx, dword [rax + 8]
jge 0x1800bcebe
mov rax, qword [rax]
mov rbx, qword [rax + rcx*8]
test rbx, rbx
jne 0x1800bceeb
lea ecx, [rbx + 8]
call sym.tcl86t.dll_hclpAlloc
mov rbx, rax
test rax, rax
je 0x1800bcf88
xor eax, eax
lea rcx, [0x18018ff28]
mov rdx, rbx
mov qword [rbx], rax
call fcn.180106bc0
mov rax, qword [rbx]
test rax, rax
je 0x1800bcf15
mov rdx, rsi
mov rcx, rax
call qword [rax + 0x40]
mov rbx, rax
test rax, rax
je 0x1800bcf15
mov rcx, qword [rax + 0x18]
call sym.tcl86t.dll_hclpFree
mov rcx, rbx
call sym.tcl86t.dll_hcl_DeleteHashEntry
mov qword [rbp + 0x30], r14
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x1800bcf37
mov edx, dword [rcx]
lea eax, [rdx - 1]
mov dword [rcx], eax
cmp edx, 1
jg 0x1800bcf33
call sym.tcl86t.dll_hclFreeObj
mov qword [rbp + 0x28], r14
mov rcx, qword [rbp + 0x20]
test rcx, rcx
je 0x1800bcf55
mov edx, dword [rcx]
lea eax, [rdx - 1]
mov dword [rcx], eax
cmp edx, 1
jg 0x1800bcf51
call sym.tcl86t.dll_hclFreeObj
mov qword [rbp + 0x20], r14
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
mov r14, qword [rsp + 0x48]
mov dword [rbp + 0x40], 1
add rsp, 0x20
pop rbp
ret
mov edx, reloc.WS2_32.dll_recv
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 8
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3