Function at 0x14001a840
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x14005b0e8]
xor rax, rsp
mov qword [rbp - 8], rax
xor r14d, r14d
lea rax, [rbp - 0x28]
mov rsi, rcx
mov qword [rbp - 0x28], r14
xor r8d, r8d
mov dword [rbp - 0x30], r14d
lea rdx, str.SYSTEMCurrentControlSetControlPowerUserPowerSchemes
mov qword [rsp + 0x20], rax
lea r9d, [r14 + 1]
mov rcx, 0xffffffff80000002
mov edi, r14d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001ab12
mov rcx, qword [rbp - 0x28]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x20]
xor r8d, r8d
mov qword [rsp + 0x20], r14
lea rdx, str.ActivePowerScheme
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14001ab12
mov eax, dword [rbp - 0x30]
test eax, eax
je 0x14001ab12
mov ecx, eax
call qword [sym.imp.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
je 0x14001ab12
mov rcx, qword [rbp - 0x28]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x20]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.ActivePowerScheme
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14001ab12
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rbp - 0x20], 1
mov eax, dword [rbp - 0x30]
mov dword [rbp - 0x1c], eax
jne 0x14001ab26
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rdi + rax*2], r14w
jne 0x14001a940
cmp rax, 0x24
jne 0x14001ab26
mov rcx, rdi
mov qword [rsp + 0x88], rbx
call fcn.140004890
mov r8, rax
lea rdx, str.Active_Power_Scheme
xor r9d, r9d
mov rcx, rsi
call fcn.1400118b0
xor edx, edx
mov word [rdi + 0x10], r14w
mov rcx, rdi
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov dword [rbp - 0x18], eax
lea rcx, [rdi + 0x12]
mov word [rdi + 0x1a], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov word [rbp - 0x14], ax
lea rcx, [rdi + 0x1c]
mov word [rdi + 0x24], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
lea rcx, [rdi + 0x44]
mov word [rbp - 0x12], ax
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 9], al
lea rcx, [rdi + 0x40]
mov word [rdi + 0x44], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 0xa], al
lea rcx, [rdi + 0x3c]
mov word [rdi + 0x40], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 0xb], al
lea rcx, [rdi + 0x38]
mov word [rdi + 0x3c], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 0xc], al
lea rcx, [rdi + 0x34]
mov word [rdi + 0x38], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 0xd], al
lea rcx, [rdi + 0x30]
mov word [rdi + 0x34], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 0xe], al
lea rcx, [rdi + 0x2a]
mov word [rdi + 0x2e], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
xor edx, edx
mov byte [rbp - 0xf], al
lea rcx, [rdi + 0x26]
mov word [rdi + 0x2a], r14w
lea r8d, [rdx + 0x10]
call qword [sym.imp.msvcrt.dll_wcstoul]
lea rcx, str.powrprof.dll
mov byte [rbp - 0x10], al
call qword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x14001ab08
lea rdx, str.PowerReadFriendlyName
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov rcx, qword [0x1417bba30]
lea rdx, [rbp - 0x1c]
add rcx, 0x250
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rcx
lea rdx, [rbp - 0x18]
xor ecx, ecx
mov dword [rbp - 0x1c], 0xfffe
xor r9d, r9d
xor r8d, r8d
call rax
test eax, eax
jne 0x14001aaff
mov rcx, qword [0x1417bba30]
add rcx, 0x250
call fcn.140004890
mov r8, rax
lea rdx, str.Active_Power_Scheme_Name
xor r9d, r9d
mov rcx, rsi
call fcn.1400118b0
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov rbx, qword [rsp + 0x88]
jmp 0x14001ab26
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x14001ab21
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
je 0x14001ab2f
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140029990
mov rsi, qword [rsp + 0x90]
add rsp, 0x60
pop r14
pop rdi
pop rbp
ret