Function at 0x140031610
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x140106b98]
xor rax, rsp
mov qword [rbp + 0x28], rax
mov rax, r8
mov rbx, rdx
mov r14, rcx
mov qword [rsp + 0x40], rdx
cmp qword [rcx + 0x28], 0
je 0x1400318ed
xor r15d, r15d
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r15w
mov qword [rbp - 0x58], r15
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r15w
lea r8, [rbp - 0x58]
lea rdx, [rbp - 0x38]
mov rcx, rax
call fcn.140031fa0
mov dword [rsp + 0x40], r15d
lea r8, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae r8, qword [rbp - 0x58]
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
lea r9d, [r15 + 2]
mov rcx, qword [r14 + 0x28]
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
je 0x1400316de
cmp eax, 0xea
jne 0x140031910
mov edi, dword [rsp + 0x40]
inc rdi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r15
cmp rdi, 2
jb 0x14003172a
lfence
and rdi, 0xfffffffffffffffe
mov rcx, rdi
call fcn.1400034f0
mov qword [rsp + 0x48], rax
lea rsi, [rdi + rax]
mov qword [rsp + 0x58], rsi
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.14006d5a0
mov qword [rsp + 0x50], rsi
jmp 0x14003172f
mov rsi, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
sub rsi, rcx
sar rsi, 1
lea eax, [rsi + rsi]
mov dword [rsp + 0x40], eax
lea r8, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae r8, qword [rbp - 0x58]
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r15
mov r9d, 2
mov rcx, qword [r14 + 0x28]
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x140031933
mov edx, dword [rsp + 0x40]
shr rdx, 1
lea rcx, [rsp + 0x48]
call fcn.1400330c0
mov rcx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
cmp rcx, r8
je 0x1400317ba
lea rax, [r8 - 2]
cmp word [rax], 0
cmove r8, rax
mov qword [rsp + 0x50], r8
mov qword [rbx], r15
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 7
mov word [rbx], r15w
cmp rcx, r8
je 0x1400317e8
sub r8, rcx
sar r8, 1
mov rdx, rcx
mov rcx, rbx
call fcn.1400099f0
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140031834
mov rax, qword [rsp + 0x58]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031821
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140031976
call fcn.14006b8b4
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r15
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140031874
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003186f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003197c
call fcn.14006b8b4
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r15w
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x1400318c1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400318bc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400318e7
call fcn.14006b8b4
mov rax, rbx
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.14006b950
mov rbx, qword [rsp + 0x178]
add rsp, 0x130
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.14007ce08
int3
lea rdx, str.Registry_root_key_handle_is_null
lea rcx, [rsp + 0x60]
call fcn.1400207e0
lea rdx, [0x140103928]
lea rcx, [rsp + 0x60]
call fcn.14006db8c
nop
lea rdx, str.Failed_to_get_registry_value_size
lea rcx, [rsp + 0x78]
call fcn.1400207e0
lea rdx, [0x140103928]
lea rcx, [rsp + 0x78]
call fcn.14006db8c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x18]
call fcn.14001ec20
nop
mov r8, rax
lea rdx, str.Failed_to_read_registry_value__error
lea rcx, [rbp + 8]
call fcn.14001d1c0
nop
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.14001d890
lea rdx, [0x140103928]
lea rcx, [rbp - 0x70]
call fcn.14006db8c
nop
call fcn.14007ce08
nop
call fcn.14007ce08
int3