Is it possible to patch arm lib in a way that changes branch instruction calling one function to another function call?
I have instruction
and want change it to:
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
See this answer for details on how branch instructions are encoded on ARM. Here's what you should do:
Options->General->Number of opcode bytesto 4 (if it was 0 initially)
Binstruction to the destination, and verify that the displacement in the instruction matches what you expect.
Edit->Patch program->Change byteto modify the current instruction. IDA will update the display, so you can tell whether you've succeeded or not. If you haven't, keep messing with it until you get the bytes you want.
File->Produce file->Create .DIF file.