Function at 0x466bf0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
sub rsp, 0x98
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov qword [rax - 8], rdi
mov qword [rax - 0x10], r12
mov qword [rax - 0x18], r13
mov qword [rax - 0x20], r14
mov rax, qword [0x00507af8]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rsi, rcx
mov eax, dword [rcx + 8]
test al, 2
jne 0x466c43
test al, 0x20
jne 0x466c43
xor eax, eax
jmp 0x466e91
xor ebp, ebp
mov ebx, ebp
call fcn.004669a0
mov edi, eax
mov dword [rsp + 0x34], 0xffffffff
mov rcx, qword [0x0050bf50]
mov r10, qword [rcx]
lea r9, [rsp + 0x34]
xor r8d, r8d
lea edx, [rbp + 2]
call qword [r10 + SafeArrayAllocDescriptor]
test eax, eax
jne 0x466e83
lea r12d, [rbp + 1]
lea r14, method.b.virtual_16
lea r13, method.b.virtual_16
nop
nop
mov qword [rsp + 0x40], rbp
mov eax, dword [0x0050b024]
test al, 1
jne 0x466cb6
or eax, 1
mov dword [0x0050b024], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x0050b020], eax
jmp 0x466cbc
mov eax, dword [0x0050b020]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x466ce0
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov rdx, r12
mov ecx, dword [0x0050b020]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x58]
lea rcx, str.SynCom.PointingDevice
call qword [sym.imp.ole32.dll_CLSIDFromProgID]
lea r11, [rsp + 0x40]
mov qword [rsp + 0x20], r11
lea r9, [0x004d3a90]
xor edx, edx
lea r8d, [rdx + 0x15]
lea rcx, [rsp + 0x58]
call qword [sym.imp.ole32.dll_CoCreateInstance]
mov qword [rsp + 0x38], r14
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx]
mov edx, dword [rsp + 0x34]
call qword [rax + 0x78]
test eax, eax
jne 0x466e25
mov dword [rsp + 0x48], ebp
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x466d5e
mov rax, qword [rcx]
lea r8, [rsp + 0x48]
mov edx, 0x10000102
call qword [rax + 0x18]
cmp dword [rsp + 0x48], 1
je 0x466e25
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x4c], ebp
test rcx, rcx
je 0x466d87
mov rax, qword [rcx]
lea r8, [rsp + 0x4c]
mov edx, 0x10000102
call qword [rax + 0x18]
cmp dword [rsp + 0x4c], 3
je 0x466e25
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x30], ebp
test rcx, rcx
je 0x466dac
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x10000102
call qword [rax + 0x18]
cmp dword [rsp + 0x30], 6
je 0x466e25
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x30], ebp
test rcx, rcx
je 0x466dd1
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x10000107
call qword [rax + 0x18]
cmp dword [rsp + 0x30], 0xf
je 0x466e25
mov rcx, qword [rsp + 0x40]
mov edx, ebp
mov dword [rsp + 0x30], ebp
test rcx, rcx
je 0x466df5
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x3000138
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x40]
mov edx, dword [rsp + 0x30]
mov eax, ebp
test edx, edx
setne al
test edi, edi
je 0x466e0c
test eax, eax
jne 0x466e0c
test byte [rsi + 8], 4
cmove ebx, r12d
cmp edi, eax
je 0x466e2a
mov rax, qword [rcx]
mov r8d, edi
mov edx, 0x3000138
call qword [rax + 0x30]
mov rcx, qword [rsp + 0x40]
jmp 0x466e2a
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x38], r13
test rcx, rcx
je 0x466e3a
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [0x0050bf50]
mov rax, qword [rcx]
lea r9, [rsp + 0x34]
xor r8d, r8d
lea edx, [r8 + 2]
call qword [rax + 0x20]
test eax, eax
je 0x466c90
test ebx, ebx
je 0x466e83
mov eax, dword [0x0050bf3c]
lea edx, [rax + rax]
not edx
and edx, 2
mov r8d, 0xa
mov rcx, qword [0x0050bf68]
call fcn.0045b6f0
xor eax, eax
jmp 0x466e91
mov rcx, qword [0x0050bf68]
call fcn.0045a590
xor eax, eax
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.004902e0
mov rbx, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xb8]
mov rdi, qword [rsp + 0x90]
mov r12, qword [rsp + 0x88]
mov r13, qword [rsp + 0x80]
mov r14, qword [rsp + 0x78]
add rsp, 0x98
ret