Originally Posted by
FAISAL32
This speed function's a real pain bro but hey it worked out in the end
The speed function here's totally different from the speed in Black Magic
MS change in BM was too easy. Just for explanation: u take 4 bytes of value in Float type as Integer (32b) and xor them by key (+0x218 to stats pointer) (translation to Integer becuz FPU doesn't have XOR instruction, so u need to store float in CPU register at first). Now just write it to memory.
Something like this in cpp:
Code:
float speed;
unsigned int encryptedValue = *((unsigned int*)&speed) ^ encryptionKey;
WriteUInt(..., encryptedValue);
Changing module memory for it not stable (cuz of changable speed), so better not to use it.