RtlpHpHeapCheckCommitLimit

INT64 __fastcall RtlpHpHeapCheckCommitLimit(INT64 a1, INT64 a2, INT64 a3, UINT64 *a4){
  UINT64 v4; 
  unsigned int v5; 
  UINT64 *v7; 
  INT64 v8; 
  v4 = *a4;
  v5 = 0;
  if( (*a4 || (v4 = *((_QWORD *)&xmmword_140C1DC10 + 1)) != 0) && a1 + a2 > v4 )
  {
    v7 = (UINT64 *)&xmmword_140C1DC10 + 1;
    if( *a4 )
      v7 = a4;
    v8 = v7[1];
    if( v8 )
      RtlpLogHeapFailure(21i64, a3, 0i64, v8, a1, a2);
  }
  else
  {
    return 1;
  }
  return v5;
}

Referenced by:

RtlpAllocateHeap
RtlpExtendHeap
RtlpFindAndCommitPages
RtlpHpSegHeapCheckCommitLimit
RtlpInitializeHeapSegment