PopLogSleepDisabled

INT64 __stdcall PopLogSleepDisabled(UINT64 ReasonCode, UINT64 States, PVOID Data, UINT64 a4){
  char v6; 
  int v7; 
  unsigned int v8; 
  VOID *PoolWithTag; 
  __int64 v10; 
  __int64 *v11; 
  v6 = States;
  v7 = ReasonCode;
  v8 = 0;
  if( PopGetReasonListByReasonCode(ReasonCode) )
  {
    return(unsigned int)-1073741771;
  }
  else
  {
    PoolWithTag = ExAllocatePoolWithTag(PagedPool, a4 + 32, 0x66756263ui64);
    v10 = (__int64)PoolWithTag;
    if( PoolWithTag )
    {
      memset((INT64)PoolWithTag, 0i64);
      *(_DWORD *)(v10 + 24) = v7;
      if( (v6 & 1) != 0 )
        *(_BYTE *)(v10 + 16) = 1;
      if( (v6 & 2) != 0 )
        *(_BYTE *)(v10 + 17) = 1;
      if( (v6 & 4) != 0 )
        *(_BYTE *)(v10 + 18) = 1;
      if( (v6 & 8) != 0 )
        *(_BYTE *)(v10 + 19) = 1;
      if( (v6 & 0x10) != 0 )
        *(_BYTE *)(v10 + 22) = 1;
      if( (v6 & 0x20) != 0 )
        *(_BYTE *)(v10 + 20) = 1;
      if( a4 )
      {
        *(_DWORD *)(v10 + 28) = a4;
        memmove((UINT8 *)(v10 + 32), (UINT8 *)Data, a4);
      }
      v11 = (__int64 *)qword_140C23A88;
      if( *(__int64 **)qword_140C23A88 != &PowerStateDisableReasonListHead )
        __fastfail(3u);
      *(_QWORD *)v10 = &PowerStateDisableReasonListHead;
      *(_QWORD *)(v10 + 8) = v11;
      *v11 = v10;
      qword_140C23A88 = v10;
    }
    else
    {
      return(unsigned int)-1073741670;
    }
  }
  return v8;
}

Referenced by:

PoInitSystem
PopEnableHiberFile
PopFilterCapabilities
PopInitPlatformSettings
PopLogDisabledSleepReason
PopUpdateUpgradeInProgress