Exemple #1
0
        private SettingsHeader ParseSettingsHeader(UnrealBinaryReader reader)
        {
            SettingsHeader header = new SettingsHeader
            {
                Unknown1 = reader.ReadBytes(18),
                Branch   = reader.ReadFString(),
                Unknown2 = reader.ReadInt32(),
                Unknown3 = reader.ReadByte(),
                Unknown4 = reader.ReadByte()
            };

            return(header);
        }
Exemple #2
0
        private List <GuidData> ParseGuidData(UnrealBinaryReader reader)
        {
            int length = reader.ReadInt32();

            List <GuidData> data = new List <GuidData>(length);

            for (int i = 0; i < length; i++)
            {
                data.Add(new GuidData
                {
                    Guid  = reader.ReadGuid(),
                    Value = reader.ReadInt32()
                });
            }

            return(data);
        }
Exemple #3
0
        public FortniteSettings ReadSettings()
        {
            FortniteSettings settings = new FortniteSettings();

            using UnrealBinaryReader decompressedStream = Decompress();

#if DEBUG
            File.WriteAllBytes("decompressed.dat", decompressedStream.ReadBytes((int)decompressedStream.BaseStream.Length));

            decompressedStream.BaseStream.Seek(0, SeekOrigin.Begin);
#endif
            settings.Header = ParseSettingsHeader(decompressedStream);

            settings.GuidData = ParseGuidData(decompressedStream);
            settings.Settings = decompressedStream.ReadProperties();

            return(settings);
        }