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

Disassembly:
mov r11, rsp
sub rsp, 0x88
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [r11 + 0x20], rbx
mov qword [r11 - 8], rsi
mov qword [r11 - 0x10], rdi
mov rax, qword [0x00507af8]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov edi, r8d
mov rsi, rdx
xor ebx, ebx
mov qword [r11 - 0x48], rbx
mov eax, dword [0x0050b024]
test al, 1
jne 0x411e3b
or eax, 1
mov dword [0x0050b024], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x0050b020], eax
jmp 0x411e41
mov eax, dword [0x0050b020]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x411e67
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov edx, 1
mov ecx, dword [0x0050b020]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x50]
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 + 0x50]
call qword [sym.imp.ole32.dll_CoCreateInstance]
lea r11, method.b.virtual_16
mov qword [rsp + 0x38], r11
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx]
mov edx, edi
call qword [rax + 0x78]
mov edi, ebx
mov dword [rsp + 0x34], ebx
mov rcx, qword [rsi + 0x58]
test rcx, rcx
je 0x411ed7
mov rax, qword [rcx]
lea r8, [rsp + 0x34]
mov edx, 0x10000102
call qword [rax + 0x18]
mov edi, dword [rsp + 0x34]
mov eax, ebx
mov dword [rsp + 0x30], ebx
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x411f00
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x10000102
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x30]
cmp edi, eax
je 0x411f22
lea rax, method.b.virtual_16
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x411f1b
mov rax, qword [rcx]
call qword [rax + 0x10]
xor eax, eax
jmp 0x41201b
mov edi, ebx
mov dword [rsp + 0x30], ebx
mov r9, qword [rsi + 0x58]
test r9, r9
je 0x411f4d
mov rax, qword [r9]
lea r8, [rsp + 0x30]
mov edx, 0x10000107
mov rcx, r9
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x40]
mov edi, dword [rsp + 0x30]
mov eax, ebx
mov dword [rsp + 0x34], ebx
test rcx, rcx
je 0x411f71
mov rax, qword [rcx]
lea r8, [rsp + 0x34]
mov edx, 0x10000107
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x34]
cmp edi, eax
je 0x411f93
lea rax, method.b.virtual_16
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x411f8c
mov rax, qword [rcx]
call qword [rax + 0x10]
xor eax, eax
jmp 0x41201b
mov edi, ebx
mov dword [rsp + 0x30], ebx
mov r9, qword [rsi + 0x58]
test r9, r9
je 0x411fbe
mov rax, qword [r9]
lea r8, [rsp + 0x30]
mov edx, 0x10000104
mov rcx, r9
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x40]
mov edi, dword [rsp + 0x30]
mov dword [rsp + 0x34], ebx
test rcx, rcx
je 0x411fe0
mov rax, qword [rcx]
lea r8, [rsp + 0x34]
mov edx, 0x10000104
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x40]
mov ebx, dword [rsp + 0x34]
cmp edi, ebx
je 0x411fff
lea rax, method.b.virtual_16
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x411ffb
mov rax, qword [rcx]
call qword [rax + 0x10]
xor eax, eax
jmp 0x41201b
lea rax, method.b.virtual_16
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x412016
mov rdx, qword [rcx]
call qword [rdx + 0x10]
mov eax, 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.004902e0
mov rbx, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x78]
add rsp, 0x88
ret