QuestionReadProcessMemory C++

Posts 15 of 5 · Page 1 of 1
ReadProcessMemory C++
I'm trying to read the memory of a game based on Tibia, but I'm not having good results.

I was able to find the static address and the offset.
I can go on the Cheat Engine and manually write it as it reads the address.

Can someone help me ?
It can be C #, C ++ or VB.


Watch the tutorials on youtube for do it.
Code:
using handle = std::unique_ptr<std::remove_pointer_t<HANDLE>, decltype(&CloseHandle)>;

handle h_game(OpenProcess(game's pid, false, PROCESS_ALL_ACCESS), &CloseHandle);

std::uintptr_t& deref_address = 0;
ReadProcessMemory(h_game.get(), reinterpret_cast<void*>(0x00FBAAC0), &deref_address, sizeof(std::uintptr_t), nullptr);

double& health = 0;
ReadProcessMemory(h_game.get(), reinterpret_cast<void*>(deref_address + 0x388), &health, sizeof(double), nullptr);

std::printf("health: %d\n", health);
Youtube has really good C++ tutorials
You basicly need to read the module + base addres, and then for every single offset you need to read it into a variable and then read that variable + the next offset into a new variable and so on.
Posts 15 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?