Function at 0x14000bb20
Capabilities:
Check if file exists
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
lea rbp, [rax - 0xbe8]
sub rsp, 0xcd0
mov qword [rbp - 0x78], 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 + 0xbc0], rax
mov rbx, rcx
xor r13d, r13d
cmp qword [rcx], r13
je 0x14000bbcf
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.EPOWER_SERVICE_RESET_POWER_OPTION_:_BEGIN
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
mov word [rbp + 0x9b0], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x9b2]
call fcn.140152380
mov word [rbp + 0x7a0], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x7a2]
call fcn.140152380
mov r8d, 0x104
lea rdx, [rbp + 0x9b0]
lea rcx, str.PROGRAMDATA
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r9, [rbp + 0x9b0]
lea r8, str._sOEMPower_Management_SettingsoemPowerSetting.exe
mov edx, 0x104
lea rcx, [rbp + 0x7a0]
call fcn.14014e4f0
lea rcx, [rbp + 0x7a0]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov r12d, eax
cmp qword [rbx], r13
je 0x14000bcbe
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, [rbp + 0x7a0]
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
mov ecx, 0x10
call fcn.140014a14
mov rsi, rax
test rax, rax
je 0x14000bce3
mov rax, qword [rbx]
lea rcx, vtable.PwrPlan.0
mov qword [rsi], rcx
mov qword [rsi + 8], rax
jmp 0x14000bce6
mov rsi, r13
mov rcx, rsi
call fcn.1400088f0
test r12d, r12d
je 0x14000bdf7
cmp qword [rbx], r13
je 0x14000bd65
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.Found_and_Launch_oemPowerSetting.exe
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
mov r8, qword [rbx]
or edx, 0xffffffff
lea rcx, [rbp + 0x7a0]
call fcn.14000ed80
cmp eax, 1
je 0x14000c05b
cmp qword [rbx], r13
je 0x14000c05b
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.Launch_oemPowerSetting.exe_failed
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
jmp 0x14000c05b
mov eax, dword [rbx + 0x26c]
cmp eax, 1
jne 0x14000bfdc
cmp qword [rbx], r13
je 0x14000be74
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.Do_Internal_DTP_Power_Setting_Restore
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
mov rax, qword [0x1401ccc10]
mov qword [rbp - 0x70], rax
mov rax, qword [0x1401ccc18]
mov qword [rbp - 0x68], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x40]
lea rdx, [0x1401ccbd0]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerDuplicateScheme]
mov ecx, 1
call fcn.140008e70
mov rax, qword [0x1401ccc20]
mov qword [rbp - 0x70], rax
mov rax, qword [0x1401ccc28]
mov qword [rbp - 0x68], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x40]
lea rdx, [0x1401ccbf0]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerDuplicateScheme]
mov ecx, 2
call fcn.140008e70
call fcn.140009910
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x70], r13d
mov dword [rsp + 0x38], r13d
lea rax, [rsp + 0x40]
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 0x14000bfa2
mov dword [rsp + 0x38], 4
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, str.TurboEnable
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x14000bfa2
cmp dword [rsp + 0x70], 4
jne 0x14000bfa2
cmp dword [rsp + 0x38], 4
jne 0x14000bfa2
cmp dword [rsp + 0x30], 1
jne 0x14000bfa2
mov rax, qword [0x1401ccc10]
mov qword [rbp - 0x70], rax
mov rax, qword [0x1401ccc18]
jmp 0x14000bfb4
mov rax, qword [0x1401ccc20]
mov qword [rbp - 0x70], rax
mov rax, qword [0x1401ccc28]
mov qword [rbp - 0x68], rax
lea rdx, [rbp - 0x70]
xor ecx, ecx
call qword [sym.imp.POWRPROF.dll_PowerSetActiveScheme]
test rsi, rsi
je 0x14000c05b
mov rax, qword [rsi]
mov edx, 1
mov rcx, rsi
call qword [rax]
jmp 0x14000c05b
test eax, eax
jne 0x14000c05b
cmp qword [rbx], r13
je 0x14000c04e
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.Do_Internal_PTB_Power_Setting_Restore
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
call fcn.140001200
mov rcx, qword [rbx]
call fcn.140001bf0
xor r8d, r8d
lea rdx, [0x1401ccb68]
lea rcx, [rsp + 0x78]
call fcn.140001060
nop
mov dword [rsp + 0x30], 1
cmp dword [rbp - 0x80], 1
jne 0x14000c0ab
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.CurrentSysMode
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp qword [rbx], 0
je 0x14000c11b
mov word [rbp - 0x60], r13w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x5e]
call fcn.140152380
lea rdx, str.EPOWER_SERVICE_RESET_POWER_OPTION_:_END
lea rcx, [rbp - 0x60]
call fcn.140008860
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
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 + 0x48]
call fcn.140008390
lea rdx, [rsp + 0x48]
mov rcx, qword [rbx]
call fcn.140012c90
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14000c12b
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rbp + 0xbc0]
xor rcx, rsp
call fcn.14014e4d0
lea r11, [rsp + 0xcd0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rbp
ret