• 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
  • Sipping
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 5 of 5
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uNdead's Avatar
      Join Date
      Jan 2013
      Posts
      16
      Thanks (-->)
      0
      Thanks (<--)
      4

      [QUESTION] GetTickCount() Hook - Don't work

      How to Manual Map DLL
      Hey Guys, I tried to hook the the GetTickCount() function, so I can create a little speedhack (not for a online game)

      The Problem is that the DLL Injection works and I get the message that its attached but the Detour don't work :/ I never done anything like that because I normally only write external stuff xD does anybody know what I done wrong?

      [PHP]
      DWORD WINAPI GetTickCount_Detour(void);
      DWORD INITTICK = GetTickCount();

      DETOUR_TRAMPOLINE(DWORD WINAPI GetTickCount_Trampoline(void),GetTickCount);

      BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
      {
      switch(ul_reason_for_call)
      {
      case DLL_PROCESS_ATTACH:
      // WORKS
      MessageBox(NULL, "ATTACHED", NULL, MB_OK);
      DisableThreadLibraryCalls(hModule);
      DetourFunction((PBYTE)GetTickCount_Trampoline,(PBY TE)GetTickCount_Detour);
      break;

      case DLL_PROCESS_DETACH:
      MessageBox(NULL, "DETACHED", NULL, MB_OK);
      DetourRemove((PBYTE)GetTickCount_Trampoline,(PBYTE )GetTickCount_Detour);

      break;
      }
      return true;
      }

      DWORD WINAPI GetTickCount_Detour()
      {
      // NEVER COMES TO THIS POINT
      MessageBox(NULL, "DETOUR", NULL, MB_OK);

      DWORD CURRENTTICK = GetTickCount_Trampoline();

      return ( INITTICK + (CURRENTTICK - INITTICK) * 250 );

      }

      [/PHP]

      PASTEBIN LINK

      Thx
      Last edited by uNdead; 02-07-2013 at 02:24 PM.

    2. #2
      Newbie
      Learning to hack games!
       
      Feeling Normal
       

      Join Date
      Feb 2013
      Posts
      7
      Thanks (-->)
      0
      Thanks (<--)
      0
      pastebin is better.try it .

    3. #3
      Nick
      Learning to hack games!
       
      Feeling Normal
       

      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      it looks ok, how are you doing the hook in DetourFunction?

    4. #4
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uNdead's Avatar
      Join Date
      Jan 2013
      Posts
      16
      Thanks (-->)
      0
      Thanks (<--)
      4
      Quote Originally Posted by ndani14 View Post
      it looks ok, how are you doing the hook in DetourFunction?
      You mean the code behind DetourFunction or how exectly I try to use the function in this Example?
      Last edited by uNdead; 02-07-2013 at 02:31 PM.

    5. #5
      Nick
      Learning to hack games!
       
      Feeling Normal
       

      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      Cheat Engine Tutorials
      yeah the rest looks ok, so there might be something wrong in that?

    Similar Game Hacker Threads

    1. [Tutorial] How To Hook
      By Solaire in forum Game Hacking Tutorials
      Replies: 12
      Last Post: 07-31-2016, 09:31 AM
    2. [Help] DIRECT3D hook vs OPENGL hook
      By blergmasta in forum Direct3d OpenGL & Graphics APIs
      Replies: 3
      Last Post: 03-25-2016, 10:18 PM
    3. [Help] PointBlank Hook
      By ddikere in forum C/C++
      Replies: 2
      Last Post: 08-07-2015, 10:42 PM
    4. [Help please] WriteProcessMemory hook
      By till0sch in forum C/C++
      Replies: 12
      Last Post: 04-15-2013, 02:52 PM

    Tags for this Thread