so I have a question regarding the assembly instructions ror and rol:
Is it possible to properly reverse them? So assuming I have something like

ROR        EDX, 0x4

and know the contents of EDX after this instruction, is it mathematically possible to find out the initial value of EDX? If so, can anyone explain to me how it's done?
Sadly I couldn't find any good answer to this so far, so I would be really happy if someone could help me with this :)


For ror/rol you just use the reverse operation - rol/ror as bits are rotated - nothing is lost.

0xdeadbeef rol 5 -> 0xd5b7ddfb

0xd5b7ddfb ror 5 -> 0xdeadbeef

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.