Function at 0x140165580
Capabilities:
Query or enumerate registry value

Disassembly:
push rsi
push rdi
push r12
push r13
push r14
mov eax, 0x30b0
call sub.ntdll.dll___chkstk
sub rsp, rax
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov qword [rsp + 0x30e0], rbx
mov qword [rsp + 0x30f8], rbp
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x30a0], rax
mov rbp, r8
mov rsi, rdx
mov rbx, qword [r8 + 0x10]
cmp qword [r8 + 8], rbx
jbe 0x1401655da
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rdi, qword [rbp + 8]
cmp rdi, qword [rbp + 0x10]
jbe 0x1401655ea
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
movabs r14, 0x6666666666666667
cmp rdi, rbx
je 0x140165668
mov r12, qword [rbp + 0x10]
mov rcx, r12
sub rcx, rbx
mov rax, r14
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rax, [rdx + rdx*4]
lea r13, [rdi + rax*8]
cmp rbx, r12
je 0x140165646
sub rdi, rbx
nop
nop
nop
lea rcx, [rdi + rbx]
mov rdx, rbx
call qword [reloc.MSVCP80.dll___4__basic_string__WU__char_traits__W_std__V__allocator__W_2__std__QEAAAEAV01_AEBV01__Z]
add rbx, 0x28
cmp rbx, r12
jne 0x140165630
mov rdi, qword [rbp + 0x10]
mov rbx, r13
cmp r13, rdi
je 0x140165664
mov rcx, rbx
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add rbx, 0x28
cmp rbx, rdi
jne 0x140165652
mov qword [rbp + 0x10], r13
mov rbx, qword [rsi + 0x10]
cmp qword [rsi + 8], rbx
jbe 0x140165678
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rdi, qword [rsi + 8]
cmp rdi, qword [rsi + 0x10]
jbe 0x140165688
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp rdi, rbx
je 0x1401656f8
mov r12, qword [rsi + 0x10]
mov rcx, r12
sub rcx, rbx
mov rax, r14
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rax, [rdx + rdx*4]
lea r13, [rdi + rax*8]
cmp rbx, r12
je 0x1401656d6
sub rdi, rbx
nop
nop
lea rcx, [rdi + rbx]
mov rdx, rbx
call qword [reloc.MSVCP80.dll___4__basic_string__WU__char_traits__W_std__V__allocator__W_2__std__QEAAAEAV01_AEBV01__Z]
add rbx, 0x28
cmp rbx, r12
jne 0x1401656c0
mov rdi, qword [rsi + 0x10]
mov rbx, r13
cmp r13, rdi
je 0x1401656f4
mov rcx, rbx
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add rbx, 0x28
cmp rbx, rdi
jne 0x1401656e2
mov qword [rsi + 0x10], r13
xor edi, edi
mov dword [rsp + 0x60], edi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x140c461a0]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x140165753
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x140165870
mov ebx, edi
cmp dword [rsp + 0x60], ebx
jbe 0x14016586e
nop
mov word [rsp + Ordinal_4265], 0
xor edx, edx
mov r8d, 0x1ffe
lea rcx, [rsp + 0x10a2]
call sub.ntdll.dll_memset
mov dword [rsp + 0x68], 0x2000
mov dword [rsp + 0x64], edi
mov byte [rsp + 0xa0], 0
xor edx, edx
mov r8d, 0xfff
lea rcx, [rsp + 0xa1]
call sub.ntdll.dll_memset
mov dword [rsp + 0x6c], 0x1000
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x64]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x10a0]
mov edx, ebx
mov rcx, qword [0x140c461a0]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x140165800
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140165861
cmp dword [rsp + 0x64], 1
jne 0x140165861
lea rdx, [rsp + 0x10a0]
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const____ptr64____ptr64]
nop
lea rdx, [rsp + 0x70]
mov rcx, rsi
call fcn.1400044f0
nop
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const____ptr64____ptr64]
nop
lea rdx, [rsp + 0x70]
mov rcx, rbp
call fcn.1400044f0
nop
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add ebx, 1
cmp ebx, dword [rsp + 0x60]
jb 0x140165760
mov al, 1
mov rcx, qword [rsp + 0x30a0]
xor rcx, rsp
call fcn.140161080
lea r11, [rsp + 0x30b0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret