0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 16:18:37 +03:00

Fix x86 disassembler issues with direct memory addressing and immediate value formatting

This commit is contained in:
bird_egop
2025-04-15 02:29:32 +03:00
parent d351f41808
commit 3ea327064a
67 changed files with 854 additions and 453 deletions

View File

@ -43,13 +43,14 @@ public class JgeRel8Handler : InstructionHandler
return false;
}
// Read the offset byte
sbyte offset = (sbyte)Decoder.ReadByte();
// Calculate target address (instruction address + instruction length + offset)
ulong targetAddress = instruction.Address + 2UL + (uint)offset;
// The instruction.Address already includes the base address from the disassembler
ulong targetAddress = instruction.Address + 2UL + (ulong) offset;
// Create the relative offset operand
var targetOperand = OperandFactory.CreateRelativeOffsetOperand(targetAddress, 8);
// Create the relative offset operand with the absolute target address
var targetOperand = OperandFactory.CreateRelativeOffsetOperand((uint)targetAddress, 8);
// Set the structured operands
instruction.StructuredOperands =