예제 #1
0
 public XbeInfo(byte[] Xbe)
 {
     br     = new CBinaryReader(EndianType.LittleEndian, new MemoryStream(Xbe));
     Header = new XbeHeader(br);
     if (Header.IsValid)
     {
         br.Seek(Header.CertificateAddress - Header.BaseAddress, SeekOrigin.Begin);
         Certifcate = new XbeCertifcate(br);
         br.Seek(Header.SectionHeadersAddress - Header.BaseAddress, SeekOrigin.Begin);
         for (uint i = 0; i < Header.NumberOfSections; i++)
         {
             Sections.Add(new XbeSection(br));
         }
         foreach (XbeSection section in Sections)
         {
             section.Read(br, Header.BaseAddress);
         }
     }
 }
예제 #2
0
 public XbeInfo(byte[] Xbe)
 {
     this.data = Xbe;
     this.br = new CBinaryReader(EndianType.LittleEndian, new MemoryStream(this.data));
     this.Header = new XbeHeader(this.br);
     if (this.Header.IsValid)
     {
         this.br.Seek((long) (this.Header.CertificateAddress - this.Header.BaseAddress), SeekOrigin.Begin);
         this.Certifcate = new XbeCertifcate(this.br);
         this.br.Seek((long) (this.Header.SectionHeadersAddress - this.Header.BaseAddress), SeekOrigin.Begin);
         for (uint i = 0; i < this.Header.NumberOfSections; i++)
         {
             this.Sections.Add(new XbeSection(this.br));
         }
         foreach (XbeSection section in this.Sections)
         {
             section.Read(this.br, this.Header.BaseAddress);
         }
     }
 }
예제 #3
0
 public XbeInfo(byte[] Xbe)
 {
     this.data   = Xbe;
     this.br     = new CBinaryReader(EndianType.LittleEndian, new MemoryStream(this.data));
     this.Header = new XbeHeader(this.br);
     if (this.Header.IsValid)
     {
         this.br.Seek((long)(this.Header.CertificateAddress - this.Header.BaseAddress), SeekOrigin.Begin);
         this.Certifcate = new XbeCertifcate(this.br);
         this.br.Seek((long)(this.Header.SectionHeadersAddress - this.Header.BaseAddress), SeekOrigin.Begin);
         for (uint i = 0; i < this.Header.NumberOfSections; i++)
         {
             this.Sections.Add(new XbeSection(this.br));
         }
         foreach (XbeSection section in this.Sections)
         {
             section.Read(this.br, this.Header.BaseAddress);
         }
     }
 }