Help! Help to hook obscuredPrefs with method SetInt(String str, int value) from other method

Levy asaf

Platinian
Jan 15, 2022
23
3
3
17
Brazil
void ObscuredFloatHook(uint64_t location, float value){
int cryptoKey = *(int *)location;

/* use this intfloat to get the integer representation of our parameter value */
intfloat IF;
IF.f = value;

/* use this intfloat to generate our hacked ObscuredFloat */
intfloat IF2;
IF2.i = IF.i ^ cryptoKey;

*(float *)(location + 0xC) = IF2.f;
}
 

ZEFF_Hacker

Rookie
Jan 20, 2022
3
0
1
21
RU
void ObscuredFloatHook(uint64_t location, float value){
int cryptoKey = *(int *)location;

/* use this intfloat to get the integer representation of our parameter value */
intfloat IF;
IF.f = value;

/* use this intfloat to generate our hacked ObscuredFloat */
intfloat IF2;
IF2.i = IF.i ^ cryptoKey;

*(float *)(location + 0xC) = IF2.f;
}
I have seen this code more than once, and I can say for sure that it is erroneous, because... float is obtained, but as an integer. If the value is 0.5 or something like that, then the code does not want to work.
 

Francois284Modz

Awesome Active Platinian
Jun 10, 2018
188
2,447
193
26
france
I have seen this code more than once, and I can say for sure that it is erroneous, because... float is obtained, but as an integer. If the value is 0.5 or something like that, then the code does not want to work.
0.5 is not int but a float value or double thats why it wont work