Function at 0x14000d450
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push rbp
push rdi
push r12
lea rbp, [rsp - 0xf10]
mov eax, 0x1010
call fcn.1401539b0
sub rsp, rax
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x1038], rbx
mov qword [rsp + 0x1040], rsi
mov rax, qword [0x140214eb8]
xor rax, rsp
mov qword [rbp + 0xf00], rax
mov rbx, rcx
mov r8d, 1
lea rdx, str.Log
lea rcx, [rsp + 0x78]
call fcn.140001060
nop
xor r12d, r12d
cmp dword [rbp - 0x80], 1
jne 0x14000d6d5
mov dword [rsp + 0x48], 4
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1401d8bd0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14000d6d5
cmp dword [rsp + 0x40], 1
jne 0x14000d6d5
mov word [rbp + 0x4f0], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x4f2]
call fcn.140152380
lea rdx, [rbp + 0x4f0]
mov qword [rsp + 0x20], rdx
xor r9d, r9d
xor r8d, r8d
lea edx, [r12 + 0x23]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x14000d6d5
mov word [rbp + 0x1d0], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x1d2]
call fcn.140152380
mov word [rbp - 0x40], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp - 0x3e]
call fcn.140152380
lea r9, str.OEMPower_ManagementLog
lea r8, [rbp + 0x4f0]
lea rdx, str._s_s_
lea rcx, [rbp + 0x1d0]
call fcn.140008830
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x104
lea rax, [rbp + 0x3e0]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
lea r8, [rbp + 0x1d0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rcx, [rbp + 0x3e0]
call qword [sym.imp.dbghelp.dll_MakeSureDirectoryPathExists]
mov rax, qword [rbx + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x1d0]
lea r8, str._s_s.txt
mov edx, 0x104
lea rcx, [rbp - 0x40]
call fcn.14014e4f0
lea ecx, [r12 + 0x48]
call fcn.140014a14
mov rdi, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14000d62f
mov rdx, qword [rbx + 0x30]
lea rcx, [rsp + 0x50]
call fcn.1400081e0
mov rdx, rax
mov rcx, rdi
call fcn.140012af0
jmp 0x14000d632
mov rax, r12
mov qword [rbx], rax
mov ecx, 0x98
call fcn.140014a14
mov rsi, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14000d6c7
lea rax, [rbp - 0x78]
mov qword [rsp + 0x48], rax
mov qword [rbp - 0x60], 7
mov qword [rbp - 0x68], r12
mov word [rbp - 0x78], r12w
mov r8d, 0x14
lea rdx, str._d__t___s___e___m
lea rcx, [rbp - 0x78]
call fcn.140008390
nop
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r12
mov word [rsp + 0x50], r12w
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp - 0x40]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp - 0x40]
lea rcx, [rsp + 0x50]
call fcn.140008390
nop
lea r8, [rbp - 0x78]
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.140010240
jmp 0x14000d6ca
mov rax, r12
mov rdx, rax
mov rcx, qword [rbx]
call fcn.140012be0
cmp qword [rbx], 0
je 0x14000d754
mov word [rbp + 0x700], r12w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp + 0x702]
call fcn.140152380
lea rdx, str.ePowerService::InitLog___:_SUCCEEDED
lea rcx, [rbp + 0x700]
call fcn.140008860
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r12
mov word [rsp + 0x50], r12w
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x700]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0x700]
lea rcx, [rsp + 0x50]
call fcn.140008390
lea rdx, [rsp + 0x50]
mov rcx, qword [rbx]
call fcn.140012c90
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14000d764
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov rcx, qword [rbp + 0xf00]
xor rcx, rsp
call fcn.14014e4d0
lea r11, [rsp + 0x1010]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret