Age of mythology

Posts 1–7 of 7 · Page 1 of 1
Age of mythology
Just made a really quick population hack for age of mythology the titans. I know the game is old but I wanted to play it again, so for everyone new to hacking, you can use this to start.

I used it on age of mythology the titans (cracked version)

Code:
#include <windows.h>

#define BaseAddr 0x8000034
#define SmalLeap 0x100

bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask){
	__try{
        for(;*szMask;++szMask,++pData,++bMask){

			if(*szMask=='x' && *pData!=*bMask){  
                       return false;
			}
		}

		 

	   } __except(1){
			return false;
	   }

return (*szMask) == NULL;
}

  

DWORD FindPattern(DWORD dValor,DWORD dLer,BYTE *bMaskara,char * szMaskara){


	for(DWORD i=0; i < dLer; i += SmalLeap ){
		__try{

			if( bCompare( (BYTE*)( dValor+i ),bMaskara,szMaskara) ){
					return (DWORD)(dValor+i);
			}
		}__except(1){
			i += SmalLeap;
		}

	}
       return false;
}					//	  	?   x   x   x   x   x   x   x
						 
char* SuperBulletsSig = "\xE3\xD7\xD1\xEB\x05\x7A\xC6\xAC"; 
char* Bytes = "\xE6\xD7\xD1\xEB";

void MainThread();


BOOL APIENTRY DllMain( HANDLE hModule, DWORD  fdwReason, LPVOID lpReserved ){

		
	if( fdwReason == DLL_PROCESS_ATTACH){
       CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&MainThread, NULL, NULL, NULL);
	   
	}
		

	

    return TRUE;
}

void MainThread(){

long* Population = (long*)FindPattern(BaseAddr, 0xFFFFFFFF, (BYTE*)SuperBulletsSig, "?xxxxxxx");

	MessageBox(NULL, "Found the address!", "SCHiM", MB_OK);

	if( Population != NULL ){
	
		while(1){

				if(GetAsyncKeyState(VK_INSERT)){
				
					memcpy((void*)Population, (void*)Bytes , 0x4);


				}
				Sleep(100);
			
		}

	}


return;
}
GL hf

EDIT:

Signature is wrong, should be: ?xxx?xxx

inject while playing, every time you press insert the hack resets your total population to 0
Might as well drop the first byte from the sig if it is unknown
Quote Originally Posted by Hell_Demon View Post
Might as well drop the first byte from the sig if it is unknown
But then the address would be of by 1 And that would defeat the purpose now would it
Quote Originally Posted by .::SCHiM::. View Post
But then the address would be of by 1 And that would defeat the purpose now would it
Substracting 1 from the returned address is faster then having the correct count alternating between 1 and 0 and checking every byte twice
But I guess both will do since speed is not a problem here
Lol "SuperBulletsSig" for a population signature. GG.
Quote Originally Posted by Jason View Post
Lol "SuperBulletsSig" for a population signature. GG.
Yea, you know the ancient way of C programmers The code originally came from an old hack for Combat arms now it's put back to good use
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?