Skip to content

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>

ObjectNativeOperand

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)

The immediate value when Kind is Immediate, else null.

Returns: Nullable<Int64>

public long? Immediate { get; init; }

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

The base register of a memory reference, or null.

Returns: String

public string? MemoryBase { get; init; }

The displacement of a memory reference, or 0.

Returns: Int64

public long MemoryDisplacement { get; init; }

The index register of a memory reference, or null.

Returns: String

public string? MemoryIndex { get; init; }

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

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

Deconstruct(out NativeOperandKind, out string, out string?, out long?, out string?, out string?, out int, out long, out bool)

Section titled “Deconstruct(out NativeOperandKind, out string, out string?, out long?, out string?, out string?, out int, out long, out bool)”

Parameters:

public void Deconstruct(out NativeOperandKind Kind, out string Text, out string? Register, out long? Immediate, out string? MemoryBase, out string? MemoryIndex, out int MemoryScale, out long MemoryDisplacement, out bool IsRipRelative)

Parameters:

Returns: Boolean

public bool Equals(NativeOperand? other)

Parameters:

Returns: Boolean

public override bool Equals(object? obj)

Returns: Int32

public override int GetHashCode()

Returns: String

public override string ToString()

operator !=(NativeOperand?, NativeOperand?)

Section titled “operator !=(NativeOperand?, NativeOperand?)”

Parameters:

Returns: Boolean

public static bool operator !=(NativeOperand? left, NativeOperand? right)

operator ==(NativeOperand?, NativeOperand?)

Section titled “operator ==(NativeOperand?, NativeOperand?)”

Parameters:

Returns: Boolean

public static bool operator ==(NativeOperand? left, NativeOperand? right)