Function at 0x10004875c
Capabilities:
Get thread local storage value

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x48
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov r12, rcx
xor r13d, r13d
mov rbx, r13
mov qword [rax + 0x20], rbx
mov qword [rax + 0x18], r13
mov qword [rax + 0x10], r13
mov qword [rax + 8], r13
call fcn.100048a78
lea rbp, [r12 + 0x168]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ATL.DLL_AtlComPtrAssign]
mov qword [rsp + 0x20], rbp
lea r9, str._D_3
xor edx, edx
lea r8d, [r13 + 3]
lea rcx, [0x1000afc98]
call qword [sym.imp.ole32.dll_CoCreateInstance]
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
lea rdx, [rsp + 0x98]
mov rcx, qword [r12 + 8]
call fcn.100042ae0
mov edi, eax
cmp eax, r13d
jl 0x1000489c0
mov rcx, qword [rsp + 0x90]
cmp rcx, r13
je 0x1000487ff
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsp + 0x90], r13
mov rbx, qword [rsp + 0x98]
mov rax, qword [rbx]
lea r8, [rsp + 0x90]
lea rdx, [0x1000afcb8]
mov rcx, rbx
call qword [rax]
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
lea rsi, [r12 + 0x68]
cmp qword [rsi], r13
jne 0x10004884e
mov rcx, rsi
call fcn.100048b0c
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
mov rdi, qword [rsi]
mov rcx, qword [rsp + 0x88]
cmp rcx, r13
je 0x10004886c
mov qword [rsp + 0x88], r13
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rax, qword [rdi]
lea r8, [rsp + 0x88]
lea rdx, [0x1000ba6e0]
mov rcx, rdi
call qword [rax]
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
mov rcx, qword [rsp + 0x88]
mov rax, qword [rcx]
mov r8, qword [rsp + 0x90]
mov rdx, r12
call qword [rax + 0x18]
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
mov rdi, qword [rbp]
mov rcx, qword [rsp + 0x80]
cmp rcx, r13
je 0x1000488d1
mov qword [rsp + 0x80], r13
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rax, qword [rdi]
lea r8, [rsp + 0x80]
lea rdx, [0x1000ba4b8]
mov rcx, rdi
call qword [rax]
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
mov rcx, qword [rsp + 0x80]
mov rax, qword [rcx]
lea rdx, [r12 + 0xb0]
call qword [rax + 0x18]
mov edi, eax
cmp eax, r13d
jl 0x1000489c8
mov ecx, dword [0x1000da5a0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
lea rcx, [rax + 0x50]
mov rdx, qword [r12 + 0xb8]
call fcn.100004ef0
cmp qword [r12 + 0xb0], r13
je 0x100048971
lea rcx, str.MicrosoftTabletPenServiceProperty
call qword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
movzx esi, ax
cmp ax, r13w
je 0x100048971
movzx edx, ax
mov r8d, 0x10000
mov rcx, qword [r12 + 0xb0]
call qword [sym.imp.USER32.dll_SetPropW]
movzx ecx, si
call qword [sym.imp.KERNEL32.dll_DeleteAtom]
mov rdx, qword [r12 + 0xb0]
mov rcx, qword [r12 + 8]
cmp rcx, r13
je 0x10004899e
movsxd rax, dword [0x1000da568]
cmp eax, r13d
jl 0x10004899e
cmp eax, 6
jae 0x10004899e
mov qword [rcx + rax*8 + 0xa8], rdx
jmp 0x1000489c8
call sub.KERNEL32.dll_GetLastError
cmp eax, r13d
je 0x1000489b9
movzx edi, ax
or edi, 0x80070000
cmp eax, r13d
cmovle edi, eax
jmp 0x1000489c8
mov edi, 0x80004005
jmp 0x1000489c8
mov rbx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
cmp rcx, r13
je 0x1000489eb
mov qword [rsp + 0x80], r13
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x80]
cmp rcx, r13
je 0x1000489f7
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x88]
cmp rcx, r13
je 0x100048a1a
mov qword [rsp + 0x88], r13
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x88]
cmp rcx, r13
je 0x100048a26
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x90]
cmp rcx, r13
je 0x100048a3a
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, rbx
cmp rbx, r13
je 0x100048a54
mov rbx, r13
mov qword [rsp + 0x98], rbx
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
cmp rbx, r13
je 0x100048a62
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
add rsp, 0x48
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret