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

Disassembly:
mov rax, rsp
sub rsp, 0xa8
mov qword [rsp + 0x60], 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 qword [rax - 0x28], r15
mov rax, qword [0x00522be8]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rbp, rcx
mov eax, dword [rcx + 8]
test al, 2
jne 0x4753c7
test al, 0x20
jne 0x4753c7
xor eax, eax
jmp 0x4756ae
xor r12d, r12d
mov edi, r12d
call fcn.00475120
mov ebx, eax
mov dword [rsp + 0x38], 0xffffffff
mov rcx, qword [0x00527140]
mov rax, qword [rcx]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov esi, 2
mov edx, esi
call qword [rax + 0x20]
test eax, eax
jne 0x4756a0
lea r13d, [r12 + 1]
lea r15, vtable.h.0
lea r14, method.h.virtual_0
nop
nop
nop
nop
mov qword [rsp + 0x48], r12
mov eax, dword [0x00526114]
test al, 1
jne 0x475446
or eax, 1
mov dword [0x00526114], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x00526110], eax
jmp 0x47544c
mov eax, dword [0x00526110]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x475470
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov rdx, r13
mov ecx, dword [0x00526110]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x68]
lea rcx, str.SynCom.PointingDevice
call qword [sym.imp.ole32.dll_CLSIDFromProgID]
lea r11, [rsp + 0x48]
mov qword [rsp + 0x20], r11
lea r9, [0x004eae00]
xor edx, edx
lea r8d, [rdx + 0x15]
lea rcx, [rsp + 0x68]
call qword [sym.imp.ole32.dll_CoCreateInstance]
mov qword [rsp + 0x40], r15
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
mov edx, dword [rsp + 0x38]
call qword [rax + 0x78]
test eax, eax
jne 0x4755c0
mov dword [rsp + 0x50], r12d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x4754ef
mov rax, qword [rcx]
lea r8, [rsp + 0x50]
mov edx, 0x10000102
call qword [rax + 0x18]
cmp dword [rsp + 0x50], 1
je 0x4755c0
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x58], r12d
test rcx, rcx
je 0x475519
mov rax, qword [rcx]
lea r8, [rsp + 0x58]
mov edx, 0x10000102
call qword [rax + 0x18]
cmp dword [rsp + 0x58], 3
je 0x4755c0
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x30], r12d
test rcx, rcx
je 0x475543
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x10000102
call qword [rax + 0x18]
cmp dword [rsp + 0x30], 6
je 0x4755c0
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x30], r12d
test rcx, rcx
je 0x475569
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x10000107
call qword [rax + 0x18]
cmp dword [rsp + 0x30], 0xf
je 0x4755c0
mov rcx, qword [rsp + 0x48]
mov edx, r12d
mov dword [rsp + 0x30], r12d
test rcx, rcx
je 0x47558f
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 0x3000138
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x48]
mov edx, dword [rsp + 0x30]
mov eax, r12d
test edx, edx
setne al
test ebx, ebx
je 0x4755a7
test eax, eax
jne 0x4755a7
test byte [rbp + 8], 4
cmove edi, r13d
cmp ebx, eax
je 0x4755c5
mov rax, qword [rcx]
mov r8d, ebx
mov edx, 0x3000138
call qword [rax + 0x30]
mov rcx, qword [rsp + 0x48]
jmp 0x4755c5
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x40], r14
test rcx, rcx
je 0x4755d5
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [0x00527140]
mov rax, qword [rcx]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov edx, esi
call qword [rax + 0x20]
test eax, eax
je 0x475420
test edi, edi
je 0x4756a0
mov ebx, dword [0x0052712c]
and ebx, 1
lea rax, [rsp + 0x30]
mov qword [rsp + 0x58], rax
lea rcx, [0x00522a28]
mov rax, qword [0x00522a28]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rdx, [0x004e7dfc]
test rdx, 0xffffffffffff0000
jne 0x47565c
movzx edi, dx
xor edx, edx
mov ecx, edi
call fcn.00409680
test rax, rax
je 0x47567d
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.00417140
jmp 0x47567d
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x30]
call fcn.00416fd0
nop
test ebx, ebx
cmovne esi, r12d
lea r9, [rsp + 0x30]
mov r8d, 0xa
mov edx, esi
mov rcx, qword [0x00527158]
call fcn.0046aaa0
xor eax, eax
jmp 0x4756ae
mov rcx, qword [0x00527158]
call fcn.00469d10
xor eax, eax
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.004a7100
mov rbx, qword [rsp + 0xb8]
mov rbp, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0xc8]
mov rdi, qword [rsp + 0xa0]
mov r12, qword [rsp + 0x98]
mov r13, qword [rsp + 0x90]
mov r14, qword [rsp + 0x88]
mov r15, qword [rsp + 0x80]
add rsp, 0xa8
ret