Ejemplo n.º 1
0
        protected BinaryParser OpenDirectory(PEDataDirectory dir)
        {
            PESection section = FindSectionByRva(dir.VirtualAddress);

            if (section == null)
            {
                InvalidPEFileException.ThrowInvalidRva();
            }

            uint index = (section.PointerToRawData + (dir.VirtualAddress - section.VirtualAdress));
            uint count = (dir.Size);

            Stream imageStream = OpenImage(index);

            return(new BinaryParser(imageStream, index));
        }
Ejemplo n.º 2
0
        protected BinaryParser OpenDirectory(PEDataDirectory dir)
        {
            PESection section = FindSectionByRva(dir.VirtualAddress);
            if (section == null)
            {
                InvalidPEFileException.ThrowInvalidRva();
            }

            uint index = (section.PointerToRawData + (dir.VirtualAddress - section.VirtualAdress));
            uint count = (dir.Size);

            Stream imageStream = OpenImage(index);

            return new BinaryParser(imageStream, index);
        }