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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x730
xor edi, edi
mov r14, rcx
mov ebx, r8d
mov rsi, rdx
lea rcx, [rsp + 0xa1]
mov r8d, 0x81
xor edx, edx
mov r15, r9
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], rdi
mov byte [rsp + 0xa0], dil
call sub.msvcrt.dll_memset
lea r12d, [rbx - 9]
cmp r12d, 7
ja 0x1400058c4
cmp ebx, 0xd
je 0x1400058c4
lea edx, [rbx + 0x834]
lea rcx, [0x14002fed0]
call fcn.14001bf40
lea rdx, [rsp + 0xa0]
nop
movzx ecx, byte [rax]
add rdx, 1
add rax, 1
test cl, cl
mov byte [rdx - 1], cl
jne 0x1400058b0
jmp 0x1400058f2
lea rcx, [0x14002fed0]
mov edx, 0x834
call fcn.14001bf40
lea rdx, [rsp + 0xa0]
nop
movzx ecx, byte [rax]
add rdx, 1
add rax, 1
test cl, cl
mov byte [rdx - 1], cl
jne 0x1400058e0
mov eax, 4
mov r13d, 1
cmp ebx, 0xe
cmovge r13d, eax
lea rax, [rsp + 0x68]
lea rdx, str.ProductID
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea rcx, str.DigitalProductID
test eax, eax
lea rbp, [0x140027e59]
jne 0x1400059c1
lea rax, [rsp + 0x70]
mov rdx, rcx
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1400059b6
mov rax, qword [rsp + 0x70]
mov r8, qword [rsp + 0x68]
mov qword [rsp + 0x58], rbp
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], 2
lea rdx, [rsp + 0xa0]
mov r9, rbp
mov rcx, r14
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
call fcn.140004660
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x231]
xor edx, edx
mov r8d, 0xff
mov ebp, edi
mov byte [rsp + 0x230], dil
call sub.msvcrt.dll_memset
lea rax, [rsp + 0x80]
lea r9, [rsp + 0x770]
lea r8, [rsp + 0x230]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x770], 0xff
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x140005e02
nop
nop
lea rax, [rsp + 0x60]
lea rdx, [rsp + 0x230]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140005db5
lea rcx, [rsp + 0x131]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0x130], al
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x770]
lea r9, [rsp + 0x90]
lea rdx, [0x140029088]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x130]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x770], 0xff
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140005ad0
mov eax, dword [rsp + 0x770]
add eax, 0xffffffff
mov byte [rsp + rax + 0x130], 0
mov rax, qword [0x14002fec0]
cmp dword [rax + 0x5a0], 2
jne 0x140005bb0
cmp byte [rsp + 0x130], 0
jne 0x140005d04
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x770]
lea r9, [rsp + 0x88]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x130]
lea rdx, str.ConvertToEdition
xor r8d, r8d
mov dword [rsp + 0x770], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140005b4a
mov eax, dword [rsp + 0x770]
add eax, 0xffffffff
mov byte [rsp + rax + 0x130], 0
cmp byte [rsp + 0x130], 0
jne 0x140005d04
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x770]
lea r9, [rsp + 0x8c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x130]
lea rdx, str.ProductNameNonQualified
xor r8d, r8d
mov dword [rsp + 0x770], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140005bb0
mov eax, dword [rsp + 0x770]
add eax, 0xffffffff
mov byte [rsp + rax + 0x130], 0
cmp byte [rsp + 0x130], 0
jne 0x140005d04
lea rcx, [rsp + 0x331]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x330], 0
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x230]
lea rdx, str.MicrosoftWindowsCurrentVersionUninstall_s
lea rcx, [rsp + 0x330]
call sub.msvcrt.dll_sprintf
mov rcx, qword [r14 + 0x2a0]
lea rax, [rsp + 0x78]
lea rdx, [rsp + 0x330]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140005c86
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x770]
lea r9, [rsp + 0x94]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x130]
lea rdx, str.DisplayName
xor r8d, r8d
mov dword [rsp + 0x770], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140005c7b
mov eax, dword [rsp + 0x770]
add eax, 0xffffffff
mov byte [rsp + rax + 0x130], 0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [rsp + 0x130], 0
jne 0x140005d04
cmp r12d, 7
ja 0x140005cd4
cmp ebx, 0xd
je 0x140005cd4
lea edx, [rbx + 0x834]
lea rcx, [0x14002fed0]
call fcn.14001bf40
lea rdx, [rsp + 0xa0]
nop
nop
nop
movzx ecx, byte [rax]
add rdx, 1
add rax, 1
test cl, cl
mov byte [rdx - 1], cl
jne 0x140005cc0
jmp 0x140005d4e
lea rcx, [0x14002fed0]
mov edx, 0x834
call fcn.14001bf40
lea rdx, [rsp + 0xa0]
nop
movzx ecx, byte [rax]
add rdx, 1
add rax, 1
test cl, cl
mov byte [rdx - 1], cl
jne 0x140005cf0
jmp 0x140005d4e
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x130]
repne scasb al, byte [rdi]
mov eax, 0x7f
lea rdx, [rsp + 0x130]
not rcx
sub rcx, 1
cmp ecx, 0x80
cmovge ecx, eax
movsxd rdi, ecx
lea rcx, [rsp + 0xa0]
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov byte [rsp + rdi + 0xa0], 0
xor edi, edi
mov r8, qword [rsp + 0x60]
lea rax, [0x140027e59]
lea rcx, str.DigitalProductId4
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x50], r13d
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
lea rax, str.DigitalProductID
mov dword [rsp + 0x30], 2
mov qword [rsp + 0x28], rax
lea r9, str.ProductID
lea rdx, [rsp + 0xa0]
mov rcx, r14
mov qword [rsp + 0x20], r8
call fcn.140004660
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x80]
add ebp, 1
lea r9, [rsp + 0x770]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
lea r8, [rsp + 0x230]
mov edx, ebp
mov rcx, rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x770], 0xff
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x140005a30
lea r11, [rsp + 0x730]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret