Reputation: 113
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?
Upvotes: 6
Views: 7830
Reputation: 932
A bit late, but although the Assemble dialog says "Invalid operand" if you know the bytecode you can use the Change byte... menu option instead. You could use OllyDbg to assemble to bytecode (select anywhere and hit space), then copy that into IDA's Change byte dialog as a workaround.
Upvotes: 2
Reputation: 13933
according to Hex Rays:
The assembler command is supported for only a few processors, only a few instructions. We do not plan to extend this feature, sorry
Lame, I know.
Upvotes: 7