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 


speed hack source code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
justintcs
Cheater
Reputation: 0

Joined: 11 Sep 2012
Posts: 30
Location: Malaysia

PostPosted: Fri Sep 14, 2012 9:50 am    Post subject: speed hack source code Reply with quote

Guys , I found this somewhere else , isit Speed hack source ??
Code:

#include "stdafx.h"
#include <windows.h>
#include "detours.h"

#pragma comment(lib,"detours.lib")


bool speedhacking=false;
DWORD oldtGT=0;
DWORD (*timeGetTime_orig)(void);
DWORD timeGetTime_hooked(void)
{
   if(oldtGT==0)
   {
      oldtGT=(*timeGetTime_orig)();
      return oldtGT;
   }
   DWORD factor;
   DWORD ret;

   ret = (*timeGetTime_orig)();

   if(speedhacking == 1)
   {
      factor = 2.0;
      //factor = 3.0;
      //factor = 5.0;
   }
   else
   {
      factor = 1.0;
   }
   DWORD newret;
   newret = ret+((oldtGT-ret)*(factor-1));

   oldtGT=ret;
   return newret;
}

bool WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved )
{
   switch(dwReason)
   {   
   case DLL_PROCESS_ATTACH:
      timeGetTime_orig = (DWORD (__cdecl *)(void))DetourFunction((PBYTE)GetProcAddress(GetModuleHandle("winmm.dll"), "timeGetTime"), (PBYTE)timeGetTime_hooked);
   case DLL_PROCESS_DETACH:
      DetourRemove((PBYTE)GetProcAddress(GetModuleHandle("winmm.dll"), "timeGetTime"), (PBYTE)timeGetTime_hooked);
   }

   return TRUE;
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Sep 14, 2012 8:53 pm    Post subject: Reply with quote

It one of many ways to achieve speed hacking depending on how the application uses (if any) form of limiting.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
justintcs
Cheater
Reputation: 0

Joined: 11 Sep 2012
Posts: 30
Location: Malaysia

PostPosted: Sat Sep 15, 2012 10:33 am    Post subject: Reply with quote

When I activate it, the process will not responding, so anyway to fix it??
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