/// <summary>
        /// Reads a single <see cref="X64RuntimeFunction"/> from the provided input stream.
        /// </summary>
        /// <param name="context">The reader context.</param>
        /// <param name="reader">The input stream.</param>
        /// <returns>The read function entry.</returns>
        public static X64RuntimeFunction FromReader(PEReaderContext context, IBinaryStreamReader reader)
        {
            uint begin         = reader.ReadUInt32();
            uint end           = reader.ReadUInt32();
            uint unwindInfoRva = reader.ReadUInt32();

            var unwindInfo = context.File.TryCreateReaderAtRva(unwindInfoRva, out var unwindReader)
                ? X64UnwindInfo.FromReader(context, unwindReader)
                : context.BadImageAndReturn <X64UnwindInfo>($"Invalid UnwindInfo RVA {unwindInfoRva:X8}.");

            return(new X64RuntimeFunction(
                       context.File.GetReferenceToRva(begin),
                       context.File.GetReferenceToRva(end),
                       unwindInfo));
        }
 /// <summary>
 /// Creates a new instance of the <see cref="X64RuntimeFunction"/> class.
 /// </summary>
 /// <param name="begin">The reference to the beginning of the function. </param>
 /// <param name="end">The reference to the end of the function.</param>
 /// <param name="unwindInfo">The unwind information associated to the function.</param>
 public X64RuntimeFunction(ISegmentReference begin, ISegmentReference end, X64UnwindInfo unwindInfo)
 {
     Begin      = begin;
     End        = end;
     UnwindInfo = unwindInfo;
 }