private void SetStreamHeader(StreamHeader sh) { switch (sh.Name) { case "#~": this.tilde = sh; this.sharpTilde = new SharpTildeStream(); this.sharpTilde.ReadData(this.data, this.mdroot.GetOffset() + sh.Offset); break; case "#Strings": this.strings = sh; this.idxm.StringsOffset = sh.GetDataOffset(); break; case "#US": this.usrstr = sh; this.idxm.USOffset = sh.GetDataOffset(); break; case "#GUID": this.guid = sh; this.idxm.GUIDOffset = sh.GetDataOffset(); break; case "#Blob": this.blob = sh; this.idxm.BlobOffset = sh.GetDataOffset(); break; } }
private void ReadCLIHeader() { int addr_cli = RVAManager.GetAddress(this.pe4.CLIHeader); if (addr_cli == 0) { return; } cli = new CLIHeader(); this.cli.ReadData(this.data, this.rva.ConvertToPhysical(addr_cli)); int offset = this.rva.ConvertToPhysical(RVAManager.GetAddress(this.cli.MetaData)); this.mdroot = new MetadataRoot(); this.mdroot.ReadData(this.data, offset); offset += this.mdroot.Length + 18; int nStreams = Util.GetInt16(this.data, offset); offset += 2; this.idxm = new IndexManager(this.data, this.rva); for (int i = 0; i < nStreams; i++) { StreamHeader sh = new StreamHeader(); sh.mdroot = mdroot; sh.ReadData(this.data, offset); offset += sh.GetStreamSize(); this.SetStreamHeader(sh); } this.ReadTilde(); }
private void ReadCLIHeader() { int addr_cli = RVAManager.GetAddress(this.pe4.CLIHeader); if (addr_cli == 0) return; cli = new CLIHeader(); this.cli.ReadData(this.data, this.rva.ConvertToPhysical(addr_cli)); int offset = this.rva.ConvertToPhysical(RVAManager.GetAddress(this.cli.MetaData)); this.mdroot = new MetadataRoot(); this.mdroot.ReadData(this.data, offset); offset += this.mdroot.Length + 18; int nStreams = Util.GetInt16(this.data, offset); offset += 2; this.idxm = new IndexManager(this.data, this.rva); for (int i = 0; i < nStreams; i++) { StreamHeader sh = new StreamHeader(); sh.mdroot = mdroot; sh.ReadData(this.data, offset); offset += sh.GetStreamSize(); this.SetStreamHeader(sh); } this.ReadTilde(); }
private void SetStreamHeader(StreamHeader sh) { switch (sh.Name) { case "#~": this.tilde = sh; this.sharpTilde = new SharpTildeStream(); this.sharpTilde.ReadData(this.data, this.mdroot.GetOffset() + sh.Offset); break; case "#Strings": this.strings = sh; this.idxm.StringsOffset = sh.GetDataOffset(); break; case "#US": this.usrstr = sh; this.idxm.USOffset = sh.GetDataOffset(); break; case "#GUID": this.guid = sh; this.idxm.GUIDOffset = sh.GetDataOffset(); break; case "#Blob": this.blob = sh; this.idxm.BlobOffset = sh.GetDataOffset(); break; } }