Most speed hacks for WoW seem to be related to packet injection, either through a patched winsock provider or by calling WoW's packet functions directly via code injection. This seems a somewhat awkward method of doing things.
What I think might be a (better?) way to do it is by hooking calls to GetTickCount and returning a fake result. Cheat Engine utilises this trick for its speed hack. Here's some pseudo code to describe the math:
Code:
long initTicks = 0;
float multiplier = 1.0f;
public void StartSpeedHack()
{
initTicks = GetTickCount();
InstallHook();
}
public long GetFakeTickCount()
{
float tc = (long)Math.Round((float)(GetTickCount() - initTicks) * multiplier);
}
What I can't work out is the best way to approach the hook itself in managed code. I've read in many places that global system hooks are impossible in managed code. Is it possible to inject code for a fake GetTickCount and then patch all calls to it at runtime so that they go to the fake method instead of the real imported one?
If it is possible to just alter the calls in the process memory, since a call to an extern (0x15FF) is different to a standard call (0xE
are there any ramifications of replacing such values?