I've been trying to learn game hacking and I managed to make a hack for AssaultCube which had int addresses and the static addresses were easy to find. Now I've taken one of the offline games to try to make a simple hack for it (money and level). But when I was trying to find the static address I noticed they are longer than the ones in AssaultCube. I tried to use my modified function for reading where the address points, but as the result I always get 0.
Here is my function:
Code:
private long ReadLong(long Address)
{
byte[] buffer = new byte[sizeof(long)];
int bytesToRead = 0;
ReadProcessMemory(ProcessHandle(), Address, buffer, buffer.Length, ref bytesToRead);
MessageBox.Show(buffer[0].ToString());
unsafe
{
fixed (byte* p = &buffer[0])
{
return *(long*)p;
}
}
}
and here are the addresses I found:
Also I'm wondering what is this static address? How do I check where that points to?
Worth to mention that I got a System Access Violation Exception if i didn't run the code as 64x.