NativeOperand
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
One decoded operand of a NativeInstruction, carried structurally so navigation, JSON/MCP output, syntax decoration, and future diffing never parse the rendered text. The Text is the display projection; the typed fields describe what it renders.
public sealed record NativeOperand : IEquatable<NativeOperand>Inheritance
Section titled “Inheritance”Object → NativeOperand
Implements
Section titled “Implements”Constructors
Section titled “Constructors”NativeOperand(NativeOperandKind, string, string?, long?, string?, string?, int, long, bool)
Section titled “NativeOperand(NativeOperandKind, string, string?, long?, string?, string?, int, long, bool)”One decoded operand of a NativeInstruction, carried structurally so navigation, JSON/MCP output, syntax decoration, and future diffing never parse the rendered text. The Text is the display projection; the typed fields describe what it renders.
Parameters:
Kind(NativeOperandKind): The operand’s kind.Text(String): The rendered operand text (e.g.rax,0x10,[rbp-0x8],zmm1{k1}{z}).Register(String): The register name when Kind is Register, else null.Immediate(Nullable<Int64>): The immediate value when Kind is Immediate, else null.MemoryBase(String): The base register of a memory reference, or null.MemoryIndex(String): The index register of a memory reference, or null.MemoryScale(Int32): The index scale (1/2/4/8) of a memory reference, or 0 when there is no index.MemoryDisplacement(Int64): The displacement of a memory reference, or 0.IsRipRelative(Boolean): Whether a memory reference is x64 RIP-relative (the displacement is off the next instruction).
public NativeOperand(NativeOperandKind Kind, string Text, string? Register = null, long? Immediate = null, string? MemoryBase = null, string? MemoryIndex = null, int MemoryScale = 0, long MemoryDisplacement = 0, bool IsRipRelative = false)Properties
Section titled “Properties”Immediate
Section titled “Immediate”The immediate value when Kind is Immediate, else null.
Returns: Nullable<Int64>
public long? Immediate { get; init; }IsRipRelative
Section titled “IsRipRelative”Whether a memory reference is x64 RIP-relative (the displacement is off the next instruction).
Returns: Boolean
public bool IsRipRelative { get; init; }The operand’s kind.
Returns: NativeOperandKind
public NativeOperandKind Kind { get; init; }MemoryBase
Section titled “MemoryBase”The base register of a memory reference, or null.
Returns: String
public string? MemoryBase { get; init; }MemoryDisplacement
Section titled “MemoryDisplacement”The displacement of a memory reference, or 0.
Returns: Int64
public long MemoryDisplacement { get; init; }MemoryIndex
Section titled “MemoryIndex”The index register of a memory reference, or null.
Returns: String
public string? MemoryIndex { get; init; }MemoryScale
Section titled “MemoryScale”The index scale (1/2/4/8) of a memory reference, or 0 when there is no index.
Returns: Int32
public int MemoryScale { get; init; }Register
Section titled “Register”The register name when Kind is Register, else null.
Returns: String
public string? Register { get; init; }The rendered operand text (e.g. rax, 0x10, [rbp-0x8], zmm1{k1}{z}).
Returns: String
public string Text { get; init; }