Function at 0x180020510
Capabilities:
Set thread local storage value

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x80
mov qword [rax - 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov rbx, rcx
xor r15d, r15d
mov dword [rax + 8], r15d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rbx + 0x90], eax
lea rcx, [rbx + 0x10]
call fcn.180016ea0
mov rcx, qword [rbx + 0x48]
mov rax, qword [rcx]
lea rdx, [rsp + 0xc0]
call qword [rax + 0x18]
nop
mov dword [rsp + 0xb0], 1
lea edx, [r15 + 9]
mov rcx, rax
call fcn.180019020
test eax, eax
jne 0x180020589
call fcn.18000b120
cmp eax, 6
jne 0x180020589
mov r14b, 1
jmp 0x18002058c
xor r14b, r14b
mov dword [rsp + 0xb0], r15d
lea rcx, [rsp + 0xc0]
call fcn.180018fe0
test r14b, r14b
je 0x1800205b0
mov ecx, 1
call fcn.18001c920
lea rcx, [rbx + 0x10]
call fcn.1800065d0
mov dword [rbx + 0x120], r15d
xor dil, dil
cmp qword [rbx + 0x118], 0
je 0x180020640
lea rcx, [rbx + 0x10]
call fcn.1800065d0
cmp byte [rbx + 0x125], dil
je 0x1800205f5
mov rax, qword [rbx + 0x118]
mov rcx, rax
call qword [rax + 0x18]
mov qword [rbx + 0x118], r15
jmp 0x180020617
mov rdi, qword [rbx + 0x118]
mov rcx, rdi
call fcn.18002b380
mov qword [rbx + 0x118], r15
mov rdx, rdi
mov rcx, qword [rbx + 0x48]
call fcn.180012bf0
lea rcx, [rbx + 0x10]
call fcn.1800065d0
lea rcx, [rbx + 0x10]
call fcn.180016bf0
mov rcx, rbx
call fcn.180020f00
movzx edi, al
test al, al
jne 0x180020a36
nop dword [rax]
mov dword [rsp + 0x48], r15d
mov qword [rsp + 0x58], r15
and byte [rbx + 0x127], 0xfd
mov rax, qword [rbx + 0x108]
test rax, rax
je 0x180020a5f
cmp byte [rbx + 0x126], 0
jne 0x180020695
mov rcx, qword [rbx + 0x108]
call fcn.18001e980
test al, al
je 0x180020695
lea rcx, [rbx + 0x10]
call fcn.1800065d0
mov rcx, qword [rbx + 0x48]
call fcn.18000fda0
lea rcx, [rbx + 0x10]
call fcn.1800065d0
movzx r9d, byte [rbx + 0x126]
mov r8, qword [rbx + 0x40]
mov rax, qword [rbx + 0x108]
mov dword [rsp + 0x20], 7
lea rdx, [rsp + 0x48]
lea rcx, [rax + 0x40]
call qword [rax + 0x68]
test al, al
je 0x18002088f
cmp byte [rbx + 0x126], 0
je 0x180020726
mov dword [rsp + 0x38], r15d
mov r9b, 1
mov r8d, 0xf
lea rdx, [rsp + 0x38]
mov rcx, qword [rbx + 0x108]
call fcn.18001dab0
test al, al
jne 0x18002071f
mov rdx, rbx
mov rcx, qword [rbx + 0x108]
call fcn.18001db40
test al, al
jne 0x18002071f
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x40]
mov rdx, rbx
mov rcx, qword [rbx + 0x108]
call fcn.18001db40
test al, al
je 0x180020703
mov byte [rbx + 0x126], 0
cmp dword [rbx + 0x120], 0
je 0x180020748
mov rax, qword [rbx + 0x108]
xor r8d, r8d
mov edx, dword [rax + 0xd4]
mov rcx, qword [rbx + 0x48]
call fcn.1800210a0
mov dword [rbx + 0x120], r15d
cmp dword [rsp + 0x48], 1
jne 0x1800207ef
mov rbp, qword [rsp + 0x58]
mov edi, dword [rbx + 0x30]
mov rcx, qword [rbx + 0x48]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
movzx ecx, byte [0x1800e257c]
cmp cl, 4
jb 0x180020787
mov ecx, dword [0x1800e2578]
test cl, 2
je 0x180020787
mov cl, 1
jmp 0x180020789
xor cl, cl
test cl, cl
je 0x18002079f
mov r9d, edi
mov r8d, eax
mov dl, 4
mov ecx, 6
call fcn.180017120
mov rdx, rbx
mov rcx, qword [rbx + 0x40]
call fcn.1800241f0
lea rcx, [rbx + 0x10]
call fcn.1800065d0
mov rcx, qword [rbx + 0x108]
mov qword [rbx + 0x108], r15
mov rdi, qword [rbx + 0x100]
mov eax, 1
xchg dword [rbx + 0x60], eax
mov r8, qword [rcx]
mov rdx, rbp
call qword [r8 + 0x20]
mov rax, qword [rdi]
xor r8d, r8d
mov rdx, rbp
mov rcx, rdi
call qword [rax + VariantCopy]
jmp 0x180020a2a
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.18002b2e0
mov rax, qword [rbx + 0x108]
inc dword [rax + 0xa4]
lea rcx, [rbx + 0x10]
call fcn.1800065d0
lea rcx, [rsp + 0x48]
call fcn.180028150
lea rcx, [rbx + 0x10]
call fcn.1800065d0
lea rcx, [rbx + 0x10]
call fcn.180016bf0
cmp byte [rbx + 0x126], 0
jne 0x180020887
mov rax, qword [rbx + 0x108]
cmp byte [rax + 0x101], 0
je 0x180020887
cmp dword [rbx + 0x120], 0
jbe 0x180020869
mov rax, qword [rbx + 0x108]
xor r8d, r8d
mov edx, dword [rax + 0xd4]
mov rcx, qword [rbx + 0x48]
call fcn.1800210a0
mov dword [rbx + 0x120], r15d
xor edx, edx
mov rcx, rbx
call fcn.180021a20
test al, al
je 0x180020a2a
jmp 0x180020a02
xor dil, dil
jmp 0x180020a2d
cmp byte [rbx + 0x126], 0
jne 0x1800208e8
mov rax, qword [rbx + 0x108]
cmp byte [rax + 0x101], 0
je 0x1800208e8
cmp dword [rbx + 0x120], 0
jbe 0x1800208ca
mov rax, qword [rbx + 0x108]
xor r8d, r8d
mov edx, dword [rax + 0xd4]
mov rcx, qword [rbx + 0x48]
call fcn.1800210a0
mov dword [rbx + 0x120], r15d
xor edx, edx
mov rcx, rbx
call fcn.180021a20
test al, al
je 0x180020a2a
jmp 0x180020a02
inc dword [rbx + 0x120]
mov eax, dword [rbx + 0x120]
cmp eax, 1
jne 0x180020918
mov rax, qword [rbx + 0x108]
mov r8b, 1
mov edx, dword [rax + 0xd4]
mov rcx, qword [rbx + 0x48]
call fcn.1800210a0
mov eax, dword [rbx + 0x120]
cmp eax, 0x100
jae 0x180020931
mov rcx, qword [rbx + 0x100]
mov rax, qword [rcx]
call qword [rax + 0x18]
jmp 0x1800209f7
jne 0x180020962
mov byte [rbx + 0x126], 1
mov rcx, qword [rbx + 0x108]
mov r8b, 1
mov edx, 2
call fcn.18001e480
mov rdx, rbx
mov rcx, qword [rbx + 0x108]
call fcn.18001db50
jmp 0x1800209f7
test byte [rbx + 0x127], 2
je 0x180020982
dec eax
mov dword [rbx + 0x120], eax
mov rcx, qword [rbx + 0x100]
mov rax, qword [rcx]
call qword [rax + 0x18]
jmp 0x1800209f7
mov dl, 1
mov rcx, qword [rbx + 0x48]
call fcn.180013d90
mov rdx, rbx
mov rcx, qword [rbx + 0x108]
call fcn.18001db40
test al, al
jne 0x1800209bc
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x40]
mov rdx, rbx
mov rcx, qword [rbx + 0x108]
call fcn.18001db40
test al, al
je 0x1800209a0
xor edx, edx
mov rcx, qword [rbx + 0x48]
call fcn.180013d90
mov byte [rbx + 0x126], 0
cmp dword [rbx + 0x120], 0
jbe 0x1800209f0
mov rax, qword [rbx + 0x108]
xor r8d, r8d
mov edx, dword [rax + 0xd4]
mov rcx, qword [rbx + 0x48]
call fcn.1800210a0
mov dword [rbx + 0x120], r15d
movzx eax, byte [rbx + 0x124]
test al, al
je 0x180020a2d
lea rcx, [rbx + 0x10]
call fcn.1800065d0
lea rcx, [rbx + 0x10]
call fcn.180016290
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.1800218a0
mov rcx, qword [rbx + 0x48]
call fcn.180010250
mov dil, 1
test dil, dil
je 0x180020640
test r14b, r14b
je 0x180020a40
call fcn.18001c940
lea rcx, [rbx + 0x10]
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop r15
pop r14
pop rdi
pop rsi
pop rbp
jmp fcn.180016390
lea rcx, [rbx + 0x10]
call fcn.1800065d0
lea rcx, [rsp + 0x60]
call fcn.1800086b0
lea rdx, [0x18003cfd8]
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll__CxxThrowException
int3