//Freeze Timer
public void StartTimer(float duration, Action onTimedOut)
public void SpendCurrency(string currencyType, long amount)
{
return amount;
}
I could always learn from this guy even though what you did is simple corrections but it's fundamentally necessary, would love to see more of your info, i think there is a hidden gem there lolAlways great to see others sharing knowledge!
Couple tips for you
C#://Freeze Timer public void StartTimer(float duration, Action onTimedOut)
This function has the return type void, meaning it does not return anything, you dont need to use nop if you only want to exit the function, can simply use 1E FF 2F E1 on its own, having nop there makes no difference since the processor will see nop and skip it due to it being no operation and bx lr anyway.
A few of your other examples say to return values to the parameters, they are just data sent to the function that the function needs to do its work, you cant "return to a parameter" you can edit the values in the parameter in the current function but not "return to it" in the context you say in your post.
Your freeze currency hex is 02 00 a0 e1 1e ff 2f e1 which in arm is:
mov r0, r2
bx lr
and would translate in code to something like this:
C#:public void SpendCurrency(string currencyType, long amount) { return amount; }
SpendCurrency is a void function though, so it doesnt actually work like you expect it to since it cant return anything.
Hope that helps, Happy Modding!
Always great to see others sharing knowledge!
Couple tips for you
C#://Freeze Timer public void StartTimer(float duration, Action onTimedOut)
This function has the return type void, meaning it does not return anything, you dont need to use nop if you only want to exit the function, can simply use 1E FF 2F E1 on its own, having nop there makes no difference since the processor will see nop and skip it due to it being no operation and bx lr anyway.
A few of your other examples say to return values to the parameters, they are just data sent to the function that the function needs to do its work, you cant "return to a parameter" you can edit the values in the parameter in the current function but not "return to it" in the context you say in your post.
Your freeze currency hex is 02 00 a0 e1 1e ff 2f e1 which in arm is:
mov r0, r2
bx lr
and would translate in code to something like this:
C#:public void SpendCurrency(string currencyType, long amount) { return amount; }
SpendCurrency is a void function though, so it doesnt actually work like you expect it to since it cant return anything.
Hope that helps, Happy Modding!
Well yeah, if you are function hooking with a hook library, that takes care of allocating new memory with however much space you need and patching the original function to jump there to run your custom logic before jumping back to the original function after the jump. Which you can still do directly in arm in the binary, but you are limited to the size of the original function, if you do it directly in the binary you would have to find some free space, such as an unused function like a debug function or some junk the game doesn't use, then you could jump to that unused function write you logic there and jump back manually yourself. These days everyone on android is hooking since there are frameworks already and templates/ready to use code available.I try to do it hook the parameters, it's work for me
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies