Solved Trainer problem

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

skygen

Newbie
Full Member
Mar 12, 2013
7
172
0
I just don't know what is wrong with it!

C++:
#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <windows.h>


using namespace std;


DWORD FindDmaAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets[], DWORD BaseAddress)
{
	
	DWORD pointer = BaseAddress;             
	
	DWORD pTemp;

	DWORD pointerAddr;
	for(int i = 0; i < PointerLevel; i ++)
	{
			if(i == 0)
			{
				ReadProcessMemory(hProcHandle, (LPCVOID)pointer, &pTemp, 4, NULL);
			}
			
			pointerAddr = pTemp + Offsets[i];   

		
			ReadProcessMemory(hProcHandle, (LPCVOID)pointerAddr, &pTemp, 4, NULL);
	}
	return pointerAddr;
}


int main()
{
DWORD ProcessId;
DWORD buffer;
HANDLE h1;
BOOL R1;
DWORD ADDY = 0x69E0FAC;
DWORD ADDY2[3] = {0x54,0x14,0x7C};

    
HWND hWnd = FindWindow(NULL,"Empire Earth II");
if (hWnd) cout << "Window Found!" << endl;
else cout << GetLastError();

GetWindowThreadProcessId(hWnd,&ProcessId);

h1 = OpenProcess(PROCESS_VM_READ,false,ProcessId);
if (h1) {cout << "Process Opened!" << endl; }
else { cout << "OpenProcess: " << GetLastError << endl; }

cout << FindDmaAddy(3,h1,ADDY2,ADDY);

    getch();
    return 0;
}
40a5c80fbebc.jpg
It returns me 124!
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
Judging from a brief look.

You are going off the grid with finding the address. You only have to call the FindDmaAddy with first 2 offsets. Then add the last offset (0x7C) to the address which FindDmaAddy returned and read a value from that address :)

Edit:

So its

C++:
int nData = 0; // buffer for whatever you are reading
DWORD dwFinal = FindDmaAddy(2,h1,ADDY2,ADDY) + ADDY[2];
ReadProcessMemory(h1, (LPCVOID)dwFinal, &nData, sizeof(int), NULL);
 
Last edited:

skygen

Newbie
Full Member
Mar 12, 2013
7
172
0
Im doing it like this:
DWORD dwFinal = FindDmaAddy(2,h1,ADDY2,ADDY) + ADDY2[2];
ReadProcessMemory(h1, (LPCVOID)dwFinal, &pTemp, 4, NULL);
but it returns me some wrong value like 1964351738!
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
Im doing it like this:

but it returns me some wrong value like 1964351738!
Calculate those offsets manually to be sure your DMA function works properly.
 

skygen

Newbie
Full Member
Mar 12, 2013
7
172
0
Well, I obviously got problems with pointer reading. If I read 69E0FAC it should get me another pointer adress (07E20398), write?
 
Last edited:

Chuck E

Coder
Dank Tier Donator
Nobleman
Jan 2, 2013
122
588
1
Im doing it like this:

but it returns me some wrong value like 1964351738!
I just tried it out and it came up with an excessively long number like that. It turned out my code was not getting the process' handle properly. Actually, it wasn't getting the handle at all, so I have no idea what value was in that variable.

That FindDmaAddy function is exactly the same as from Fleep's tutorials, so should be fine.

Therefore, my guess, is that it may be that it is not acquiring the thread's process GetWindowThreadProcessId() and/or the process' handle OpenProcess()

I could be wrong, who knows :confused::eek::D
 
Last edited:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods