示例#1
0
        public long GetMappedAddressFileOffset(BinaryReader reader)
        {
            reader.BaseStream.Seek(BaseAddress, SeekOrigin.Begin);

            ulong bitFlags = reader.ReadUInt16();

            if (CaesarReader.CheckAndAdvanceBitflag(ref bitFlags))
            {
                return(reader.BaseStream.Position);
            }
            else
            {
                return(-1);
            }
        }
示例#2
0
        public long GetSegmentLengthFileOffset(BinaryReader reader)
        {
            reader.BaseStream.Seek(BaseAddress, SeekOrigin.Begin);

            ulong bitFlags = reader.ReadUInt16();

            CaesarReader.ReadBitflagInt32(ref bitFlags, reader); // skip FromAddress
            if (CaesarReader.CheckAndAdvanceBitflag(ref bitFlags))
            {
                return(reader.BaseStream.Position);
            }
            else
            {
                return(-1);
            }
        }
示例#3
0
        public long GetCALInt16Offset(BinaryReader reader)
        {
            reader.BaseStream.Seek(BaseAddress, SeekOrigin.Begin);

            ulong bitflags        = reader.ReadUInt32();
            ulong bitflagExtended = reader.ReadUInt32();

            CaesarReader.ReadBitflagStringWithReader(ref bitflags, reader, BaseAddress); // Qualifier
            CaesarReader.ReadBitflagInt32(ref bitflags, reader, -1);                     // Name
            CaesarReader.ReadBitflagInt32(ref bitflags, reader, -1);                     // Description
            CaesarReader.ReadBitflagUInt16(ref bitflags, reader);                        // Type
            CaesarReader.ReadBitflagUInt16(ref bitflags, reader);                        // IsExecutable
            if (CaesarReader.CheckAndAdvanceBitflag(ref bitflags))
            {
                return(reader.BaseStream.Position);
            }
            else
            {
                return(-1);
            }
        }
示例#4
0
        public long GetFlashDataOffset(BinaryReader reader)
        {
            reader.BaseStream.Seek(BaseAddress, SeekOrigin.Begin);

            ulong bitflags = reader.ReadUInt32();

            reader.ReadUInt16();

            CaesarReader.ReadBitflagStringWithReader(ref bitflags, reader, BaseAddress); // Qualifier
            CaesarReader.ReadBitflagInt32(ref bitflags, reader);                         // LongName
            CaesarReader.ReadBitflagInt32(ref bitflags, reader);                         // Description

            if (CaesarReader.CheckAndAdvanceBitflag(ref bitflags))
            {
                return(reader.BaseStream.Position);
            }
            else
            {
                return(-1);
            }
        }