Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


scanning aob's in c++

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kid9987
How do I cheat?
Reputation: 0

Joined: 12 Jan 2012
Posts: 8

PostPosted: Sun Feb 19, 2012 12:38 pm    Post subject: scanning aob's in c++ Reply with quote

well, ive been calling memory by using this

Code:

BYTE EnableTestBytes[9]      = "\x00\x00\x00\x00\x00\x00\x00\x00";
BYTE DisabeTestBytes[9]      = "\x00\x00\x00\x00\x00\x00\x00\x00";
DWORD TestHackAddy = 0x00700370;


though theres a hack i want to add to my trainer but the address for the set of bytes changes everytime i restart the game client, i want to know if theres anyway i can just have my trainer scan the bytes and change them from the address found after scanning o_o
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sun Feb 19, 2012 12:50 pm    Post subject: Reply with quote

You can use the well known pattern comparing stuff:

Code:

BOOL MaskCheck( const BYTE* lpData, const BYTE* lpPattern, const char* szMask )
{
   for( ; *szMask; ++szMask, ++lpData, ++lpPattern )
      if( *szMask == 'x' && *lpData != *lpPattern )
         return FALSE;
   return (*szMask) == NULL;
}

DWORD _FindPattern( BYTE* btPattern, char* szMask )
{
   MODULEENTRY32 me32;
   memset( &me32, 0x0, sizeof( MODULEENTRY32 ) );

   // scan for your module here that you want to look
        // for the pattern inside of..

   for( DWORD x = (DWORD)me32.modBaseAddr; x < (DWORD)( (DWORD)me32.modBaseAddr + me32.modBaseSize ); x++ )
      if( MaskCheck( (BYTE*)x, btPattern, szMask ) )
         return ( x );
   return 0;
}

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
kid9987
How do I cheat?
Reputation: 0

Joined: 12 Jan 2012
Posts: 8

PostPosted: Sun Feb 19, 2012 5:45 pm    Post subject: Reply with quote

can you give me some implementation examples? ie ; checkboxe events in which it'd scan for the aob and change it
Back to top
View user's profile Send private message
kid9987
How do I cheat?
Reputation: 0

Joined: 12 Jan 2012
Posts: 8

PostPosted: Mon Feb 20, 2012 1:47 pm    Post subject: Reply with quote

kid9987 wrote:
can you give me some implementation examples? ie ; checkboxe events in which it'd scan for the aob and change it

bump
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites