Function at 0x140054af0
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x1402f8c60]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rdi, rcx
xor esi, esi
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x140054b27
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [rdi + 8], rsi
mov edx, 0x208
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140054dee
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x268], rbx
call fcn.140004550
lea r9, str.Powrprof.dll
lea r8, [rsp + 0x30]
lea rdx, str._s_s
lea rcx, [rsp + 0x20]
call fcn.1400056c0
mov rbx, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rdi + 8], rax
test rax, rax
je 0x140054dc7
lea rdx, str.PowerDuplicateScheme
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerDeleteScheme
mov qword [rdi + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadFriendlyName
mov qword [rdi + 0x18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadDescription
mov qword [rdi + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerWriteFriendlyName
mov qword [rdi + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerWriteDescription
mov qword [rdi + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerGetActiveScheme
mov qword [rdi + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerSetActiveScheme
mov qword [rdi + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerWriteACDefaultIndex
mov qword [rdi + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerWriteACValueIndex
mov qword [rdi + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerWriteDCDefaultIndex
mov qword [rdi + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerWriteDCValueIndex
mov qword [rdi + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadACDefaultIndex
mov qword [rdi + 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadACValueIndex
mov qword [rdi + 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadDCDefaultIndex
mov qword [rdi + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadDCValueIndex
mov qword [rdi + 0x80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadSettingAttributes
mov qword [rdi + 0x88], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerReadPossibleValue
mov qword [rdi + 0x90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerRegisterForEffectivePowerModeNotifications
mov qword [rdi + 0x98], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rdi + 8]
lea rdx, str.PowerUnregisterFromEffectivePowerModeNotifications
mov qword [rdi + 0xa0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [rdi + 0x10], rsi
mov qword [rdi + 0xa8], rax
je 0x140054dbd
cmp qword [rdi + 0x18], rsi
je 0x140054dbd
cmp qword [rdi + 0x20], rsi
je 0x140054dbd
cmp qword [rdi + 0x28], rsi
je 0x140054dbd
cmp qword [rdi + 0x30], rsi
je 0x140054dbd
cmp qword [rdi + 0x38], rsi
je 0x140054dbd
cmp qword [rdi + 0x40], rsi
je 0x140054dbd
cmp qword [rdi + 0x48], rsi
je 0x140054dbd
cmp qword [rdi + 0x50], rsi
je 0x140054dbd
cmp qword [rdi + 0x58], rsi
je 0x140054dbd
cmp qword [rdi + 0x60], rsi
je 0x140054dbd
cmp qword [rdi + 0x68], rsi
je 0x140054dbd
cmp qword [rdi + 0x70], rsi
je 0x140054dbd
cmp qword [rdi + 0x78], rsi
je 0x140054dbd
cmp qword [rdi + 0x80], rsi
je 0x140054dbd
cmp qword [rdi + 0x88], rsi
je 0x140054dbd
cmp qword [rdi + 0x90], rsi
je 0x140054dbd
cmp qword [rdi + 0x98], rsi
je 0x140054dbd
mov esi, 1
jmp 0x140054dc7
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rdx, [rbx - 0x18]
mov ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
mov rbx, qword [rsp + 0x268]
sub ecx, 1
jg 0x140054dec
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, esi
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140072680
mov rsi, qword [rsp + 0x270]
add rsp, 0x250
pop rdi
ret