Function at 0x14000aef0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x7b8]
sub rsp, 0x8b0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140214eb8]
xor rax, rsp
mov qword [rbp + 0x7a0], rax
mov rbx, rcx
xor esi, esi
cmp dword [rcx + 0x26c], esi
jne 0x14000b26b
lea rdx, [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerGetActiveScheme]
xor r8d, r8d
lea rdx, [0x1401ccb68]
lea rcx, [rsp + 0x60]
call fcn.140001060
nop
cmp dword [rsp + 0x68], 1
jne 0x14000afb6
mov dword [rsp + 0x40], 4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.BrightnessAC
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14000afb6
mov r9d, dword [rsp + 0x30]
mov dword [rsp + 0x44], r9d
lea edx, [rsi + 0x15]
lea r8d, [rsi + 1]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.PowerSettingControl.dll_WritePowerSettingValueIndex]
lea r9, [rsp + 0x44]
mov edx, 0x15
lea r8d, [rdx - 0x14]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.PowerSettingControl.dll_ReadPowerSettingValueIndex]
mov ecx, dword [rsp + 0x44]
mov dword [rsp + 0x30], ecx
cmp dword [rsp + 0x68], 1
jne 0x14000b00b
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.BrightnessAC
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SOFTWAREOEMPower_Management
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000b1df
mov dword [rsp + 0x30], 4
mov dword [rsp + 0x40], esi
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.EnhanceFlag
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14000b1df
cmp dword [rsp + 0x40], 1
jne 0x14000b1df
lea rdx, [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerGetActiveScheme]
test eax, eax
jne 0x14000b1df
lea rax, [rbx + 0x25c]
mov qword [rsp + 0x20], rax
lea r9, [0x1401ccdb0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerReadACValueIndex]
lea rdx, [rbx + 0x260]
mov qword [rsp + 0x20], rdx
lea r9, [0x1401ccda0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerReadACValueIndex]
lea rdx, [rbx + 0x264]
mov qword [rsp + 0x20], rdx
lea r9, [0x1401ccdb0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerReadDCValueIndex]
lea rdx, [rbx + 0x268]
mov qword [rsp + 0x20], rdx
lea r9, [0x1401ccda0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerReadDCValueIndex]
mov dword [rsp + 0x20], 0x64
lea r9, [0x1401ccdb0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerWriteACValueIndex]
mov dword [rsp + 0x20], 0x64
lea r9, [0x1401ccda0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerWriteACValueIndex]
mov dword [rsp + 0x20], 0x64
lea r9, [0x1401ccdb0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerWriteDCValueIndex]
mov dword [rsp + 0x20], 0x64
lea r9, [0x1401ccda0]
lea r8, str.Q2ST
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerWriteDCValueIndex]
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerSetActiveScheme]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14000b1ef
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp qword [rbx], 0
je 0x14000b25b
mov word [rbp - 0x60], si
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.ePowerService::InitEnhanceFlag___:_SUCCEEDED
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rbp - 0x70], 7
mov qword [rbp - 0x78], rsi
mov word [rsp + 0x78], si
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp - 0x60]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x78]
call fcn.140008390
lea rdx, [rsp + 0x78]
mov rcx, qword [rbx]
call fcn.140012c90
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14000b26b
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [rsp + 0x50], 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
add rbx, 0x50
lea r9, [rsp + 0x50]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameW]
mov rcx, rbx
test eax, eax
je 0x14000b2c2
mov edx, 0x5c
call fcn.14014f40c
mov word [rax], si
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000b2d3
lea r8, [0x1401ccb68]
mov edx, 0x104
call fcn.14014e4f0
cmp dword [0x140222940], 0
jne 0x14000b322
mov dword [0x140223e04], 4
mov qword [0x140223e08], 0x41
mov qword [0x140223e14], rsi
lea rdx, [0x140223e00]
mov rcx, qword [0x140223de0]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov edi, eax
test eax, eax
jne 0x14000b327
lea rcx, [0x1401da678]
call fcn.140014380
mov eax, edi
jmp 0x14000b327
mov eax, 1
mov rcx, qword [rbp + 0x7a0]
xor rcx, rsp
call fcn.14014e4d0
lea r11, [rsp + 0x8b0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret