How do I get the 8B 45 FC
corresponding to the mov eax, [rbp+var_4]
etc. via idapython?
I did not come up with a better solution than
- Getting the instruction via
idautils.DecodeInstruction()
- Getting the instruction's size in bytes
- Looping over all bytes of the instruction and fetching the content via
idc.Byte()
Is there a better solution, e.g. an api call (which I did not find)?