Example #1
0
 /// <summary>
 /// Attempts to find the section containing the provided virtual address.
 /// </summary>
 /// <param name="rva">The virtual address.</param>
 /// <param name="section">The section that was found.</param>
 /// <returns><c>true</c> if the section was found, <c>false</c> otherwise.</returns>
 public bool TryGetSectionContainingRva(uint rva, out PESection section)
 {
     section = Sections.FirstOrDefault(s => s.ContainsRva(rva));
     return(section != null);
 }
Example #2
0
 /// <summary>
 /// Copy a new section.
 /// </summary>
 /// <param name="section">The section to be copied.</param>
 public PESection(PESection section)
     : this(section.Name, section.Characteristics, section.Contents)
 {
 }
Example #3
0
 /// <summary>
 /// Attempts to find the section containing the provided file offset.
 /// </summary>
 /// <param name="fileOffset">The file offset.</param>
 /// <param name="section">The section that was found.</param>
 /// <returns><c>true</c> if the section was found, <c>false</c> otherwise.</returns>
 public bool TryGetSectionContainingOffset(uint fileOffset, out PESection section)
 {
     section = Sections.FirstOrDefault(s => s.ContainsFileOffset(fileOffset));
     return(section != null);
 }