namespace SabreTools.Data.Models.XenonExecutable { /// /// Xenon (Xbox 360) Executable format certificate structure /// /// /// public class Certificate { /// /// Length of the certificate structure in bytes /// /// Big-endian public uint Length { get; set; } /// /// Size of the entire image in bytes /// Uncompressed size (not the raw XEX file size) /// /// Big-endian public uint ImageSize { get; set; } /// /// Public signature for XEX file /// Signed by Microsoft for XEX authenticity /// public byte[] Signature { get; set; } = new byte[256]; /// /// Base File Load Address, retail discs always(?) 0x00000174 /// /// Big-endian public uint BaseFileLoadAddress { get; set; } /// /// Image flags, see Constants.ImageFlags /// /// Big-endian public uint ImageFlags { get; set; } /// /// Base address for the image to be placed in memory /// Known values: 0x82000000 (retail games), 0x92000000 (applications) /// /// Big-endian public uint ImageBaseAddress { get; set; } /// /// Unknown hash, likely SHA-1 integrity hash for portion of image /// public byte[] UnknownHash1 { get; set; } = new byte[20]; /// /// Unknown field /// Known values: 0x00000002 (retail games, some applications), 0x00000003 (applications) /// /// Big-endian public uint Unknown0128 { get; set; } /// /// Unknown hash, likely SHA-1 integrity hash for portion of image /// public byte[] UnknownHash2 { get; set; } = new byte[20]; /// /// Full Media ID, probably a GUID /// Last (LSB) four bytes in hexadecimal are the unique ringcode of the disc being pressed /// public byte[] MediaID { get; set; } = new byte[16]; /// /// XEX File Key /// public byte[] XEXFileKey { get; set; } = new byte[16]; /// /// Unknown field, often zeroed /// /// Big-endian public uint Unknown0160 { get; set; } /// /// Unknown hash, likely SHA-1 integrity hash for portion of image /// public byte[] UnknownHash3 { get; set; } = new byte[20]; /// /// Flags for console region locking, known values in Constants.RegionFlags /// /// Big-endian public uint RegionFlags { get; set; } /// /// Allowed media type flags, see Constants.AllowedMediaTypeFlags /// /// Big-endian public uint AllowedMediaTypeFlags { get; set; } /// /// Number of entries in the following table /// /// Big-endian public uint TableCount { get; set; } /// /// Table, 24-bytes per entry /// public TableEntry[] Table { get; set; } = []; } }