How to tell friend from foe - tomvita/Breeze-Beta GitHub Wiki
- Quite often code reuse cause the code that targets Friend to also targets Foe.
- When you can't find an alternative that only target one or the other a method to tell friend or foe is needed
Look at the value of X30
Some times the X30 is distinct between friend or foe. First enable X30 match to see if the access is now distinct between friend or foe. If it is then job done and can proceed to make ASM hack with X30 match
Look at return address on the stack
WIP
Look at the pattern around the data value
There isn't a generic way, the guess may turn out to be no good at some stage of the game