Function at 0x1400be390
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 8], 0xfffffffffffffffe
mov qword [rsp + 0xd8], rbx
mov r13, r9
mov r15, r8
test rdx, rdx
jne 0x1400be409
mov edx, 0x16d
lea r8, str.c:userschunyung_source_repos_rtkngui_rtkngui_regclient.cpp
lea rcx, str._VCpl__RETURN_FALSE_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
nop
mov rdx, qword [r15]
sub rdx, 0x18
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400be402
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x1400be6d7
test r13, r13
jne 0x1400be415
mov edx, 0x16e
jmp 0x1400be3cf
xor esi, esi
mov qword [rbp - 0x20], rsi
mov dword [rbp - 0x18], esi
mov qword [rbp - 0x10], rsi
mov dword [rbp + 0x48], esi
xor eax, eax
mov qword [r9], rax
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], rax
mov r9d, dword [rbp + 0x60]
or r9d, 1
mov r8, rdx
mov rdx, 0xffffffff80000002
lea rcx, [rbp - 0x20]
call fcn.1400146e0
test eax, eax
je 0x1400be482
lea r8, str.c:userschunyung_source_repos_rtkngui_rtkngui_regclient.cpp
mov edx, Ordinal_380
lea rcx, str._VCpl__RETURN_FALSE_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
nop
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400be3e3
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400be3e3
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x48]
xor r8d, r8d
mov rdx, qword [r15]
mov r14, qword [rbp - 0x20]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x1400be4be
test r14, r14
je 0x1400be3e3
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400be3e3
mov eax, dword [rbp + 0x48]
sub eax, 1
je 0x1400be5bf
sub eax, 2
je 0x1400be529
cmp eax, 1
jne 0x1400be4a7
mov eax, 0x13
mov word [r13], ax
mov dword [rbp - 0x48], 4
lea rax, [r13 + 8]
lea rcx, [rbp - 0x48]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x44]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
jne 0x1400be6a0
mov edi, esi
mov r12d, SafeArrayDestroy
cmp dword [rbp - 0x44], 4
cmovne edi, r12d
jmp 0x1400be6a0
mov dword [rbp + 0x40], esi
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 0x40]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
jne 0x1400be563
mov edi, esi
mov r12d, SafeArrayDestroy
cmp dword [rbp - 0x40], 3
cmovne edi, r12d
mov dword [rbp - 0x2c], esi
mov eax, dword [rbp + 0x40]
mov dword [rbp - 0x30], eax
mov eax, 0x2011
mov word [r13], ax
mov ecx, 0x11
lea r8, [rbp - 0x30]
lea edx, [rcx - 0x10]
call qword [sym.imp.OLEAUT32.dll_SafeArrayDestroy]
mov qword [r13 + 8], rax
test rax, rax
je 0x1400be6a0
mov rax, qword [rax + 0x10]
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x28]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
jmp 0x1400be6a0
mov eax, 0x1f
mov word [r13], ax
mov dword [rbp - 0x50], esi
mov ebx, esi
mov dword [rbp + 0x40], ebx
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 0x3c]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov r12d, SafeArrayDestroy
test eax, eax
jne 0x1400be617
mov eax, dword [rbp - 0x3c]
dec eax
cmp eax, 1
jbe 0x1400be60d
mov edi, r12d
jmp 0x1400be617
mov ebx, dword [rbp - 0x50]
shr ebx, 1
mov dword [rbp + 0x40], ebx
mov edi, esi
add rbx, rbx
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov qword [r13 + 8], rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.1402841a0
mov rbx, qword [r13 + 8]
test rbx, rbx
je 0x1400be6a0
mov eax, dword [rbp + 0x40]
add eax, eax
mov dword [rbp - 0x4c], eax
lea rax, [rbp - 0x4c]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x38]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
jne 0x1400be6a0
mov eax, dword [rbp - 0x38]
dec eax
cmp eax, 1
jbe 0x1400be67b
mov edi, r12d
jmp 0x1400be6a0
test rbx, rbx
je 0x1400be69e
mov eax, dword [rbp - 0x4c]
test eax, eax
je 0x1400be69b
test al, 1
jne 0x1400be696
shr rax, 1
cmp word [rbx + rax*2 - 2], 0
je 0x1400be69e
mov edi, r12d
jmp 0x1400be6a0
mov word [rbx], si
mov edi, esi
test edi, edi
sete sil
test r14, r14
je 0x1400be6b5
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [r15]
sub rdx, 0x18
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400be6d5
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, esi
mov rbx, qword [rsp + 0xd8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret