Пример #1
0
        public object ReadInstance(UnPackage package, BinaryReader reader, UnExport export)
        {
            reader.ReadBytes(12);
            int super    = reader.ReadInt32();
            int children = reader.ReadInt32();

            reader.ReadBytes(12);
            int line       = reader.ReadInt32();
            int textPos    = reader.ReadInt32();
            int scriptSize = reader.ReadInt32();

            byte[] bytecode           = reader.ReadBytes(scriptSize);
            int    nativeIndex        = reader.ReadInt16();
            int    operatorPrecedence = reader.ReadByte();
            int    functionFlags      = reader.ReadInt32();

            if ((functionFlags & _flagSet.GetMask("Net")) != 0)
            {
                reader.ReadInt16();  // repOffset
            }
            int friendlyNameIndex = reader.ReadInt32();

            reader.ReadInt32();
            return(new UnFunction(export, package.Names[friendlyNameIndex].Name,
                                  new FlagValues(functionFlags, _flagSet), bytecode, nativeIndex, operatorPrecedence));
        }
Пример #2
0
        public object ReadInstance(UnPackage package, BinaryReader reader, UnExport export)
        {
            // 44 bytes
            reader.ReadBytes(16);
            int next      = reader.ReadInt32();
            int arraySize = reader.ReadInt32();
            int flags     = reader.ReadInt32();

            reader.ReadInt32();
            int category = (int)reader.ReadInt64();

            reader.ReadInt32();
            var repOffset = ((flags & _flagSet.GetMask("Net")) != 0) ? reader.ReadInt16() : (short)-1;

            return(CreateProperty(export, arraySize, new FlagValues(flags, _flagSet), category, reader, repOffset));
        }