PopGetSettingValue

INT64 __stdcall PopGetSettingValue(const _GUID *Guid, PVOID OutputBuffer, UINT64 OutputBufferLength){
  int v3; 
  unsigned int ProcessSessionId; 
  LIST_ENTRY *PowerSettingConfiguration; 
  unsigned int v9; 
  v3 = OutputBufferLength;
  ExAcquireFastMutex(&PopSettingLock);
  ProcessSessionId = PsGetProcessSessionIdEx(*((_QWORD *)KeGetCurrentThread() + 23));
  PowerSettingConfiguration = PopFindPowerSettingConfiguration((GUID *)Guid, ProcessSessionId);
  if( PowerSettingConfiguration )
  {
    v9 = PopMarshalSettingValues(
           (INT64)PowerSettingConfiguration,
           (INT64)OutputBuffer + 4,
           (unsigned int)(v3 - 4),
           (UINT64 *)OutputBuffer);
    KeReleaseGuardedMutex(&PopSettingLock);
    return v9;
  }
  else
  {
    KeReleaseGuardedMutex(&PopSettingLock);
    return 3221225485i64;
  }
}

Referenced by:

NtPowerInformation