sha0coder/libscemu

shld broken

Closed this issue · 3 comments

{
    "i": 169,
    "x64dbgLine": {
      "rawLine": {
        "Index": "000A9",
        "Address": "0000000144FBED19",
        "Bytes": "6641:0FA4EB 3C",
        "Disassembly": "shld r11w,bp,3C",
        "Registers": "r11: 1BB09DE2F-> 1BB099DE2",
        "Memory": "",
        "Comments": ""
      },
      "rip": "144fbed19",
      "registerChanges": [
        {
          "registerName": "r11",
          "previousValue": "1bb09de2f",
          "newValue": "1bb099de2"
        }
      ],
      "memoryChanges": []
    },
    "scemuLine": {
      "rawLine": "diff_reg: rip = 144fbed19 r11 1bb09de2f -> 1bb099de3;",
      "rip": "144fbed19",
      "registerChanges": [
        {
          "registerName": "r11",
          "previousValue": "1bb09de2f",
          "newValue": "1bb099de3"
        }
      ],
      "memoryChanges": []
    },
    "instructionErrors": [
      {
        "index": 0,
        "message": "newValue mismatch",
        "x64dbg": "1bb099de2",
        "scemu": "1bb099de3"
      }
    ]
  },

x64dbg r11: 1BB09DE2F-> 1BB099DE2
scemu r11 1bb09de2f -> 1bb099de3
it make no sense the 3, but is what is getting from cpu.

3C > 16bits at the end this is an undefined behaviour (UB) that is reacting different.

hard coded