Function at 0x1400858a0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x7e8]
sub rsp, 0x8d0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1403a8088]
xor rax, rsp
mov qword [rbp + 0x7c0], rax
mov rbx, rcx
xor edi, edi
mov r14d, edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
cmp dword [0x14045ebc8], edi
je 0x140085915
movzx ecx, word [0x14045e53c]
call fcn.140084710
test eax, eax
je 0x140085cb0
lea rdx, str.PESOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS_1_5_18Products
lea rsi, str.PESOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS_1_5_18Patches
jmp 0x140085923
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS_1_5_18Products
lea rsi, str.SOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS_1_5_18Patches
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffff80000002
mov r9d, 0x20019
mov r8d, 4
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140085cb0
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
mov r8d, 4
mov rdx, rsi
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov r9d, 0x104
lea r8, [rbp + 0x3a0]
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, 0x103
je 0x140085cab
nop dword [rax]
inc r14d
cmp dword [0x14045e968], 0
jne 0x140085cab
lea r9, [rbp + 0x3a0]
lea r8, str._sInstallProperties
mov edx, 0x104
lea rcx, [rbp + 0x190]
call fcn.14004ebd0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8d, [r9 + 3]
lea rdx, [rbp + 0x190]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140085ac5
mov dword [rsp + 0x70], 0x104
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x80]
call fcn.14027b2c0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.LocalPackage
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140085aba
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 8], rax
jne 0x140085a57
mov rcx, rbx
call fcn.140056660
mov rcx, qword [rbx + 8]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rcx
test rcx, rcx
je 0x140085ab5
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], rdi
cmp qword [rcx + 0x18], 8
jb 0x140085a82
mov rax, qword [rcx]
jmp 0x140085a85
mov rax, rcx
mov word [rax], di
cmp word [rbp - 0x80], 0
jne 0x140085a94
mov r8, rdi
jmp 0x140085aab
lea rax, [rbp - 0x80]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140085aa0
lea rdx, [rbp - 0x80]
call fcn.14004dd70
nop
add qword [rbx + 8], 0x20
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp qword [rsp + 0x50], 0
je 0x140085c85
lea r9, [rbp + 0x3a0]
lea r8, str._sPatches
mov edx, 0x104
lea rcx, [rbp + 0x190]
call fcn.14004ebd0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 9
lea r8d, [r9 - 5]
lea rdx, [rbp + 0x190]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140085c85
mov esi, edi
mov r9d, 0x104
lea r8, [rbp + 0x5b0]
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, 0x103
je 0x140085c7a
nop word [rax + rax]
inc esi
cmp dword [0x14045e968], 0
jne 0x140085c7a
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8d, [r9 + 3]
lea rdx, [rbp + 0x5b0]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140085c55
mov dword [rsp + 0x70], 0x104
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x80]
call fcn.14027b2c0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140331408]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140085c4a
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 8], rax
jne 0x140085be7
mov rcx, rbx
call fcn.140056660
mov rcx, qword [rbx + 8]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rcx
test rcx, rcx
je 0x140085c45
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], rdi
cmp qword [rcx + 0x18], 8
jb 0x140085c12
mov rax, qword [rcx]
jmp 0x140085c15
mov rax, rcx
mov word [rax], di
cmp word [rbp - 0x80], 0
jne 0x140085c24
mov r8, rdi
jmp 0x140085c3b
lea rax, [rbp - 0x80]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140085c30
lea rdx, [rbp - 0x80]
call fcn.14004dd70
nop
add qword [rbx + 8], 0x20
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r9d, 0x104
lea r8, [rbp + 0x5b0]
mov edx, esi
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, 0x103
jne 0x140085b50
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r9d, 0x104
lea r8, [rbp + 0x3a0]
mov edx, r14d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, 0x103
jne 0x1400859a0
mov edi, 1
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140085cc0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140085cd0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x14045ebc8], 0
je 0x140085d15
lea rdx, [0x14032daf8]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
lea rdx, [0x14032db10]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
lea rdx, [0x14032dbb8]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
mov eax, edi
mov rcx, qword [rbp + 0x7c0]
xor rcx, rsp
call fcn.14012a2b0
lea r11, [rsp + 0x8d0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret