PopPowerRequestInit

NTSTATUS __stdcall PopPowerRequestInit(){
  int v0; 
  _UNICODE_STRING DestinationString; 
  _OBJECT_TYPE_INITIALIZER ObjectTypeInitializer; 

  *(&stru_140C23628 + 734) = 0i64;
  *(&stru_140C23628 + 733) = 0i64;
  DestinationString = 0i64;
  *(&stru_140C23628 + 751) = 0i64;
  *(&stru_140C23628 + 703) = 0i64;
  *(&stru_140C23628 + 702) = 0i64;
  memset(&ObjectTypeInitializer, 0i64, sizeof(ObjectTypeInitializer));
  RtlInitUnicodeString(&DestinationString, L"PowerRequest");
  ObjectTypeInitializer._bf_0 |= 0x14u;
  ObjectTypeInitializer.CloseProcedure = (void(__fastcall *)(_EPROCESS *, void *, unsigned __int64, unsigned __int64))PopClosePowerRequestObject;
  ObjectTypeInitializer.Length = 120;
  ObjectTypeInitializer.DeleteProcedure = (void(__fastcall *)(void *))PopDeletePowerRequestObject;
  ObjectTypeInitializer.PoolType = NonPagedPoolNx;
  ObjectTypeInitializer.DefaultNonPagedPoolCharge = 152;
  ObjectTypeInitializer.InvalidAttributes = 402;
  ObjectTypeInitializer.GenericMapping = (_GENERIC_MAPPING)PopPowerRequestMapping;
  ObjectTypeInitializer.ValidAccessMask = 2031616;
  v0 = ObCreateObjectType(&DestinationString, &ObjectTypeInitializer, 0i64, &PopPowerRequestObjectType);
  if( v0 >= 0 )
  {
    *(&stru_140C23628 + 762) = 0i64;
    *(&stru_140C23628 + 761) = PopPowerRequestCallbackWorker;
    *(&stru_140C23628 + 759) = 0i64;
    *(&stru_140C23628 + 758) = (char *)&stru_140C23628 + 6056;
    *(&stru_140C23628 + 757) = (char *)&stru_140C23628 + 6056;
    *(&stru_140C23628 + 756) = (char *)&stru_140C23628 + 6040;
    *(&stru_140C23628 + 755) = (char *)&stru_140C23628 + 6040;
    *(&stru_140C23628 + 754) = (char *)&stru_140C23628 + 6024;
    *(&stru_140C23628 + 753) = (char *)&stru_140C23628 + 6024;
    RtlInitializeGenericTableAvl(
      (PRTL_AVL_TABLE)((char *)&stru_140C23628 + 5752),
      (PRTL_AVL_COMPARE_ROUTINE)PopPowerRequestCompare,
      (PRTL_AVL_ALLOCATE_ROUTINE)PopPowerRequestAllocate,
      (PRTL_AVL_FREE_ROUTINE)PopPowerRequestFree,
      0i64);
    *(&stru_140C23628 + 711) = 8i64;
    *(&stru_140C23628 + 709) = 0i64;
    *(&stru_140C23628 + 713) = (char *)&stru_140C23628 + 5696;
    *(&stru_140C23628 + 712) = (char *)&stru_140C23628 + 5696;
    *(&stru_140C23628 + 746) = PopExecutionRequiredTimeoutCallback;
    *(&stru_140C23628 + 741) = PopExecutionRequiredTimeoutWorkerRoutine;
    *(_OWORD *)((char *)&stru_140C23628 + 5656) = 0i64;
    *(&stru_140C23628 + 714) = 0i64;
    *(&stru_140C23628 + 1437) = 0;
    *(&stru_140C23628 + 2872) = 0;
    *(&stru_140C23628 + 1486) = 275;
    *(&stru_140C23628 + 747) = 0i64;
    *(&stru_140C23628 + 750) = 0i64;
    *(&stru_140C23628 + 745) = 0i64;
    *(&stru_140C23628 + 742) = 0i64;
    *(&stru_140C23628 + 739) = 0i64;
    PopStatsInitPowerRequestLibrary();
  }
  return v0;
}

Referenced by:

PoInitSystem