Jump to content
  • 0

How can i edit this instruction?


nok1a
 Share

Question

I'm not sure what can be done with this instruction. What are the options to which i can edit it, like bool or making it negative value..etc:

image.thumb.png.4d1b65b7d5e804e2fe36d4a7277dc66b.png

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
17 hours ago, nok1a said:

I'm not sure what can be done with this instruction. What are the options to which i can edit it, like bool or making it negative value..etc:

image.thumb.png.4d1b65b7d5e804e2fe36d4a7277dc66b.png

You can edit that

Link to comment
Share on other sites

  • 0

Hi @nok1a, are you refer to "STR" instruction?:

  • STR: is intended to STORE Register, an opposite of LDR (LOAD Register)
  • X21: is destination of the Register to Store, which X is for 64-bit or W for 32-bit
  • SP: is Stack Pointer, a Register that's mostly hold temporary variable
  • #0x30: is the Offset from SP
  • ! : Writeback syntax: will writes the address (and offset) into itself.

Thus we know, the value from the Stack Pointer is 64-bit, but we don't know what's the value to be specific. Thus you can directly edit the current X21 with immediate value:

MOV X21, #0 --for values
MOV X21, 0x123 --for address

I also wasn't sure what X21 is containing, it might be some address through ADRP, or else.

Link to comment
Share on other sites

  • 0

It can be edited to any valid instruction, if it's a part of modification that overwrites function's original code with custom code. Which meaningful options for modification there are in particular case depends on intended change of behavior, what targeted function does, amount and types of it's parameters and type of it's returned value.

Link to comment
Share on other sites

  • 0

@nok1a if the game uses LIBC you can hook that function and reverse engineer the arm code using FRIDA to see each registers values and what it does after that you can also edit the arm code inspot to see the changes

Edited by XEKEX
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.