|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
fluffy2232 How do I cheat? Reputation: 0
Joined: 19 May 2020 Posts: 2
|
Posted: Tue May 19, 2020 10:10 pm Post subject: Can't find static address for my own dummy c++ game. |
|
|
Hello there guys. I created a dummy game to practice with game trainers.
This is how the game works. You start with 50 lives. It will generate a random number.
Then, you will keep guessing the number. Each time you miss, you will loose a life.
So, I am able to find the dynamic address and change the lives...
If I do a pointer scan, it will find ThreadStack address, instead of my module's.
If I find what writes to, or access the address, it will find, for example:
mov eax,[ebp-18]
copy memory: The value of the pointer needed to find this address is probably 00AFFBA4 ... <<< This is the EBP address...
If I try to add an address module.exe+00affba4 with offset 18 or -18, it finds nothing.. it finds ?? ...
If I do pointer scanner, it will find a whole bunch of threadstack modules with offsets...
Then, if I go into advanced options and untick include system modules, and or, allow stack addresses, and or, only find paths with static address... It will find some, but then if tried every address it found with find out what accesses this address... and nothing....
I mean, these technique used above all worked with assault cube...
Does it maybe have to do with the version of c++ I am using? Or maybe because I have optimization enabled / disabled?
Thanks guys!
This is the full code (made in visual studio 2019)
Code: |
#include <iostream>
#include <ctime>
#include <windows.h>
int main()
{
srand(time(0));
//std::cout << srand << std::endl;
long randomNumber = rand();
long lifes = 50;
//std::cout << (randomNumber) << std::endl;
long number = (randomNumber % 100) + 1;
//Sleep(3000);
while (true)
{
int guess;
std::cout << "Guess a number" << std::endl;
std::cin >> guess;
if (lifes)
{
if (guess > number)
{
system("cls");
std::cout << "too high" << std::endl; lifes--;
std::cout << "You have " << lifes << " lifes left" << std::endl;
}
if (guess < number)
{
system("cls");
std::cout << "too low" << std::endl; lifes--;
std::cout << "You have " << lifes << " lifes left" << std::endl;
}
if (guess == number)
{
system("cls");
std::cout << "You got it ! " << guess << " is the right number" << std::endl;
std::cout << "You have " << lifes << " lifes left" << std::endl;
break;
}
}
else
{
std::cout << "You have died... You have " << lifes << " lifes left" << std::endl;
}
continue;
}
}
|
Last edited by fluffy2232 on Wed May 20, 2020 5:08 pm; edited 1 time in total |
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
Posted: Tue May 19, 2020 10:48 pm Post subject: |
|
|
You declared the variables in a function - i.e. main. Variables declared in functions reside on the stack. There is no path starting from the exe- it all resides in a thread's stack. You're searching for something that doesn't exist.
Usually the first bit of memory in the stacks of the first few threads can be treated as if they're static. This is one of those cases.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
fluffy2232 How do I cheat? Reputation: 0
Joined: 19 May 2020 Posts: 2
|
Posted: Tue May 19, 2020 11:41 pm Post subject: |
|
|
ParkourPenguin wrote: | You declared the variables in a function - i.e. main. Variables declared in functions reside on the stack. There is no path starting from the exe- it all resides in a thread's stack. You're searching for something that doesn't exist.
Usually the first bit of memory in the stacks of the first few threads can be treated as if they're static. This is one of those cases. |
THank you so much! I will try that tomorrow and share my experience!
Also, lets say I did declare it in a function, is there a way to find it's static address ?
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|