Function at 0x140051910
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x778]
sub rsp, 0x870
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140104508]
xor rax, rsp
mov qword [rbp + 0x760], rax
mov rsi, rcx
call fcn.140008640
xor ebx, ebx
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x48], rbx
mov r9d, 0x20019
lea r8, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x38]
call fcn.140013ed0
mov rdi, qword [rsp + 0x38]
test eax, eax
jne 0x140051c0b
mov dword [rsp + 0x30], 0x3ff
mov dword [rsp + 0x34], ebx
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, [0x1400d5b90]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140051a42
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140051a23
mov ecx, dword [rsp + 0x34]
test ecx, ecx
je 0x140051a06
cmp ecx, 2
jbe 0x140051a0d
cmp ecx, 7
jne 0x140051a06
test al, 1
jne 0x140051a06
mov ecx, eax
shr ecx, 1
cmp ecx, 1
jb 0x140051a06
mov edx, eax
shr rdx, 1
cmp word [rsp + rdx*2 + 0x5e], bx
jne 0x140051a06
cmp ecx, 1
jbe 0x140051a28
cmp word [rsp + rdx*2 + 0x5c], bx
je 0x140051a28
mov word [rsp + 0x60], bx
jmp 0x140051a42
test al, 1
jne 0x140051a06
shr rax, 1
cmp word [rsp + rax*2 + 0x5e], 0
je 0x140051a28
mov word [rsp + 0x60], bx
jmp 0x140051a42
mov word [rsp + 0x60], bx
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rsi
call fcn.140025070
mov dword [rsp + 0x30], 0x3ff
mov dword [rsp + 0x34], ebx
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.CurrentBuildNumber
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140051b1d
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140051ae0
mov ecx, dword [rsp + 0x34]
test ecx, ecx
je 0x140051ac3
cmp ecx, 2
jbe 0x140051aca
cmp ecx, 7
jne 0x140051ac3
test al, 1
jne 0x140051ac3
mov ecx, eax
shr ecx, 1
cmp ecx, 1
jb 0x140051ac3
mov edx, eax
shr rdx, 1
cmp word [rsp + rdx*2 + 0x5e], 0
jne 0x140051ac3
cmp ecx, 1
jbe 0x140051ae5
cmp word [rsp + rdx*2 + 0x5c], 0
je 0x140051ae5
mov word [rsp + 0x60], bx
jmp 0x140051b1d
test al, 1
jne 0x140051ac3
shr rax, 1
cmp word [rsp + rax*2 + 0x5e], 0
je 0x140051ae5
mov word [rsp + 0x60], bx
jmp 0x140051b1d
mov word [rsp + 0x60], bx
lea rcx, str._Build
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8, str._Build
mov edx, eax
mov rcx, rsi
call fcn.140025070
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rsi
call fcn.140025070
mov dword [rsp + 0x30], 0x3ff
mov dword [rsp + 0x34], ebx
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.CSDVersion
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140051bf8
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140051bbb
mov ecx, dword [rsp + 0x34]
test ecx, ecx
je 0x140051b9e
cmp ecx, 2
jbe 0x140051ba5
cmp ecx, 7
jne 0x140051b9e
test al, 1
jne 0x140051b9e
mov ecx, eax
shr ecx, 1
cmp ecx, 1
jb 0x140051b9e
mov edx, eax
shr rdx, 1
cmp word [rsp + rdx*2 + 0x5e], 0
jne 0x140051b9e
cmp ecx, 1
jbe 0x140051bc0
cmp word [rsp + rdx*2 + 0x5c], 0
je 0x140051bc0
mov word [rsp + 0x60], bx
jmp 0x140051bf8
test al, 1
jne 0x140051b9e
shr rax, 1
cmp word [rsp + rax*2 + 0x5e], 0
je 0x140051bc0
mov word [rsp + 0x60], bx
jmp 0x140051bf8
mov word [rsp + 0x60], bx
lea rcx, [0x1400d1558]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8, [0x1400d1558]
mov edx, eax
mov rcx, rsi
call fcn.140025070
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rsi
call fcn.140025070
test rdi, rdi
je 0x140051c10
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, rbx
jmp 0x140051c10
mov ebx, 1
test rdi, rdi
je 0x140051c1e
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 0x760]
xor rcx, rsp
call fcn.1400bf680
lea r11, [rsp + 0x870]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret