PopResetCurrentPolicies

NTSTATUS __stdcall PopResetCurrentPolicies(){
  NTSTATUS result; 
  int v1; 
  UINT64 v2; 
  UINT64 Length; 
  UINT64 ResultLength; 
  PVOID Handle; 
  _UNICODE_STRING DestinationString; 
  _DWORD KeyValueInformation[64]; 

  Handle = 0i64;
  LODWORD(ResultLength) = 0;
  DestinationString = 0i64;
  memset(KeyValueInformation, 0i64, 0xF8u);
  result = PopOpenPowerKey(&Handle);
  if( result >= 0 )
  {
    RtlInitUnicodeString(&DestinationString, L"SystemPowerPolicy");
    LODWORD(Length) = 248;
    v1 = ZwQueryValueKey(
           Handle,
           &DestinationString,
           KeyValuePartialInformation,
           KeyValueInformation,
           Length,
           &ResultLength);
    if( v1 < 0 )
    {
      PopDefaultPolicy((_SYSTEM_POWER_POLICY *)&KeyValueInformation[3]);
      v2 = 232i64;
    }
    else
    {
      v2 = (unsigned int)(ResultLength - 12);
    }
    LODWORD(ResultLength) = v2;
    PopApplyPolicy(0, 0, (_SYSTEM_POWER_POLICY *)&KeyValueInformation[3], v2);
    ZwClose((_HANDLE)Handle);
    return v1;
  }
  return result;
}

Referenced by:

PdcPoReportButton
PoInitSystem
PopBatteryAdd
PopBatteryRemove
PopBatteryUpdateCompositeInformation
PopChangeCapability
PopEnableHiberFile
PopThermalZoneAdd
PopThermalZoneRemove