Exemplo n.º 1
0
 public override void ReadFrom(ABCReader reader)
 {
     this.Count = reader.ReadEncodedInt();
     this.NsIndex = new int[Count];
     for (int i = 0; i < Count; i++)
         this.NsIndex[i] = reader.ReadEncodedInt();
 }
Exemplo n.º 2
0
        public override void ReadFrom(ABCReader reader)
        {
            MinorVersion = reader.ReadUInt16();
            MajorVersion = reader.ReadUInt16();

            ConstantPool.ReadFrom(reader);
            ConstantPool.Initialize();

            uint MethodCount = (uint)(reader.ReadEncodedInt());

            Method = new Method[MethodCount];
            for (int i = 0; i < MethodCount; i++)
            {
                Method[i] = new Method();
                Method[i].ReadFrom(reader);
            }

            uint MetadataCount = (uint)(reader.ReadEncodedInt());

            Metadata = new MetaData[MetadataCount];
            for (int i = 0; i < MetadataCount; i++)
            {
                Metadata[i] = new MetaData();
                Metadata[i].ReadFrom(reader);
            }

            uint ClassCount = (uint)(reader.ReadEncodedInt());

            Instance = new Instance[ClassCount];
            for (int i = 0; i < ClassCount; i++)
            {
                Instance[i] = new Instance();
                Instance[i].ReadFrom(reader);
            }
            Class = new Class[ClassCount];
            for (int i = 0; i < ClassCount; i++)
            {
                Class[i] = new Class();
                Class[i].ReadFrom(reader);
            }

            uint ScriptCount = (uint)(reader.ReadEncodedInt());

            Script = new Script[ScriptCount];
            for (int i = 0; i < ScriptCount; i++)
            {
                Script[i] = new Script();
                Script[i].ReadFrom(reader);
            }

            uint MethodBodyCount = (uint)(reader.ReadEncodedInt());

            MethodBody = new MethodBody[MethodBodyCount];
            for (int i = 0; i < MethodBodyCount; i++)
            {
                MethodBody[i] = new MethodBody();
                MethodBody[i].ReadFrom(reader);
            }
        }
Exemplo n.º 3
0
 public override void ReadFrom(ABCReader reader)
 {
     this.Count   = reader.ReadEncodedInt();
     this.NsIndex = new int[Count];
     for (int i = 0; i < Count; i++)
     {
         this.NsIndex[i] = reader.ReadEncodedInt();
     }
 }
Exemplo n.º 4
0
        public override void ReadFrom(ABCReader reader)
        {
            MinorVersion = reader.ReadUInt16();
            MajorVersion = reader.ReadUInt16();

            ConstantPool.ReadFrom(reader);
            ConstantPool.Initialize();

            uint MethodCount = (uint)(reader.ReadEncodedInt());
            Method = new Method[MethodCount];
            for (int i = 0; i < MethodCount; i++)
            {
                Method[i] = new Method();
                Method[i].ReadFrom(reader);
            }

            uint MetadataCount = (uint)(reader.ReadEncodedInt());
            Metadata = new MetaData[MetadataCount];
            for (int i = 0; i < MetadataCount; i++)
            {
                Metadata[i] = new MetaData();
                Metadata[i].ReadFrom(reader);
            }

            uint ClassCount = (uint)(reader.ReadEncodedInt());
            Instance = new Instance[ClassCount];
            for (int i = 0; i < ClassCount; i++)
            {
                Instance[i] = new Instance();
                Instance[i].ReadFrom(reader);
            }
            Class = new Class[ClassCount];
            for (int i = 0; i < ClassCount; i++)
            {
                Class[i] = new Class();
                Class[i].ReadFrom(reader);
            }

            uint ScriptCount = (uint)(reader.ReadEncodedInt());
            Script = new Script[ScriptCount];
            for (int i = 0; i < ScriptCount; i++)
            {
                Script[i] = new Script();
                Script[i].ReadFrom(reader);
            }

            uint MethodBodyCount = (uint)(reader.ReadEncodedInt());
            MethodBody = new MethodBody[MethodBodyCount];
            for (int i = 0; i < MethodBodyCount; i++)
            {
                MethodBody[i] = new MethodBody();
                MethodBody[i].ReadFrom(reader);
            }
        }
Exemplo n.º 5
0
        public override void ReadFrom(ABCReader reader)
        {
            uint IntCount = (uint)reader.ReadEncodedInt();
            this.Integer = new Int32[IntCount];
            this.Integer[0] = 0;
            for (int i = 1; i < IntCount; i++)
                this.Integer[i] = reader.ReadEncodedInt();

            uint UintCount = (uint)reader.ReadEncodedInt();
            this.Uinteger = new UInt32[UintCount];
            this.Uinteger[0] = 0;
            for (int i = 1; i < UintCount; i++)
                this.Uinteger[i] = (uint)reader.ReadEncodedInt();

            uint DoubleCount = (uint)reader.ReadEncodedInt();
            this.Double = new Double?[DoubleCount];
            this.Double[0] = null;
            for (int i = 1; i < DoubleCount; i++)
                this.Double[i] = reader.ReadDouble();

            uint StringCount = (uint)reader.ReadEncodedInt();
            this.String = new String[StringCount];
            this.String[0] = "*";
            for (int i = 1; i < StringCount; i++)
                this.String[i] = reader.ReadString();

            uint NamespaceCount = (uint)reader.ReadEncodedInt();
            this.Namespace = new Namespace[NamespaceCount];
            this.Namespace[0] = Burst.SWF.AVM2.Namespace.PublicNs;
            for (int i = 1; i < NamespaceCount; i++)
            {
                this.Namespace[i] = new Namespace();
                this.Namespace[i].ReadFrom(reader);
            }

            uint NsSetCount = (uint)reader.ReadEncodedInt();
            this.NsSet = new NsSet[NsSetCount];
            this.NsSet[0] = null;
            for (int i = 1; i < NsSetCount; i++)
            {
                this.NsSet[i] = new NsSet();
                this.NsSet[i].ReadFrom(reader);
            }

            uint MultinameCount = (uint)reader.ReadEncodedInt();
            this.Multiname = new Multiname[MultinameCount];
            this.Multiname[0] = null;
            for (int i = 1; i < MultinameCount; i++)
            {
                this.Multiname[i] = new Multiname();
                this.Multiname[i].ReadFrom(reader);
            }
        }
Exemplo n.º 6
0
        public override void ReadFrom(ABCReader reader)
        {
            this.Kind = (MultiNameKind)reader.ReadByte();
            switch (Kind)
            {
            case MultiNameKind.QName:
            case MultiNameKind.QNameA:
                NsIndex   = reader.ReadEncodedInt();
                NameIndex = reader.ReadEncodedInt();
                break;

            case MultiNameKind.RTQName:
            case MultiNameKind.RTQNameA:
                NameIndex = reader.ReadEncodedInt();
                break;

            case MultiNameKind.RTQNameL:
            case MultiNameKind.RTQNameLA:
            case MultiNameKind.NameL:
            case MultiNameKind.NameLA:
                break;

            case MultiNameKind.Multiname:
            case MultiNameKind.MultinameA:
                NameIndex  = reader.ReadEncodedInt();
                NsSetIndex = reader.ReadEncodedInt();
                break;

            case MultiNameKind.MultinameL:
            case MultiNameKind.MultinameLA:
                NsSetIndex = reader.ReadEncodedInt();
                break;

            case MultiNameKind.TypeName:
                NameIndex = reader.ReadEncodedInt();
                var count = reader.ReadEncodedInt();
                this.TypeIndex = new int[count];
                for (int i = 0; i < count; i++)
                {
                    this.TypeIndex[i] = reader.ReadEncodedInt();
                }
                break;

            default:
                throw new SWFAnalysisException("Invalid Multiname Kind.", null);
            }
        }
Exemplo n.º 7
0
        public override void ReadFrom(ABCReader reader)
        {
            uint ParamCount = (uint)reader.ReadEncodedInt();
            this.ReturnTypeIndex = (UInt32)reader.ReadEncodedInt();

            this.ParamType = new UInt32[ParamCount];
            for (int i = 0; i < ParamCount; i++)
                this.ParamType[i] = (UInt32)reader.ReadEncodedInt();

            this.NameIndex = (UInt32)reader.ReadEncodedInt();

            this.Flags = reader.ReadByte();

            this.Options.ReadFrom(reader);

            this.ParamNames.ReadFrom(reader);
        }
Exemplo n.º 8
0
        public override void ReadFrom(ABCReader reader)
        {
            uint ParamCount = (uint)reader.ReadEncodedInt();

            this.ReturnTypeIndex = (UInt32)reader.ReadEncodedInt();

            this.ParamType = new UInt32[ParamCount];
            for (int i = 0; i < ParamCount; i++)
            {
                this.ParamType[i] = (UInt32)reader.ReadEncodedInt();
            }

            this.NameIndex = (UInt32)reader.ReadEncodedInt();

            this.Flags = reader.ReadByte();

            this.Options.ReadFrom(reader);

            this.ParamNames.ReadFrom(reader);
        }
Exemplo n.º 9
0
 public override void ReadFrom(ABCReader reader)
 {
     this.Kind = (MultiNameKind)reader.ReadByte();
     switch (Kind)
     {
         case MultiNameKind.QName:
         case MultiNameKind.QNameA:
             NsIndex = reader.ReadEncodedInt();
             NameIndex = reader.ReadEncodedInt();
             break;
         case MultiNameKind.RTQName:
         case MultiNameKind.RTQNameA:
             NameIndex = reader.ReadEncodedInt();
             break;
         case MultiNameKind.RTQNameL:
         case MultiNameKind.RTQNameLA:
         case MultiNameKind.NameL:
         case MultiNameKind.NameLA:
             break;
         case MultiNameKind.Multiname:
         case MultiNameKind.MultinameA:
             NameIndex = reader.ReadEncodedInt();
             NsSetIndex = reader.ReadEncodedInt();
             break;
         case MultiNameKind.MultinameL:
         case MultiNameKind.MultinameLA:
             NsSetIndex = reader.ReadEncodedInt();
             break;
         case MultiNameKind.TypeName:
             NameIndex = reader.ReadEncodedInt();
             var count = reader.ReadEncodedInt();
             this.TypeIndex = new int[count];
             for (int i = 0; i < count; i++)
                 this.TypeIndex[i] = reader.ReadEncodedInt();
             break;
         default:
             throw new SWFAnalysisException("Invalid Multiname Kind.", null);
     }
 }
Exemplo n.º 10
0
 public override void ReadFrom(ABCReader reader)
 {
     this.Kind = (NamespaceKind)reader.ReadByte();
     this.NameIndex = reader.ReadEncodedInt();
 }
Exemplo n.º 11
0
 public override void ReadFrom(ABCReader reader)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 12
0
        public override void ReadFrom(ABCReader reader)
        {
            uint IntCount = (uint)reader.ReadEncodedInt();

            this.Integer    = new Int32[IntCount];
            this.Integer[0] = 0;
            for (int i = 1; i < IntCount; i++)
            {
                this.Integer[i] = reader.ReadEncodedInt();
            }

            uint UintCount = (uint)reader.ReadEncodedInt();

            this.Uinteger    = new UInt32[UintCount];
            this.Uinteger[0] = 0;
            for (int i = 1; i < UintCount; i++)
            {
                this.Uinteger[i] = (uint)reader.ReadEncodedInt();
            }

            uint DoubleCount = (uint)reader.ReadEncodedInt();

            this.Double    = new Double?[DoubleCount];
            this.Double[0] = null;
            for (int i = 1; i < DoubleCount; i++)
            {
                this.Double[i] = reader.ReadDouble();
            }

            uint StringCount = (uint)reader.ReadEncodedInt();

            this.String    = new String[StringCount];
            this.String[0] = "*";
            for (int i = 1; i < StringCount; i++)
            {
                this.String[i] = reader.ReadString();
            }

            uint NamespaceCount = (uint)reader.ReadEncodedInt();

            this.Namespace    = new Namespace[NamespaceCount];
            this.Namespace[0] = Burst.SWF.AVM2.Namespace.PublicNs;
            for (int i = 1; i < NamespaceCount; i++)
            {
                this.Namespace[i] = new Namespace();
                this.Namespace[i].ReadFrom(reader);
            }

            uint NsSetCount = (uint)reader.ReadEncodedInt();

            this.NsSet    = new NsSet[NsSetCount];
            this.NsSet[0] = null;
            for (int i = 1; i < NsSetCount; i++)
            {
                this.NsSet[i] = new NsSet();
                this.NsSet[i].ReadFrom(reader);
            }

            uint MultinameCount = (uint)reader.ReadEncodedInt();

            this.Multiname    = new Multiname[MultinameCount];
            this.Multiname[0] = null;
            for (int i = 1; i < MultinameCount; i++)
            {
                this.Multiname[i] = new Multiname();
                this.Multiname[i].ReadFrom(reader);
            }
        }
Exemplo n.º 13
0
 public void ReadFrom(Stream stream)
 {
     using (var reader = new ABCReader(stream))
         ReadFrom(reader);
 }
Exemplo n.º 14
0
 public override void ReadFrom(ABCReader reader)
 {
     this.Kind      = (NamespaceKind)reader.ReadByte();
     this.NameIndex = reader.ReadEncodedInt();
 }
Exemplo n.º 15
0
 public void ReadFrom(Stream stream)
 {
     using (var reader = new ABCReader(stream))
         ReadFrom(reader);
 }
Exemplo n.º 16
0
 public abstract void ReadFrom(ABCReader reader);
Exemplo n.º 17
0
 public override void ReadFrom(ABCReader reader)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 18
0
 public abstract void ReadFrom(ABCReader reader);