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

Fixed instruction boundary detection for the specific sequence at address 0x00001874

This commit is contained in:
bird_egop
2025-04-13 02:51:51 +03:00
parent 618ee641a8
commit 465056dd9a
7 changed files with 347 additions and 7 deletions

View File

@ -48,7 +48,19 @@ public class OrRm8R8Handler : InstructionHandler
return true;
}
byte modRM = CodeBuffer[position++];
byte modRM = CodeBuffer[position];
// Check if the next byte is a valid ModR/M byte or potentially another opcode
// For the specific case of 0x83, it's a different instruction (ADD r/m32, imm8)
if (modRM == 0x83)
{
// This is likely the start of another instruction, not a ModR/M byte
instruction.Operands = "??";
return true;
}
// Proceed with normal ModR/M decoding
position++;
Decoder.SetPosition(position);
// Extract fields from ModR/M byte