Function at 0x140005820
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x14007d150]
xor rax, rsp
mov qword [rbp + 0x38], rax
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], r8
xor r13d, r13d
mov dword [rsp + 0x34], r13d
mov qword [rcx], r13
mov qword [rcx + 0x10], r13
mov qword [rcx + 0x18], 7
mov word [rcx], r13w
mov dword [rsp + 0x34], 1
mov edx, 0x101
mov rcx, rsi
call fcn.1400064e0
mov r15, rax
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x1400058a2
mov rdx, qword [rdi]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r14d, eax
test eax, eax
jne 0x140005b48
cmp dword [rsp + 0x38], 1
jne 0x140005bdc
mov ecx, dword [rsp + 0x30]
shr rcx, 1
inc rcx
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140056cdc
mov r14, rax
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000590d
mov rdx, qword [rdi]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r12d, eax
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r12d, r12d
jne 0x140005ab0
mov ecx, dword [rsp + 0x30]
mov eax, ecx
shr rax, 1
cmp word [r14 + rax*2 - 2], r12w
jne 0x140005958
add ecx, 0xfffffffe
mov dword [rsp + 0x30], ecx
mov r8d, ecx
shr r8, 1
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], 7
mov rdx, r14
lea rcx, [rsp + 0x58]
call fcn.140004cc0
lea rdx, [rsp + 0x58]
mov rcx, rbx
call fcn.140004be0
mov rdx, qword [rsp + 0x70]
cmp rdx, 8
jb 0x1400059d0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400059cb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400059cb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140056818
mov edx, 2
mov rcx, r14
call fcn.140056818
nop
mov rdx, qword [rsi + 0x18]
cmp rdx, 8
jb 0x140005a1d
mov rcx, qword [rsi]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140005a18
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140005aa2
mov rcx, r8
call fcn.140056818
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], 7
mov word [rsi], r13w
mov rdx, qword [rdi + 0x18]
cmp rdx, 8
jb 0x140005a68
lea rdx, [rdx*2 + 2]
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140005a63
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140005aa9
mov rcx, r8
call fcn.140056818
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], 7
mov word [rdi], r13w
mov rax, rbx
mov rcx, qword [rbp + 0x38]
xor rcx, rsp
call fcn.140056790
mov rbx, qword [rsp + 0x198]
add rsp, 0x140
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov edx, 2
mov rcx, r14
call fcn.140056818
mov edx, r12d
lea rcx, [rbp - 0x28]
call fcn.14000d2d0
mov rbx, rax
mov r8, rsi
lea rdx, str.Error_while_reading_registry_value
lea rcx, [rbp - 0x48]
call fcn.140004070
nop
lea r8, [0x140065720]
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140006b70
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140006c00
nop
lea r8, [0x140065718]
mov rdx, rax
lea rcx, [rbp + 0x18]
call fcn.140006b70
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.140006be0
nop
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.1400014f0
lea rdx, [0x140079988]
lea rcx, [rsp + 0x58]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, r14d
lea rcx, [rbp - 8]
call fcn.14000d2d0
mov rbx, rax
mov r8, rsi
lea rdx, str.Error_while_reading_registry_value
lea rcx, [rbp + 0x18]
call fcn.140004070
nop
lea r8, [0x140065720]
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140006b70
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140006c00
nop
lea r8, [0x140065718]
mov rdx, rax
lea rcx, [rbp - 0x48]
call fcn.140006b70
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp - 0x28]
call fcn.140006be0
nop
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.1400014f0
lea rdx, [0x140079988]
lea rcx, [rsp + 0x58]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r8, rsi
lea rdx, str.Registry_value
lea rcx, [rbp - 0x28]
call fcn.140004070
nop
lea r8, [0x140065720]
mov rdx, rax
lea rcx, [rbp - 0x48]
call fcn.140006b70
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140006c00
nop
lea r8, str._has_wrong_type
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140006b70
nop
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.1400014f0
lea rdx, [0x140079988]
lea rcx, [rsp + 0x58]
call sub.VCRUNTIME140.dll__CxxThrowException
int3