Function at 0x140029c5c
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r14
sub rsp, 0x30
cmp byte [rcx + 8], 0
mov rdi, rcx
jne 0x140029e8c
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x140029e5e
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x140029c9a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rdi + 0x28], 0
lea r8, str.SoftwareMicrosoft
xor edx, edx
mov rcx, rdi
call fcn.140029980
mov ebx, eax
test eax, eax
jne 0x140029cdf
mov rdx, qword [rdi + 0x28]
lea r8, str.Speech
mov rcx, rdi
call fcn.140029980
mov ebx, eax
test eax, eax
jne 0x140029cdf
mov rdx, qword [rdi + 0x28]
lea r8, str.CurrentUserLexicon
mov rcx, rdi
call fcn.140029980
mov ebx, eax
test ebx, ebx
js 0x140029e5e
cmp ebx, 1
jne 0x140029d03
mov rcx, qword [rdi + 0x18]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [rdi + 8], 0
jne 0x140029e5e
test ebx, ebx
jne 0x140029c86
mov r9, qword [rdi + 0x18]
lea r14d, [rbx + 4]
mov rcx, qword [rdi + 0x28]
lea edx, [rbx + 1]
mov r8d, r14d
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_RegNotifyChangeKeyValue]
test eax, eax
jne 0x140029e5e
lea rsi, [rdi + 0x30]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rsi
lea rdx, str.SoftwareMicrosoftInputPersonalization
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140029e5e
mov rcx, qword [rsi]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rbx, [rdi + 0x38]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov dword [rsp + 0x50], r14d
lea rdx, str.Lexicon_Generation
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
test eax, eax
je 0x140029dbe
mov rcx, qword [rsi]
lea rdx, str.Lexicon_Generation
and dword [rbx], 0
mov r9d, r14d
mov dword [rsp + 0x28], r14d
xor r8d, r8d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140029e5e
mov rcx, qword [rdi + 0x28]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rdx, str.Generation
lea rax, [rsp + 0x58]
mov dword [rsp + 0x50], r14d
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_RegQueryValueExW]
test eax, eax
jne 0x140029e04
mov eax, dword [rbx]
cmp dword [rsp + 0x58], eax
je 0x140029e04
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rdi + 0x18]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140029e5e
cmp byte [rdi + 8], al
jne 0x140029e5e
mov r9, qword [rdi + 0x18]
mov r8d, r14d
mov rcx, qword [rdi + 0x28]
xor edx, edx
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_RegNotifyChangeKeyValue]
mov rcx, rdi
mov ebx, eax
call fcn.140029a20
test ebx, ebx
je 0x140029e04
mov r9, qword [rdi + 0x18]
mov r8d, r14d
mov rcx, qword [rdi + 0x28]
xor edx, edx
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_RegNotifyChangeKeyValue]
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x140029e72
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rdi + 0x28], 0
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x140029e86
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rdi + 0x30], 0
call qword [sym.imp.ole32.dll_CoUninitialize]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret