コード例 #1
0
ファイル: PortableExecutable.cs プロジェクト: zyonet/Pscx
        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));
        }
コード例 #2
0
ファイル: PortableExecutable.cs プロジェクト: razaraz/Pscx
        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);
        }