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

Disassembly:
mov r11, rsp
sub rsp, 0xc8
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
mov qword [r11 - 8], rdi
mov qword [r11 - 0x10], r12
mov rax, qword [0x00507af8]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rbx, rcx
mov qword [r11 - 0x68], rcx
lea rax, [0x004d0e28]
mov qword [rcx], rax
lea rax, [0x004d38b0]
mov qword [rcx + 8], rax
add rcx, 0x28
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [rbx + 0x24], 1
xor r12d, r12d
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], r12
mov dword [rbx + 0x20], r12d
lea rdi, [rbx + 0x58]
mov qword [rdi], r12
mov eax, dword [0x0050b024]
test al, 1
jne 0x418c3d
or eax, 1
mov dword [0x0050b024], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x0050b020], eax
jmp 0x418c43
mov eax, dword [0x0050b020]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x418c69
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 + 0x70]
lea rcx, str.SynCom.PointingDevice
call qword [sym.imp.ole32.dll_CLSIDFromProgID]
mov qword [rsp + 0x20], rdi
lea r9, [0x004d3a90]
xor edx, edx
lea r8d, [rdx + 0x15]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ole32.dll_CoCreateInstance]
nop
lea rax, [0x004d3fc8]
mov qword [rbx], rax
lea rax, [0x004d3fb8]
mov qword [rbx + 8], rax
lea rax, [0x004d3fa8]
mov qword [rbx + 0x50], rax
lea rax, [0x004d3f98]
mov qword [rbx + 0x60], rax
mov qword [rbx + 0x6c8], r12
lea rcx, [rbx + 0x6d8]
lea rsi, [fcn.00401200]
mov qword [rsp + 0x20], rsi
lea r9, [0x004013e0]
mov edx, 8
lea r8d, [rdx - 6]
call fcn.00493540
nop
lea rdi, [rbx + 0x6f0]
mov qword [rdi], r12
mov eax, dword [0x0050b02c]
test al, 1
jne 0x418d1f
or eax, 1
mov dword [0x0050b02c], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x0050b028], eax
jmp 0x418d25
mov eax, dword [0x0050b028]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x418d4b
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov edx, 1
mov ecx, dword [0x0050b028]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x70]
lea rcx, str.SynCom.SynDisplay
call qword [sym.imp.ole32.dll_CLSIDFromProgID]
mov qword [rsp + 0x20], rdi
lea r9, [0x004d3aa0]
xor edx, edx
lea r8d, [rdx + 0x15]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ole32.dll_CoCreateInstance]
lea r11, method.b.virtual_16
mov qword [rbx + 0x6e8], r11
lea rdi, [rbx + 0x7d0]
mov qword [rsp + 0x20], rsi
lea r9, [0x004013e0]
mov edx, 8
lea r8d, [rdx - 6]
mov rcx, rdi
call fcn.00493540
nop
mov ebp, 5
mov dword [rbx + 0x6f8], ebp
mov dword [rbx + 0x730], r12d
mov dword [rbx + 0x734], 1
mov dword [rbx + 0x738], r12d
mov dword [rbx + 0x6fc], r12d
mov dword [rbx + 0x728], r12d
mov dword [rbx + 0x72c], r12d
mov dword [rbx + 0x700], r12d
mov dword [rbx + 0x704], r12d
mov dword [rbx + 0x794], 1
mov dword [rbx + 0x748], 4
mov dword [rbx + 0x74c], r12d
mov dword [rbx + 0x790], r12d
mov dword [rbx + 0x73c], 0x3a
mov qword [rbx + 0x740], r12
mov dword [rbx + 0x750], r12d
mov dword [rbx + 0x754], r12d
mov dword [rbx + 0x758], 0x10
mov dword [rbx + 0x75c], 0xf0
mov dword [rbx + 0x768], 0xa8
mov dword [rbx + 0x774], r12d
mov dword [rbx + 0x778], r12d
mov dword [rbx + 0x77c], r12d
mov dword [rbx + 0x780], 0x2000000
mov dword [rbx + 0x784], r12d
mov dword [rbx + 0x708], r12d
mov dword [rbx + 0x70c], r12d
mov dword [rbx + 0x710], r12d
mov dword [rbx + 0x788], r12d
mov dword [rbx + 0x79c], r12d
mov dword [rbx + 0x798], r12d
mov dword [rbx + 0x7a4], 0x7fffffff
mov dword [rbx + 0x7a0], 0x7fffffff
mov dword [rbx + 0x68], r12d
mov dword [rbx + 0x6c], r12d
mov word [rbx + 0x80], 0
mov dword [rbx + 0x78c], r12d
mov dword [rbx + 0x718], 0x1214
mov dword [rbx + 0x71c], 0x11
mov qword [rbx + 0x6d0], r12
mov qword [rbx + 0x288], r12
mov qword [rbx + 0x290], r12
mov qword [rbx + 0x298], r12
mov dword [rbx + 0x7f4], r12d
mov dword [rbx + 0x7f0], r12d
mov dword [rbx + 0x830], r12d
mov dword [rbx + 0x834], 1
mov dword [rbx + 0x838], r12d
mov esi, r12d
nop
nop
nop
mov qword [rsp + 0x70], r12
mov eax, dword [0x0050afc4]
test al, 1
jne 0x418f56
or eax, 1
mov dword [0x0050afc4], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x0050afc0], eax
jmp 0x418f5c
mov eax, dword [0x0050afc0]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x418f82
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov edx, 1
mov ecx, dword [0x0050afc0]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x80]
lea rcx, str.SynCom.SynPacket
call qword [sym.imp.ole32.dll_CLSIDFromProgID]
lea r11, [rsp + 0x70]
mov qword [rsp + 0x20], r11
lea r9, [0x004d0f38]
xor edx, edx
lea r8d, [rdx + 0x15]
lea rcx, [rsp + 0x80]
call qword [sym.imp.ole32.dll_CoCreateInstance]
nop
mov rcx, qword [rdi - 0xf8]
mov rax, qword [rcx]
mov rdx, qword [rsp + 0x70]
call qword [rax + 0x30]
mov rcx, qword [rdi - 0xf8]
mov rax, qword [rcx]
mov r8d, esi
mov edx, 0x10000317
call qword [rax + 0x20]
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x418ff5
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsp + 0x70], r12
mov eax, dword [0x0050afc4]
test al, 1
jne 0x41901b
or eax, 1
mov dword [0x0050afc4], eax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x0050afc0], eax
jmp 0x419021
mov eax, dword [0x0050afc0]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x419047
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov edx, 1
mov ecx, dword [0x0050afc0]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x90]
lea rcx, str.SynCom.SynPacket
call qword [sym.imp.ole32.dll_CLSIDFromProgID]
lea r11, [rsp + 0x70]
mov qword [rsp + 0x20], r11
lea r9, [0x004d0f38]
xor edx, edx
lea r8d, [rdx + 0x15]
lea rcx, [rsp + 0x90]
call qword [sym.imp.ole32.dll_CoCreateInstance]
nop
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, qword [rsp + 0x70]
call qword [rax + 0x30]
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov r8d, esi
mov edx, 0x10000317
call qword [rax + 0x20]
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x4190b2
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rdi + 0x10], r12
add esi, 1
add rdi, 8
cmp esi, 2
jl 0x418f30
mov qword [rbx + 0x7f8], r12
mov dword [rbx + 0x808], r12d
mov dword [rbx + 0x804], r12d
mov dword [rbx + 0x810], r12d
mov dword [rbx + 0x80c], r12d
mov dword [rbx + 0x814], r12d
mov dword [rbx + 0x800], r12d
mov dword [rbx + 0x818], r12d
mov dword [rbx + 0x81c], r12d
mov dword [rbx + 0x820], 0x186a0
mov dword [rbx + 0x824], 0x186a0
mov dword [rbx + 0x828], r12d
mov dword [rbx + 0x82c], 1
mov qword [rbx + 0x70], r12
mov dword [rbx + 0x83c], r12d
mov dword [rbx + 0x840], r12d
mov dword [rbx + 0x844], r12d
mov dword [rbx + 0x858], r12d
mov dword [rbx + 0x848], r12d
mov dword [rbx + 0x84c], 0xffffffff
mov dword [rbx + 0x850], r12d
lea rax, [rbx + 0x7ac]
nop
nop
mov dword [rax - 4], r12d
mov dword [rax], r12d
add rax, 8
sub rbp, 1
jne 0x419170
mov dword [rbx + 0x854], r12d
mov dword [rbx + 0x85c], r12d
mov dword [rbx + 0x860], r12d
mov dword [rbx + 0x864], 2
mov qword [rbx + 0x890], r12
mov qword [rbx + 0x898], r12
mov dword [rbx + 0x8a0], r12d
mov dword [rbx + 0x2a0], 0xffffffff
mov dword [rbx + 0x2a8], 0x2710
mov dword [rbx + 0x2ac], 0x1388
mov dword [rbx + 0x2a4], 0x19
mov dword [rbx + 0x2b0], r12d
mov dword [rbx + 0x2b4], r12d
mov dword [rbx + 0x6b8], 1
mov dword [rbx + 0x6bc], r12d
mov dword [rbx + 0x714], r12d
mov dword [rbx + 0x76c], 2
mov dword [rbx + 0x770], r12d
mov word [rbx + 0x2b8], bp
mov dword [rbx + 0xab4], r12d
mov qword [rbx + 0x868], r12
mov qword [rbx + 0x870], r12
mov qword [rbx + 0x878], r12
mov qword [rbx + 0x880], r12
mov dword [rbx + 0x888], r12d
mov dword [rbx + 0x88c], 0x3b6
mov qword [rbx + 0x78], r12
mov dword [rbx + 0xab8], r12d
mov dword [rbx + 0xac4], r12d
mov dword [rbx + 0xabc], r12d
mov dword [rbx + 0xac8], r12d
mov dword [rbx + 0xacc], r12d
lea rcx, [rsp + 0x38]
call fcn.00483ea0
nop
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, str.SoftwareSynapticsSynTPEnh
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x40]
call fcn.00488b60
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x70]
lea rdx, str.TreatAsTheaterPad
lea rcx, [rsp + 0x40]
call fcn.004883d0
mov r11d, r12d
cmp dword [rsp + 0x70], r12d
setne r11b
mov dword [rbx + 0x8a4], r11d
mov dword [rsp + 0x70], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x30]
lea rdx, str.FWLEDControlPad
lea rcx, [rsp + 0x40]
call fcn.004883d0
mov r11d, r12d
cmp dword [rsp + 0x30], r12d
setne r11b
mov dword [rbx + 0x8a8], r11d
mov dword [rbx + 0x8ac], r12d
mov dword [rsp + 0x70], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x30]
lea rdx, str.TPLightingEnabled
lea rcx, [rsp + 0x40]
call fcn.004883d0
mov eax, r12d
cmp dword [rsp + 0x30], r12d
setne al
mov dword [rbx + 0x6c0], eax
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, str.SoftwareSynapticsSynTPEnh
mov rdx, 0xffffffff80000001
lea rcx, [rsp + 0x40]
call fcn.00488b60
mov r11d, dword [rbx + 0x6c0]
mov dword [rsp + 0x70], r11d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x30]
lea rdx, str.TPLightingEnabled
lea rcx, [rsp + 0x40]
call fcn.004883d0
mov r11d, r12d
cmp dword [rsp + 0x30], r12d
setne r11b
mov dword [rbx + 0x6c0], r11d
mov dword [rbx + 0x8b0], r12d
mov word [rbx + 0x8b4], bp
mov word [rbx + 0x4b8], bp
lea rcx, [rsp + 0x38]
call fcn.004819e0
nop
mov rax, rbx
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.004902e0
mov rbx, qword [rsp + 0xd8]
mov rbp, qword [rsp + 0xe0]
mov rsi, qword [rsp + 0xe8]
mov rdi, qword [rsp + 0xc0]
mov r12, qword [rsp + 0xb8]
add rsp, 0xc8
ret