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); } }
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); } }
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); } }
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); } }