Function at 0x140021910
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x400]
sub rsp, 0x500
mov rax, qword [0x140061148]
xor rax, rsp
mov qword [rbp + 0x3f0], rax
mov rsi, r8
mov qword [rsp + 0x50], r8
xor ebx, ebx
cmp edx, 1
jne 0x14002195a
mov edi, 0x20219
jmp 0x140021967
mov edi, ebx
mov eax, 0x20119
cmp edx, 2
cmove edi, eax
mov r14d, ebx
lea rdx, str.SOFTWAREClassesInterface6A222195_F65E_467F_8F77_EB180BD85288TypeLib
lea rcx, [rbp - 0x50]
call qword [sym.imp.Cmmlib.dll_public:_void___cdecl_Cmm::CStringT_wchar_t_::constructor_wchar_t_const____ptr64____ptr64]
nop
lea rdx, str.Interface6A222195_F65E_467F_8F77_EB180BD85288TypeLib
lea rcx, [rbp - 0x78]
call qword [sym.imp.Cmmlib.dll_public:_void___cdecl_Cmm::CStringT_wchar_t_::constructor_wchar_t_const____ptr64____ptr64]
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x40], rbx
lea rcx, [rbp - 0x50]
call qword [sym.imp.Cmmlib.dll_public:_wchar_t_const____ptr64___cdecl_Cmm::CStringT_wchar_t_::c_str_void_const___ptr64]
mov r8, rax
mov r9d, edi
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x30]
call fcn.140016660
mov r15d, 1
test eax, eax
jne 0x140021a75
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp - 0x20]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x48], 0x410
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
xor r8d, r8d
lea rdx, [0x140045190]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021a75
mov eax, dword [rsp + 0x58]
dec eax
cmp eax, r15d
ja 0x140021a75
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x140021a42
test r15b, al
jne 0x140021a75
shr rax, 1
cmp word [rbp + rax*2 - 0x22], 0
je 0x140021a46
jmp 0x140021a75
mov word [rbp - 0x20], bx
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x60]
call qword [sym.imp.Cmmlib.dll_public:_void___cdecl_Cmm::CStringT_wchar_t_::constructor_wchar_t_const____ptr64____ptr64]
nop
mov rdx, rsi
lea rcx, [rsp + 0x60]
call qword [sym.imp.Cmmlib.dll_public:_int___cdecl_Cmm::CStringT_wchar_t_::Compare_class_Cmm::CStringT_wchar_t__const____ptr64_const___ptr64]
test eax, eax
cmove r14d, r15d
lea rcx, [rsp + 0x60]
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
lea rcx, [rbp - 0x78]
call qword [sym.imp.Cmmlib.dll_public:_wchar_t_const____ptr64___cdecl_Cmm::CStringT_wchar_t_::c_str_void_const___ptr64]
mov r8, rax
mov r9d, edi
mov rdx, 0xffffffff80000000
lea rcx, [rsp + 0x30]
call fcn.140016660
mov rdi, qword [rsp + 0x30]
test eax, eax
jne 0x140021b42
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp - 0x20]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x48], 0x410
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
xor r8d, r8d
lea rdx, [0x140045190]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021b42
mov eax, dword [rsp + 0x58]
dec eax
cmp eax, 1
ja 0x140021b42
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x140021b0f
test al, 1
jne 0x140021b42
shr rax, 1
cmp word [rbp + rax*2 - 0x22], 0
je 0x140021b13
jmp 0x140021b42
mov word [rbp - 0x20], bx
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x60]
call qword [sym.imp.Cmmlib.dll_public:_void___cdecl_Cmm::CStringT_wchar_t_::constructor_wchar_t_const____ptr64____ptr64]
nop
mov rdx, rsi
lea rcx, [rsp + 0x60]
call qword [sym.imp.Cmmlib.dll_public:_int___cdecl_Cmm::CStringT_wchar_t_::Compare_class_Cmm::CStringT_wchar_t__const____ptr64_const___ptr64]
test eax, eax
cmove ebx, r15d
lea rcx, [rsp + 0x60]
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
cmp r14d, 1
je 0x140021b7f
cmp ebx, 1
je 0x140021b7f
test rdi, rdi
je 0x140021b5c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rbp - 0x78]
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
nop
lea rcx, [rbp - 0x50]
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
nop
mov rcx, rsi
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
xor eax, eax
jmp 0x140021bb0
test rdi, rdi
je 0x140021b8e
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rbp - 0x78]
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
nop
lea rcx, [rbp - 0x50]
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
nop
mov rcx, rsi
call qword [sym.imp.Cmmlib.dll_public_virtual:_void___cdecl_Cmm::CStringT_wchar_t_::destructor_void____ptr64]
mov eax, r15d
mov rcx, qword [rbp + 0x3f0]
xor rcx, rsp
call fcn.1400325f0
lea r11, [rsp + 0x500]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret