• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 11
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      H4rtzer's Avatar
      Join Date
      Apr 2013
      Posts
      6
      Thanks (-->)
      1
      Thanks (<--)
      0

      [c++] BasePointer "Game.exe + offset"

      Silent VPN
      Hey!

      I often found a BasePointer which was not an address. For instance for the windowsgame "Solitair".The Base I found was something like solitaire.exe+BAFA8. In this case solitaire.exe is variable and so I always get a new base address after each start of solitaire. How can I handle that.

      Thanks Guys!

    2. #2
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      External GetModuleBaseAddress

    3. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      H4rtzer's Avatar
      Join Date
      Apr 2013
      Posts
      6
      Thanks (-->)
      1
      Thanks (<--)
      0
      Ahh thanks! I often heard something about this function. Can you give a code example please?

    4. #4
      RTFM
      Shootin Pool!
       
      Coding
       
      Syperus's Avatar
      Join Date
      Oct 2012
      Location
      127.0.0.1
      Posts
      436
      Thanks (-->)
      101
      Thanks (<--)
      131
      You can use:

      Code:
      static 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;
      		}
      This will return the game base address. Usage example for this:
      Code:
      DWORD BaseAddress= dwGetModuleBaseAddress(pID, _T("GameName.exe"));
      pID would be the processID incase you didnt' know.
      Blacks Ops Zombies, BioShock Infinite Array of Bytes
      "People say I'm a bad influence. I say the world's already fucked, I'm just adding to it" -Eminem

    5. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      H4rtzer's Avatar
      Join Date
      Apr 2013
      Posts
      6
      Thanks (-->)
      1
      Thanks (<--)
      0
      Is GetModuleAddress not included in windows.h? Or is it necessary to define this function on myself?

    6. #6
      RTFM
      Shootin Pool!
       
      Coding
       
      Syperus's Avatar
      Join Date
      Oct 2012
      Location
      127.0.0.1
      Posts
      436
      Thanks (-->)
      101
      Thanks (<--)
      131
      Quote Originally Posted by H4rtzer View Post
      Is GetModuleAddress not included in windows.h? Or is it necessary to define this function on myself?
      You need to include the TlHelp32.h header file for the snapshot. Go ahead and include tchar.h as well since you'll need that using the example.

      Code:
      #include <tchar.h>
      #include <TlHelp32.h>
      Blacks Ops Zombies, BioShock Infinite Array of Bytes
      "People say I'm a bad influence. I say the world's already fucked, I'm just adding to it" -Eminem

    7. #7
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      H4rtzer's Avatar
      Join Date
      Apr 2013
      Posts
      6
      Thanks (-->)
      1
      Thanks (<--)
      0
      The Function "DWORD BaseAddress= dwGetModuleBaseAddress(dwProcessID, _T("Solitair.exe"))" returns always 0. The parameter dwProcessID is fine. If its not" _T("Solitair.exe")" the function dwGetModuleBaseAddress is not working. I´m desparade soon^^!

    8. #8
      RTFM
      Shootin Pool!
       
      Coding
       
      Syperus's Avatar
      Join Date
      Oct 2012
      Location
      127.0.0.1
      Posts
      436
      Thanks (-->)
      101
      Thanks (<--)
      131
      dwGetModuleBaseAddress works fine. What type of project is this (dll, console, form ect.). Post your code in code tags so I can see exactly what you're doing.
      Blacks Ops Zombies, BioShock Infinite Array of Bytes
      "People say I'm a bad influence. I say the world's already fucked, I'm just adding to it" -Eminem

    9. Thanks H4rtzer thanked for this post
    10. #9
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      H4rtzer's Avatar
      Join Date
      Apr 2013
      Posts
      6
      Thanks (-->)
      1
      Thanks (<--)
      0
      I created a console application for that(32bit I think). I uses win7 64bit and Bisual Studio 2010 as IDE.

      Code:

      #include <Windows.h>
      #include <stdio.h>
      #include <iostream>
      #include "GetModuleBaseAddress.h"
      #include <tchar.h>

      PCSTR WindowlName = "Solitär";
      int main()

      HWND hWindow = 0;
      hWindow = FindWindow(NULL, WindowName);
      DWORD dwProcessID = -1;
      GetWindowThreadProcessId(hWindow, &dwProcessID);
      HANDLE hProzessHandle = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, false, dwProcessID);
      std::cout << "\nhWindow: " << hWindow << " \nPID: " << dwProcessID << " \nProzessHandle: " << hProzessHandle << std::endl;
      DWORD BaseAddress= dwGetModuleBaseAddress(dwProcessID, _T("Solitair.exe")); //function renamed...also in Header of course
      std::cout << "BaseAddress: "<<BaseAddress <<std::endl;

      return 0;
      }

      Thanks Syperus for supporting me in this problem with such a high level of quality. Thanks!
      Last edited by H4rtzer; 04-10-2013 at 11:49 AM.

    11. #10
      RTFM
      Shootin Pool!
       
      Coding
       
      Syperus's Avatar
      Join Date
      Oct 2012
      Location
      127.0.0.1
      Posts
      436
      Thanks (-->)
      101
      Thanks (<--)
      131
      Silent VPN
      Just at a quick glance I see a few things wrong.

      Code:
      #include "GetModuleBaseAddress.h"
      What's in GetModuleBaseAddress.h? Did you define dwGetModuleBaseAddress() in here? If so and if that's all you defined in there then just remove it and define it in your main.cpp file (or whatever you named yours). It's also good practice to declare functions before int main() that are defined in a header to ensure an error free program. It's required if you define a function after int main().

      You need to include <TlHelp32.h> for the CreateToolhelp32Snapshot function in dwGetModuleBaseAddress.

      Code:
      int main()
      You need to have an open bracket "{" after int main().

      Code:
      HWND hWindow = 0;
      hWindow = FindWindow(NULL, WindowName);
      WindowName needs to be the actual name of the Window. I.E. Solitair. Also it's pointless to create/define hWindow as 0 and then redefine it in the next line. This isn't wrong and will work, but just pointless in this situation.

      I'm going to be on my phone most of the day, but will be checking in from time to time. Try these fixes and see if that helps your problem. I'm working on a project with another member, but if you're still having problems when I get home I'll see if I can quickly debug your program if you still need assistance.
      Blacks Ops Zombies, BioShock Infinite Array of Bytes
      "People say I'm a bad influence. I say the world's already fucked, I'm just adding to it" -Eminem

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. "Other" Game Hack Rules
      By Crazywink in forum Other Game Hacks
      Replies: 0
      Last Post: 01-19-2015, 11:31 PM
    2. [Help] Writing Offset in ""common.dll"+13F3CC" by injection
      By Icew0lf in forum Hacking Help
      Replies: 25
      Last Post: 09-16-2014, 09:51 AM
    3. Replies: 9
      Last Post: 05-30-2012, 04:30 PM

    Tags for this Thread