CmpKeyEnumStackStart

INT64 __fastcall CmpKeyEnumStackStart(INT64 a1, INT16 a2){
  _CHILD_LIST *v2; 
  __int64 v6; 
  __int64 v7; 
  __int64 v8; 
  if( a2 < 2 )
  {
LABEL_2:
    *(_WORD *)a1 = a2;
    return CmpStartKeyNodeStack(a1 + 8, a2);
  }
  v6 = (unsigned __int16)(a2 - 1);
  CmpAllocateTransientPoolWithTag((_HHIVE *)1, (__int64)(__int16)v6 << 7, 0x38364D43ui64, v2);
  v7 = 0i64;
  *(_QWORD *)(a1 + 344) = v8;
  if( v8 )
  {
    if( (__int16)v6 > 0 )
    {
      v6 = (unsigned __int16)v6;
      do
      {
        CmpKeyEnumStackEntryInitialize(v7 + *(_QWORD *)(a1 + 344));
        v7 += 128i64;
        --v6;
      }
      while( v6 );
    }
    goto LABEL_2;
  }
  return 3221225626i64;
}

Referenced by:

CmpKeyEnumStackStartFromKeyNodeStack
CmpSubtreeEnumeratorStart