Additional Info
|
In flash say I want to eliminate everything a function does.
I know I could nop it all out, and that has worked for me. But to save time could I just replace the 1st part of it with a return void? If so is there any way the code after the return could ever run? |
Additional Info
|
Making the function return void stops the function in the point where it returns, though I'm not sure how it behaves if you return void in a non-void returning function.
Supposing it always works, then the code after the return NEVER runs. |
Additional Info
|
return is always halting, so provided the return is not the antecedent of a conditional branch - ie the return can always be reached - , then no, there is no condition under which successive instructions will be processed.
ie if you replace the beginning of the code say d0 30 24 00 with d0 30 47 00 then nothing after the 47 (return void) will execute. note: make sure you match your return types. I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it. |
Additional Info
|
Thanks guys!
|
Additional Info
|
You can wipe out the d0 30; as you're just immediately returning from the function, which'll reset the stack; it matters not whether the parameters are valid.
This is one of my favourite ways of doing invulnerability hacks. |