Exemplo n.º 1
0
        public void Deserialize(BinaryReader Reader)
        {
            ClassIndex   = Reader.ReadInt32();
            SuperIndex   = Reader.ReadInt32();
            PackageIndex = Reader.ReadInt32();
            ObjectName   = Reader.ReadInt64();
            Archetype    = Reader.ReadInt32();

            ObjectFlags = Reader.ReadUInt64();

            SerialSize = Reader.ReadInt32();

            if (Sum.LicenseeVersion >= 22)
            {
                SerialOffset = Reader.ReadInt64();
            }
            else
            {
                SerialOffset = Reader.ReadInt32();
            }

            ExportFlags = Reader.ReadInt32();
            NetObjects.Deserialize(Reader);
            PackageGuid.Deserialize(Reader);
            PackageFlags = Reader.ReadInt32();
        }
Exemplo n.º 2
0
 public void Deserialize(BinaryReader Reader)
 {
     Unknown1 = Reader.ReadInt32();
     Unknown2 = Reader.ReadInt32();
     Unknown3 = Reader.ReadInt32();
     Unknown4 = Reader.ReadInt32();
     Unknown5 = Reader.ReadInt32();
     UnknownArray.Deserialize(Reader);
 }
Exemplo n.º 3
0
        private TArray <FCompressedChunkInfo> DeserializeCompressedChunkInfo(byte[] decryptedData)
        {
            var chunkInfo = new TArray <FCompressedChunkInfo>(() => new FCompressedChunkInfo(Header));

            using (var decryptedReader = new BinaryReader(new MemoryStream(decryptedData)))
            {
                // Get the compressed chunk info from inside the encrypted data
                decryptedReader.BaseStream.Position = Header.CompressedChunkInfoOffset;
                chunkInfo.Deserialize(decryptedReader);
            }
            return(chunkInfo);
        }
Exemplo n.º 4
0
        public void Deserialize(BinaryReader Reader)
        {
            Tag = Reader.ReadUInt32();
            if (Tag != PACKAGE_FILE_TAG)
            {
                throw new Exception("Not a valid Unreal Engine package.");
            }

            FileVersion     = Reader.ReadUInt16();
            LicenseeVersion = Reader.ReadUInt16();

            TotalHeaderSize = Reader.ReadInt32();
            FolderName.Deserialize(Reader);
            PackageFlags = Reader.ReadUInt32();

            NameCount  = Reader.ReadInt32();
            NameOffset = Reader.ReadInt32();

            ExportCount  = Reader.ReadInt32();
            ExportOffset = Reader.ReadInt32();

            ImportCount  = Reader.ReadInt32();
            ImportOffset = Reader.ReadInt32();

            DependsOffset = Reader.ReadInt32();

            Unknown1 = Reader.ReadInt32();
            Unknown2 = Reader.ReadInt32();
            Unknown3 = Reader.ReadInt32();
            Unknown4 = Reader.ReadInt32();

            Guid.Deserialize(Reader);

            Generations.Deserialize(Reader);

            EngineVersion = Reader.ReadUInt32();
            CookerVersion = Reader.ReadUInt32();

            CompressionFlags = (ECompressionFlags)(Reader.ReadUInt32());

            CompressedChunks = new TArray <FCompressedChunkInfo>(() => new FCompressedChunkInfo(this));
            CompressedChunks.Deserialize(Reader);

            Unknown5 = Reader.ReadInt32();

            UnknownStringArray.Deserialize(Reader);
            UnknownTypeArray.Deserialize(Reader);

            GarbageSize = Reader.ReadInt32();
            CompressedChunkInfoOffset = Reader.ReadInt32();
            LastBlockSize             = Reader.ReadInt32();
        }