mirror of
https://github.com/Colton1skees/Dna
synced 2026-06-21 13:42:09 +00:00
37 lines
997 B
C#
37 lines
997 B
C#
using Dna.ControlFlow;
|
|
using Iced.Intel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Dna.Relocation
|
|
{
|
|
/// <summary>
|
|
/// Represents a basic block which has been allocated at an arbitrary address.
|
|
/// </summary>
|
|
public class RelocatedBlock
|
|
{
|
|
public BasicBlock<Instruction> InputBlock { get; }
|
|
|
|
public ulong OriginalRip { get; }
|
|
|
|
public ulong RelocatedRip { get; set; }
|
|
|
|
public int RelocatedSize { get; }
|
|
|
|
public List<Instruction> RelocatedInstructions { get; } = new List<Instruction>();
|
|
|
|
public bool HasBeenRewritten { get; set; }
|
|
|
|
public RelocatedBlock(BasicBlock<Instruction> inputBlock, ulong originalRip, ulong relocatedRip, int relocatedSize)
|
|
{
|
|
InputBlock = inputBlock;
|
|
OriginalRip = originalRip;
|
|
RelocatedRip = relocatedRip;
|
|
RelocatedSize = relocatedSize;
|
|
}
|
|
}
|
|
}
|