I am attempting to patch a binary in IDA using the "Assemble" option, and every time I enter an instruction with some arithmetic to calculate the offset, I receive an Invalid Operand
error. For example:
mov [bp-4], bx
returns Invalid Operand
, while
mov ax, bx
works.
I've attempted playing around with the format of the instruction (eg include word ptr
, use 4h
, etc) but nothing seems to work. Is there any way about this error, or is entering byte code for patching the only option?
ebp
there, a pointer must be 32-bit one if you are in 32-bit mode and 64-bit value (rbp
) if it's long mode. – Tripletail