Esempio n. 1
0
 public override void Parse(CBinaryReader br)
 {
     br.Seek((long) base.Address, SeekOrigin.Begin);
     br.Endian = EndianType.BigEndian;
     this.MediaID = br.ReadBytes(4);
     this.Version = br.ReadUInt32();
     this.BaseVersion = br.ReadUInt32();
     this.TitleID = br.ReadBytes(4);
     this.Platform = br.ReadByte();
     this.ExecutableType = br.ReadByte();
     this.DiscNumber = br.ReadByte();
     this.DiscCount = br.ReadByte();
 }
Esempio n. 2
0
 public XbeHeader(CBinaryReader br)
 {
     try
     {
         if (br.ReadUInt32() == 0x48454258)
         {
             this.DigitalSignature = br.ReadBytes(0x100);
             this.BaseAddress = br.ReadUInt32();
             this.SizeOfHeaders = br.ReadUInt32();
             this.SizeOfImage = br.ReadUInt32();
             this.SizeOfImageHeader = br.ReadUInt32();
             this.TimeDate = br.ReadBytes(4);
             this.CertificateAddress = br.ReadUInt32();
             this.NumberOfSections = br.ReadUInt32();
             this.SectionHeadersAddress = br.ReadUInt32();
             this.InitialisationFlags = (XbeInitFlags) br.ReadUInt32();
             this.EntryPoint = br.ReadUInt32();
             this.TLSAddress = br.ReadUInt32();
             this.PEStackCommit = br.ReadUInt32();
             this.PEHeapReserve = br.ReadUInt32();
             this.PEHeapCommit = br.ReadUInt32();
             this.PEBaseAddress = br.ReadUInt32();
             this.PESizeOfImage = br.ReadUInt32();
             this.PEChecksum = br.ReadUInt32();
             this.PETimeDate = br.ReadBytes(4);
             this.DebugPathnameAddress = br.ReadUInt32();
             this.DebugFilenameAddress = br.ReadUInt32();
             this.DebugUnicodeFilenameAddress = br.ReadUInt32();
             this.KernelImageThunkAddress = br.ReadUInt32();
             this.NonKernelImportDirectoryAddress = br.ReadUInt32();
             this.NumberOfLibraryVersions = br.ReadUInt32();
             this.LibraryVersionsAddress = br.ReadUInt32();
             this.KernelLibraryVersionAddress = br.ReadUInt32();
             this.XAPILibraryVersionAddress = br.ReadUInt32();
             this.LogoBitmapAddress = br.ReadUInt32();
             this.LogoBitmapSize = br.ReadUInt32();
             this.IsValid = true;
         }
     }
     catch (Exception)
     {
     }
 }
Esempio n. 3
0
 public void Read(CBinaryReader br, uint BaseAddress)
 {
     br.Seek((long) (this.Header.SectionNameAddress - BaseAddress), SeekOrigin.Begin);
     while (br.PeekChar() != 0)
     {
         this.Name = this.Name + br.ReadChar();
     }
     br.Seek((long) this.Header.RawAddress, SeekOrigin.Begin);
     this.Data = br.ReadBytes((int) this.Header.RawSize);
 }
Esempio n. 4
0
 public XdbfHeader(CBinaryReader b)
 {
     b.Seek(0L, SeekOrigin.Begin);
     this.MagicBytes = b.ReadBytes(4);
     this.Version = b.ReadUInt16();
     this.Reserved = b.ReadUInt16();
     this.NumEntries = b.ReadUInt32();
     this.NumEntriesCopy = b.ReadUInt32();
     this.UnknownA = b.ReadUInt32();
     this.UnknownB = b.ReadUInt32();
 }
Esempio n. 5
0
 public XbeSectionHeader(CBinaryReader bw)
 {
     this.SectionDigest = new byte[20];
     bw.Endian = EndianType.LittleEndian;
     this.Flags = (XbeSectionFlags) bw.ReadUInt32();
     this.VirtualAddress = bw.ReadUInt32();
     this.VirtualSize = bw.ReadUInt32();
     this.RawAddress = bw.ReadUInt32();
     this.RawSize = bw.ReadUInt32();
     this.SectionNameAddress = bw.ReadUInt32();
     this.SectionNameRefCount = bw.ReadUInt32();
     this.HeadSharedPageRefCountAddress = bw.ReadUInt32();
     this.TailSharedPageRefCountAddress = bw.ReadUInt32();
     this.SectionDigest = bw.ReadBytes(20);
 }
Esempio n. 6
0
 public XbeCertifcate(CBinaryReader br)
 {
     this.Size = br.ReadUInt32();
     this.TimeData = br.ReadBytes(4);
     this.titleID = br.ReadUInt32();
     this.titleName = br.ReadBytes(80);
     this.AltTitleIDs = br.ReadBytes(0x40);
     this.AllowedMedia = (XbeAllowedMedia) br.ReadUInt32();
     this.GameRegion = (XbeGameRegion) br.ReadUInt32();
     this.GameRatings = br.ReadUInt32();
     this.DiskNumber = br.ReadUInt32();
     this.Version = br.ReadUInt32();
     this.LanKey = br.ReadBytes(0x10);
     this.SignatureKey = br.ReadBytes(0x10);
     this.AltSignatureKeys = br.ReadBytes(0x100);
 }