View previous topic :: View next topic |
Author |
Message |
rhino-du How do I cheat?
Reputation: 0
Joined: 02 Dec 2013 Posts: 2
|
Posted: Mon Dec 02, 2013 3:51 pm Post subject: Problem by finding Base Address |
|
|
Hello,
i want to find the base address by using c++. Maybe there is any mistake, but there is allways the wrong address:
I get this address 0x01340000 but the right address is 0x66ADB000.
Code: | #include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <TlHelp32.h>
#pragma comment(lib, "user32.lib")
#pragma comment( lib, "psapi" )
using namespace std;
DWORD dwGetModuleBaseAddress(DWORD dwProcessIdentifier, TCHAR *lpszModuleName)
{
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessIdentifier);
DWORD dwModuleBaseAddress = 0;
if(hSnapshot != INVALID_HANDLE_VALUE)
{
MODULEENTRY32 ModuleEntry32 = {0};
ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
if(Module32First(hSnapshot, &ModuleEntry32))
{
do
{
if(_tcscmp(ModuleEntry32.szModule, lpszModuleName) == 0)
{
dwModuleBaseAddress = (DWORD)ModuleEntry32.modBaseAddr;
break;
}
}
while(Module32Next(hSnapshot, &ModuleEntry32));
}
CloseHandle(hSnapshot);
}
return dwModuleBaseAddress;
} |
Thank you for your help!
Greetings from germany[/code]
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Mon Dec 02, 2013 4:53 pm Post subject: |
|
|
0x66ADB000 is an impossible address for a module base. (wrong alignment for a module)
I recommend rechecking what you actually are looking for
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
zm0d Master Cheater
Reputation: 7
Joined: 06 Nov 2013 Posts: 423
|
Posted: Mon Dec 02, 2013 4:59 pm Post subject: |
|
|
Hmmm I'm very tired and my eyes are burning but perhaps your flag in CreateToolhelp32Snapshot is wrong (TH32CS_SNAPMODULE).
Are you sure that your error comes from this piece of code? Are you doing any calculation on the the "base address"? Well, I guess you mean your PEB-base-address? How did you find out, that the address is 0x01340000?
If you're using an injected DLL use GetModuleHandle(0) to find your PEB base address. If you're outside the games process, try to debug your application step by step.
|
|
Back to top |
|
 |
rhino-du How do I cheat?
Reputation: 0
Joined: 02 Dec 2013 Posts: 2
|
Posted: Mon Dec 02, 2013 5:13 pm Post subject: |
|
|
I have found 30 addresses in cheat engine that i have to rewrite in unregular periodes in combination with midi signals, but everytime i start the programm they get other addresses.
I don't know how i can get these, like in cheat engine but i have to do this in c++.
|
|
Back to top |
|
 |
|