| View previous topic :: View next topic |
| Author |
Message |
jeromerocks How do I cheat?
Reputation: 0
Joined: 27 Mar 2007 Posts: 2
|
Posted: Sun Oct 12, 2008 11:05 pm Post subject: Delphi APIs |
|
|
Hi,
I read that I needed to hook GetTickCount, timeGetTime and QueryPerformanceCounter to make a speed hack. But now I'm stuck as to how to code one in delphi.
I can code a process list on a delphi form, but how do I make it like CE, ie the user selects the process and then he can set the speed at which the program runs.
Could anyone help me out?
Thanks a lot! |
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Sun Oct 12, 2008 11:40 pm Post subject: |
|
|
if you already know the API's go to http://msdn.microsoft.com/en-us/library/default.aspx
try to learn yourself something instead of asking for a code. if you really want help to be a better programmer ask real questions but if you dont wanna learn keep going
tip
if you cant fix it try to make an easier project and work your way up until you know how to do it _________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
jeromerocks How do I cheat?
Reputation: 0
Joined: 27 Mar 2007 Posts: 2
|
Posted: Mon Oct 13, 2008 12:36 am Post subject: |
|
|
Sorry.
I know the APIs but I don't know what to do with them. I'm not begging for the code, I just wish that someone would explain in words, not pascal code, what I should do with the APIs.
Thanks for your reply anyway. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Mon Oct 13, 2008 12:39 am Post subject: |
|
|
Write a dll that has alternate versions of those apis and inject it into the target process
In the dll, or using writeprocessmemory, change the first 5 bytes of the original api functions with a jmp to each alternate function _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Mon Oct 13, 2008 2:22 pm Post subject: |
|
|
You redirect execution flow when an application calls the API. The code will be redirected to your code, where you can modify the results and such. Here's a sample:
| Code: |
__declspec(naked) DWORD WINAPI _GetTickCount(void)
{
__asm
{
mov edi, edi
push ebp
mov ebp, esp
jmp [GetTickCount_R] //GetTickCount + 5
}
}
DWORD WINAPI __GetTickCount(void) //Hook procedure
{
DWORD RET;
RET = _GetTickCount(); //_GetTickCount() is a trampoline
RET *= 2; //twice as fast
return RET;
}
[/code
That's the hook procedure. Now, you need to install an inline hook at GetTickCount, which basically is a unconditional jump to __GetTickCount. Then, you need to make a trampoline. |
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Mon Oct 13, 2008 2:31 pm Post subject: |
|
|
| rapion124 wrote: | You redirect execution flow when an application calls the API. The code will be redirected to your code, where you can modify the results and such. Here's a sample:
| Code: |
__declspec(naked) DWORD WINAPI _GetTickCount(void)
{
__asm
{
mov edi, edi
push ebp
mov ebp, esp
jmp [GetTickCount_R] //GetTickCount + 5
}
}
DWORD WINAPI __GetTickCount(void) //Hook procedure
{
DWORD RET;
RET = _GetTickCount(); //_GetTickCount() is a trampoline
RET *= 2; //twice as fast
return RET;
}
|
That's the hook procedure. Now, you need to install an inline hook at GetTickCount, which basically is a unconditional jump to __GetTickCount. Then, you need to make a trampoline |
You already made the trampoline, _GetTickCount. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Oct 13, 2008 2:35 pm Post subject: |
|
|
That wouldn't be twice as fast.
Instead of going: 1 2 3 4 5 6 7 8 9 10...
It would be: 1 2 4 8 16 32 64 128 256 512... |
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Mon Oct 13, 2008 2:47 pm Post subject: |
|
|
| Code: |
int vs = 2;
int add;
void __declspec(naked) __stdcall hook()
{
add++;
GetTickCount();
_EAX += add;
_asm ret;
}
|
_________________
Gone |
|
| Back to top |
|
 |
|