RvaToFileOffset() публичный Метод

public RvaToFileOffset ( long rva ) : long
rva long
Результат long
Пример #1
0
        private Dictionary<ushort, uint> ReadOrdinalRvaTable(IBinaryStreamReader reader, WindowsAssembly application)
        {
            var dictionary = new Dictionary<ushort, uint>();
            if (NumberOfNames > 0)
            {
                var nameOrdinalReader = reader.CreateSubReader(application.RvaToFileOffset(AddressOfNameOrdinals));
                var nameRvaReader = reader.CreateSubReader(application.RvaToFileOffset(AddressOfNames));

                for (int i = 0; i < NumberOfNames; i++)
                    dictionary.Add(nameOrdinalReader.ReadUInt16(), nameRvaReader.ReadUInt32());
            }
            return dictionary;
        }
Пример #2
0
        private uint[] ReadAddresses(IBinaryStreamReader reader, WindowsAssembly application)
        {
            var addressReader = reader.CreateSubReader(application.RvaToFileOffset(AddressOfFunctions));
            var addresses     = new uint[NumberOfFunctions];

            for (int i = 0; i < NumberOfFunctions; i++)
            {
                addresses[i] = addressReader.ReadUInt32();
            }
            return(addresses);
        }
Пример #3
0
        private Dictionary<ushort, uint> ReadOrdinalRvaTable(IBinaryStreamReader reader, WindowsAssembly application)
        {
            var dictionary = new Dictionary<ushort, uint>();
            if (NumberOfNames > 0)
            {
                var nameOrdinalReader = reader.CreateSubReader(application.RvaToFileOffset(AddressOfNameOrdinals));
                var nameRvaReader = reader.CreateSubReader(application.RvaToFileOffset(AddressOfNames));

                for (int i = 0; i < NumberOfNames; i++)
                    dictionary.Add(nameOrdinalReader.ReadUInt16(), nameRvaReader.ReadUInt32());
            }
            return dictionary;
        }
Пример #4
0
        private uint[] ReadAddresses(IBinaryStreamReader reader, WindowsAssembly application)
        {
            var addressReader = reader.CreateSubReader(application.RvaToFileOffset(AddressOfFunctions));
            var addresses = new uint[NumberOfFunctions];

            for (int i = 0; i < NumberOfFunctions; i++)
            {
                addresses[i] = addressReader.ReadUInt32();
            }
            return addresses;
        }