Beispiel #1
0
 public DataDirectoryEntry(PEHeaders headers, string name, DirectoryEntry entry)
     : this(name, entry.RelativeVirtualAddress, entry.Size, (headers.GetContainingSectionIndex(entry.RelativeVirtualAddress) >= 0) ? headers.SectionHeaders[headers.GetContainingSectionIndex(entry.RelativeVirtualAddress)].Name : "")
 {
 }
Beispiel #2
0
        private protected int RvaToOffset(int rva)
        {
            var sectionHeader = _headers.SectionHeaders[_headers.GetContainingSectionIndex(rva)];

            return(rva - sectionHeader.VirtualAddress + sectionHeader.PointerToRawData);
        }