CmpKeyEnumStackVerifyResumeContext

CHAR __fastcall CmpKeyEnumStackVerifyResumeContext(UINT64 a1, INT64 a2){
  CHAR v2; 
  INT16 v4; 
  INT64 KcbAtLayerHeight; 
  __int16 v6; 
  __int16 v7; 
  __int64 v8; 
  v2 = 0;
  v4 = 0;
  if( *(__int16 *)(a1 + 2) >= 0 )
  {
    while( 1 )
    {
      KcbAtLayerHeight = CmpGetKcbAtLayerHeight(a1, v4);
      if( KcbAtLayerHeight != *(_QWORD *)(v8 + 24i64 * v6 + 16)
        || *(_QWORD *)(KcbAtLayerHeight + 304) != *(_QWORD *)(v8 + 24i64 * v6 + 8) )
      {
        break;
      }
      v4 = v6 + 1;
      if( v4 > v7 )
        return v2;
    }
    return 89;
  }
  return v2;
}

Referenced by:

CmpEnumerateLayeredKey