Function at 0x140165330
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
mov eax, 0x2080
call sub.ntdll.dll___chkstk
sub rsp, rax
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x20b0], rbx
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x2070], rax
mov rdi, r8
mov rbp, rdx
mov qword [rsp + 0x68], rdx
mov rbx, qword [r8 + 0x10]
cmp qword [r8 + 8], rbx
jbe 0x140165383
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rsi, qword [rdi + 8]
cmp rsi, qword [rdi + 0x10]
jbe 0x140165393
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp rsi, rbx
je 0x140165408
mov r12, qword [rdi + 0x10]
mov rcx, r12
sub rcx, rbx
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rax, [rdx + rdx*4]
lea r13, [rsi + rax*8]
cmp rbx, r12
je 0x1401653e6
sub rsi, rbx
nop
lea rcx, [rsi + 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 0x1401653d0
mov rsi, qword [rdi + 0x10]
mov rbx, r13
cmp r13, rsi
je 0x140165404
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, rsi
jne 0x1401653f2
mov qword [rdi + 0x10], r13
mov dword [rsp + 0x30], 7
mov word [rsp + 0x70], 0
xor edx, edx
mov r8d, 0x1ffe
lea rcx, [rsp + 0x72]
call sub.ntdll.dll_memset
mov dword [rsp + 0x34], 0x2000
cmp qword [rbp + 0x20], 8
jb 0x14016543e
mov rdx, qword [rbp + 8]
jmp 0x140165442
lea rdx, [rbp + 8]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rcx, qword [0x140c461a0]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x140165488
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, rbp
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]
xor al, al
jmp 0x140165516
cmp dword [rsp + 0x30], 7
je 0x14016549c
mov rcx, rbp
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]
xor al, al
jmp 0x140165516
lea rcx, [rsp + 0x40]
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_void____ptr64]
nop
xor ebx, ebx
nop
nop
test ebx, ebx
jne 0x1401654c6
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x40]
call qword [reloc.MSVCP80.dll___4__basic_string__WU__char_traits__W_std__V__allocator__W_2__std__QEAAAEAV01_PEB_W_Z]
jmp 0x1401654d8
mov eax, ebx
lea rdx, [rsp + rbx*2 + 0x70]
lea rcx, [rsp + 0x40]
call qword [reloc.MSVCP80.dll___4__basic_string__WU__char_traits__W_std__V__allocator__W_2__std__QEAAAEAV01_PEB_W_Z]
cmp qword [rsp + 0x58], 0
je 0x1401654ff
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.1400044f0
mov r11d, dword [rsp + 0x58]
lea ebx, [rbx + r11 + 1]
cmp ebx, 0xffe
jb 0x1401654b0
lea rcx, [rsp + 0x40]
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]
nop
mov rcx, rbp
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]
mov al, 1
mov rcx, qword [rsp + 0x2070]
xor rcx, rsp
call fcn.140161080
mov rbx, qword [rsp + 0x20b0]
add rsp, 0x2080
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret