CmpKeyEnumStackFreeResumeContext

INT64 __stdcall CmpKeyEnumStackFreeResumeContext(PPRIVILEGE_SET Privileges){
  char v1; 
  char v2; 
  unsigned int *p_Attributes; 
  __int64 v5; 
  _CM_KEY_CONTROL_BLOCK *v6; 
  INT64 result; 
  v2 = v1;
  if( SLOWORD(Privileges->PrivilegeCount) >= 0 )
  {
    p_Attributes = &Privileges->Privilege[0].Attributes;
    v5 = (unsigned __int16)(LOWORD(Privileges->PrivilegeCount) + 1);
    do
    {
      v6 = *(_CM_KEY_CONTROL_BLOCK **)p_Attributes;
      if( *(_QWORD *)p_Attributes )
      {
        if( v2 )
          CmpDelayDerefKeyControlBlock(v6);
        else
          CmpDereferenceKeyControlBlock((UINT64)v6);
      }
      p_Attributes += 6;
      --v5;
    }
    while( v5 );
  }
  CmSiFreeMemory(Privileges);
  return result;
}

Referenced by:

CmpDeleteKeyObject
CmpEnumerateLayeredKey
CmpFlushNotifiesOnKeyBodyList