PpmPerfResizeHistory

NTSTATUS __stdcall PpmPerfResizeHistory(_KPRCB *Prcb){
  NTSTATUS v2; 
  unsigned __int8 PerfPolicyClass; 
  __int64 v4; 
  _DWORD *v5; 
  int v6; 
  int v7; 
  size_t v8; 
  VOID **PoolWithTag; 
  _DWORD *v10; 

  v2 = 0;
  PerfPolicyClass = PpmGetPerfPolicyClass(Prcb);
  v5 = *(_DWORD **)(v4 + 32);
  v6 = *(unsigned __int8 *)(PerfPolicyClass + *(&stru_140C00F40 + 365) + 2736i64 * *(&stru_140C23628 + 441) + 64);
  v7 = v6;
  if( v5 )
  {
    if( *v5 == v6 )
      return v2;
    ExFreePoolWithTag(v5, 0x704D5050u);
    *(_QWORD *)&Prcb->NestingLevel = 0i64;
  }
  if( (unsigned __int8)v6 > 1u )
  {
    v8 = 10 * v6 + 32;
    PoolWithTag = ExAllocatePoolWithTag(0x200ui64, v8, 1884115024i64);
    v10 = PoolWithTag;
    if( PoolWithTag )
    {
      memset(PoolWithTag, 0i64, v8);
      *v10 = v7;
      *(_QWORD *)&Prcb->NestingLevel = v10;
      PpmPerfResetHistory(Prcb);
    }
    else
    {
      return -1073741670;
    }
  }
  return v2;
}

Referenced by:

PpmPerfResizeHistoryAll
PpmRegisterPerfStates