Function at 0x1400505a0
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xad8]
sub rsp, 0xbb0
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1401bee90]
xor rax, rsp
mov qword [rbp + 0xaa0], rax
mov r13, rcx
mov qword [rbp - 0x78], rcx
xor r15d, r15d
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], r15d
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x70], r15
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9d, [r15 + 1]
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140050632
mov rsi, qword [rsp + 0x70]
jmp 0x14005066b
mov qword [rsp + 0x78], r15
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, [0x140150120]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140050cef
mov rsi, qword [rsp + 0x78]
mov qword [rsp + 0x50], rsi
mov dword [rsp + 0x58], r15d
mov word [rbp + 0x2a0], r15w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp + 0x2a2]
call fcn.1400d1cf0
lea rcx, [0x1401be9a8]
mov rax, qword [0x1401be9a8]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
lea r12, [0x140150118]
test r12, 0xffffffffffff0000
jne 0x1400506e6
movzx edi, r12w
mov ecx, edi
call fcn.1400019e0
test rax, rax
je 0x140050757
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.1400026e0
mov rbx, qword [rsp + 0x30]
jmp 0x140050757
mov r14d, dword [rbx - 0x10]
mov rdi, r12
sub rdi, rbx
sar rdi, 1
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 3
or eax, ecx
jge 0x140050719
mov edx, 3
lea rcx, [rsp + 0x30]
call fcn.1400024e0
mov rbx, qword [rsp + 0x30]
movsxd rdx, dword [rbx - 0xc]
mov r9d, 6
mov rcx, rbx
add rdx, rdx
cmp rdi, r14
ja 0x140050739
lea r8, [rbx + rdi*2]
call fcn.1400cd0d4
jmp 0x140050741
mov r8, r12
call fcn.1400cd294
cmp dword [rbx - 0xc], 3
jl 0x140050ce4
mov dword [rbx - 0x10], 3
mov word [rbx + 6], r15w
mov dword [rsp + 0x48], 0x800
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x2a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
xor r8d, r8d
lea rdx, [0x1401501e0]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
or r12, 0xffffffffffffffff
test eax, eax
jne 0x140050c2e
mov eax, dword [rsp + 0x68]
dec eax
cmp eax, 1
ja 0x140050c2e
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x1400507cb
test al, 1
jne 0x140050c2e
shr rax, 1
cmp word [rbp + rax*2 + 0x29e], 0
je 0x1400507d3
jmp 0x140050c2e
mov word [rbp + 0x2a0], r15w
mov ecx, dword [0x1401c6d80]
mov eax, ecx
imul eax, ecx
imul eax, ecx
and eax, 0x80000003
jge 0x1400507ef
dec eax
or eax, 0xfffffffc
inc eax
cmp eax, 2
jne 0x14005081a
lea ecx, [rax + 2]
call fcn.1400cd068
mov rdi, rax
call fcn.1400cd268
mov dword [rdi], eax
mov dword [0x1401c6d80], eax
mov rcx, rdi
call fcn.1400cc890
mov ecx, dword [0x1401c6d80]
lea rax, [rbp + 0x2a0]
mov rdi, r12
inc rdi
cmp word [rax + rdi*2], 0
jne 0x140050824
test edi, edi
jne 0x140050893
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140050921
cmp dword [rdx + 0x10], 0
jge 0x140050867
cmp dword [rbx - 0xc], 0
jge 0x14005085a
mov ecx, 0x80070057
call fcn.140001920
int3
mov dword [rbx - 0x10], r15d
mov word [rbx], r15w
jmp 0x14005091b
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140050877
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
mov rsi, qword [rsp + 0x50]
jmp 0x14005091b
mov r15d, dword [rbx - 0x10]
lea r14, [rbp + 0x2a0]
sub r14, rbx
sar r14, 1
test edi, edi
jns 0x1400508b3
mov ecx, 0x80070057
call fcn.140001920
int3
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x1400508d5
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.1400024e0
mov rbx, qword [rsp + 0x30]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r14, r15
lea r15, [rax + rax]
mov r9, r15
ja 0x1400508f9
lea r8, [rbx + r14*2]
call fcn.1400cd0d4
jmp 0x140050905
lea r8, [rbp + 0x2a0]
call fcn.1400cd294
cmp edi, dword [rbx - 0xc]
jg 0x140050c23
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r15 + rbx], ax
xor r15d, r15d
mov ecx, dword [0x1401c6d80]
lea edx, [rcx + 2]
lea eax, [rcx + 1]
imul edx, eax
imul edx, ecx
and edx, 0x8000000f
jge 0x14005093c
dec edx
or edx, 0xfffffff0
inc edx
cmp edx, 3
jne 0x140050972
mov edx, r15d
lea r8, [rbp - 0x60]
nop dword [rax + rax]
mov eax, dword [r8]
imul eax, eax, 0x8a
add ecx, eax
inc edx
lea r8, [r8 + 4]
movsxd rax, edx
cmp rax, 0x2f4
jb 0x140050950
mov dword [0x1401c6d80], ecx
lea rcx, [0x1401be9a8]
mov rax, qword [0x1401be9a8]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x38], rbx
lea r8, [0x14014e2c4]
test r8, 0xffffffffffff0000
jne 0x1400509c7
movzx edi, r8w
mov ecx, edi
call fcn.1400019e0
test rax, rax
je 0x140050a3b
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.1400026e0
mov rbx, qword [rsp + 0x38]
jmp 0x140050a3b
mov r14d, dword [rbx - 0x10]
mov rdi, r8
sub rdi, rbx
sar rdi, 1
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
dec eax
or eax, ecx
jge 0x140050a00
mov edx, 1
lea rcx, [rsp + 0x38]
call fcn.1400024e0
mov rbx, qword [rsp + 0x38]
lea r8, [0x14014e2c4]
movsxd rdx, dword [rbx - 0xc]
mov r9d, 2
mov rcx, rbx
add rdx, rdx
cmp rdi, r14
ja 0x140050a20
lea r8, [rbx + rdi*2]
call fcn.1400cd0d4
jmp 0x140050a25
call fcn.1400cd294
cmp dword [rbx - 0xc], 1
jl 0x140050c18
mov dword [rbx - 0x10], 1
mov word [rbx + 2], r15w
mov dword [rsp + 0x44], 0x800
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x2a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6c]
xor r8d, r8d
lea rdx, str.CurrentBuild
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140050bf8
mov eax, dword [rsp + 0x6c]
dec eax
cmp eax, 1
ja 0x140050bf8
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x140050aab
test al, 1
jne 0x140050bf8
shr rax, 1
cmp word [rbp + rax*2 + 0x29e], 0
je 0x140050ab3
jmp 0x140050bf8
mov word [rbp + 0x2a0], r15w
lea rax, [rbp + 0x2a0]
mov rdi, r12
nop dword [rax]
inc rdi
cmp word [rax + rdi*2], 0
jne 0x140050ac0
test edi, edi
jne 0x140050b27
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140050ba6
cmp dword [rdx + 0x10], 0
jge 0x140050b03
cmp dword [rbx - 0xc], 0
jge 0x140050af6
mov ecx, 0x80070057
call fcn.140001920
int3
mov dword [rbx - 0x10], r15d
mov word [rbx], r15w
jmp 0x140050ba6
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140050b13
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
jmp 0x140050ba6
mov r14d, dword [rbx - 0x10]
lea rsi, [rbp + 0x2a0]
sub rsi, rbx
sar rsi, 1
test edi, edi
jns 0x140050b47
mov ecx, 0x80070057
call fcn.140001920
int3
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140050b69
mov edx, edi
lea rcx, [rsp + 0x38]
call fcn.1400024e0
mov rbx, qword [rsp + 0x38]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp rsi, r14
lea r14, [rax + rax]
mov r9, r14
ja 0x140050b8d
lea r8, [rbx + rsi*2]
call fcn.1400cd0d4
jmp 0x140050b99
lea r8, [rbp + 0x2a0]
call fcn.1400cd294
cmp edi, dword [rbx - 0xc]
jg 0x140050bed
mov dword [rbx - 0x10], edi
mov word [r14 + rbx], r15w
lea r8, [rsp + 0x38]
lea rdx, [0x14014e2dc]
lea rcx, [rbp - 0x80]
call fcn.14001b6f0
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140010000
nop
mov rdx, qword [rbp - 0x80]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140050be6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x38]
jmp 0x140050bf8
mov ecx, 0x80070057
call fcn.140001920
nop
lea rdx, [rbx - 0x18]
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140050c0c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x30]
jmp 0x140050c2e
mov ecx, 0x80070057
call fcn.140001920
nop
mov ecx, 0x80070057
call fcn.140001920
int3
test rsi, rsi
je 0x140050c41
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], r15d
mov r9d, dword [0x1401c6d80]
mov r8d, r9d
imul r8d, r9d
mov eax, 0x2aaaaaab
imul r8d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea ecx, [rdx + rdx*2]
shl ecx, 3
sub r8d, ecx
cmp r8d, 2
jne 0x140050c9d
mov r8d, r15d
test r9d, r9d
je 0x140050c96
nop dword [rax]
mov ecx, r9d
and ecx, 1
add r8d, ecx
mov eax, r9d
cdq
sub eax, edx
sar eax, 1
mov r9d, eax
jne 0x140050c80
mov dword [0x1401c6d80], r8d
lea rcx, [rbx - 0x18]
call fcn.140002540
add rax, 0x18
mov qword [r13], rax
mov dword [rsp + 0x40], 1
lock add dword [rbx - 8], 0xffffffff
jg 0x140050ccd
mov rcx, qword [rbx - 0x18]
mov r8, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140050d06
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x50], r15
jmp 0x140050d06
mov ecx, 0x80070057
call fcn.140001920
nop
lea rdx, [0x140150110]
mov rcx, r13
call fcn.140002240
mov dword [rsp + 0x40], 1
mov rax, r13
mov dword [rsp + 0x58], r15d
mov rcx, qword [rbp + 0xaa0]
xor rcx, rsp
call fcn.1400cc8b0
lea r11, [rsp + 0xbb0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret