Ejemplo n.º 1
0
            public static FormCredential Read(Stream input, Endian endian, uint version)
            {
                FormCredential instance;

                instance.LastModified = LastModified.Read(input, endian, version);
                instance.FormURL      = ReadEncryptedString(input, endian);
                instance.SubmitName   = ReadEncryptedString(input, endian);

                if (version >= 4)
                {
                    instance.Unknown03 = ReadEncryptedString(input, endian);
                    instance.SiteURL   = ReadEncryptedString(input, endian);
                }
                else
                {
                    instance.Unknown03 = default;
                    instance.SiteURL   = default;
                }

                instance.Unknown05 = input.ReadValueU32(endian);
                instance.Unknown07 = input.ReadValueU32(endian);
                instance.Unknown08 = input.ReadValueU32(endian);
                instance.Unknown09 = input.ReadValueU32(endian);
                instance.Unknown10 = input.ReadValueU32(endian);
                instance.Unknown06 = input.ReadValueU32(endian);

                var inputCount = input.ReadValueU32(endian);

                instance.Inputs = new FormInput[inputCount];
                for (uint i = 0; i < inputCount; i++)
                {
                    instance.Inputs[i] = FormInput.Read(input, endian);
                }

                return(instance);
            }