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 


Base address of minesweeper

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

Joined: 05 Sep 2012
Posts: 9

PostPosted: Wed Sep 05, 2012 4:03 pm    Post subject: Base address of minesweeper Reply with quote

Hi all,

I have been trying to hack the time in minesweeper for windows 7. I have followed the pointers through using cheat engine and have arrived at minesweeper.exe + AAA38 which seems to be the static pointer for the time address.

My question is how to I go about finding the base address of minesweeper.exe so I can put this hack into code?

Cheers,

Loz.
Back to top
View user's profile Send private message
n0 m3rcY
Cheater
Reputation: 0

Joined: 18 Jun 2012
Posts: 42

PostPosted: Wed Sep 05, 2012 9:22 pm    Post subject: Reply with quote

I'm hoping you'll actually read the description behind the code and not just c+p it, but here goes: (sorry it's in my class format so you'll have to fix that).

You'll need to have CreateToolhelp32Snapshot to get the current processes. Then, you'll create a module snapshot of the process and look for your process name. You can skip the search of the snapshot and just use Process32Next() after Process32First() if you already know the PID from your trainer but doing it this way will let you also get .dlls (ie xlive.dll). You then just loop through and compare the modulenames to your name. The MODULEENTRY32 struct you fill will contain the base address of the module (your game) and you can use that. It also contains a lot of useful things like allocated size, zero terminated string path to file, and a couple other stuff. Look at it Wink

Code:
/*
    Function:    GetMod64BaseAddress()
       Input:    Window name, process name
Description:    Gets the base address of an x64 process
*/
DWORD_PTR tAZTRAINER::GetMod64BaseAddress(const wchar_t *ProcessName)
{
    HANDLE hSnap;
    PROCESSENTRY32 pe = {0};
    MODULEENTRY32 me = {0};
    HANDLE hMod;

    hSnap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
    if (hSnap==INVALID_HANDLE_VALUE)
         return 1;

    pe.dwSize=sizeof(pe);
    if (Process32First(hSnap, &pe))
        do {
            hMod=CreateToolhelp32Snapshot(TH32CS_SNAPMODULE|TH32CS_SNAPMODULE32, pe.th32ProcessID);

            me.dwSize = sizeof(me);
            if (Module32First(hMod, &me))
                do{
                    if(_wcsicmp(me.szModule, ProcessName) == 0)
                    {
                        CloseHandle(hMod);
                        CloseHandle(hSnap);
                        return (DWORD_PTR)me.modBaseAddr;
                    }
                } while (Module32Next(hMod, &me));
          } while (Process32Next(hSnap,&pe));
    if(hSnap != INVALID_HANDLE_VALUE)
        CloseHandle(hSnap);
    if(hMod != INVALID_HANDLE_VALUE)
        CloseHandle(hMod);
}
Back to top
View user's profile Send private message
nerozero
How do I cheat?
Reputation: 0

Joined: 05 Sep 2012
Posts: 9

PostPosted: Wed Sep 05, 2012 10:39 pm    Post subject: Reply with quote

thanks for this, I will have a play later!
Back to top
View user's profile Send private message
dabura667
Advanced Cheater
Reputation: 0

Joined: 28 Aug 2012
Posts: 72

PostPosted: Fri Sep 07, 2012 12:26 am    Post subject: Reply with quote

How would I go about controlling which squares are mines... I want to draw pictures with the mine flags and have it be correct.
Back to top
View user's profile Send private message
nerozero
How do I cheat?
Reputation: 0

Joined: 05 Sep 2012
Posts: 9

PostPosted: Mon Sep 10, 2012 4:27 am    Post subject: Reply with quote

cheers for the above I ended up coding it in C# as you can do the above in 2 lines and I wanted a pretty GUI Smile
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 Gamehacking 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