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.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;
}
0.5 is not int but a float value or double thats why it wont workI 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.