@
noname_2 are you injecting? you said " *(int*)0x000 = 0; "
do you know about Windows Virtual Memory Management? Each process has it's own memory.
If you ran " *(int*)0x000 = 0;" in your own C++ code, the address would be local to your program.
You need to use the Windows API OpenProcess() and ReadProcessMemory() -- unless you are injecting code and running raw asm. if so, how are you injecting dll in C++?
*(DWORD*)((*(DWORD*)SpeedHack) + 0x20) = ****
^^this refers to a memory location. And sets it's value to ****. (I hate C++ pointer syntax)
Basically it's reading a few pointers (one after the other) and setting the value at the final address
it could be re-written
Code:
var1 = *(SpeedHack)
var2 = *(Var1)
var3 = *(Var2 + 0x20)
*var3 = ****
Something like that. (where * is the C++ operator to 'get the value' at a pointer) I'm not quite sure on syntax etc. Take with a grain of salt.
0x20 is an offset. Basically the distance between some variable and it's parent structure (and how they align in ram) The game's source code has something like: A 'player' class, and inside that class is a 'speed' variable --> the compiler has to put them both somewhere -- 0x20 is their distance apart, in ram, calculated via the compiler. You must be able to use a debugger/semi-understand asm to find offsets yourself, it's all just a matter of looking at the game's actual source code.
It's as easy as finding important addresses(health, ammo, etc) (with memory scanner) then finding where in the game code those addresses are accessed (ie *healthLoc = newValue) -- WriteProcessMemory() to change game code to suite own needs. Or just WriteProcessMemory() to put new values into health,ammo, etc. --game may have anti-cheat checks.
edit: if you're not injecting, that line of code wouldn't affect the game process :/ ie. lie?
edit2: the 0x20 part was simplified --> since 0x20 is so small, it's probably actually part, not of the player class, but some other class (or struct!): and then the 'player' class has a private variable of that new class/struct. Since it's reading a couple pointer's it looks more like
Code:
allGameData= 0x11223344 // just an example!
playerData = *(allGameData + 5000) //5000 is arbitrary, see comment below.
playerPosData = *(player + 100) //(again, the 100 all depends on the class's size in ram(how many private variables it has) /compiler implementation)
playerSpeed = *(playerPosData + 0x20)
*playerSpeed = 1000 //1000 = fast? lol
^^there was only one offset in original example, and several pointers. Just an example using more offsets.
edit3:
Code:
*(DWORD*)((*(DWORD*)SpeedHack) + 0x20) = 0x46A29CE8;
^^is actually changing it's value to a new memory loc? Basically telling the game..
"no, player.Speed isn't stored where you thought, it's at 0x46A29CE8". or something close to that. maybe.