Necessário:
Vamos lá ,
Clique em File >> New >> Other e selecione DLL Wizard.
Renomeie a Dll para "speedhack" ( SEM ASPAS)
Apague as uses até o end e cole este código:
Agora clique em File >> New > Form
dê 2 clicks no form e adicione nas uses :
Logo abaixo da type coloque :
Deixando assim:
Componentes
Deixe no visual a seu gosto no meu caso deixei assim,
Nas variaveis adicione
Cole esté código embaixo do {$R *.dfm}
Clique duas vezes no botão1 deixe o nome dele "Ligar speed Hack" ( SEM ASPAS) e apague o begin e o end; e coloque o seguinte código no lugar:
Renomeie a unit da form para ui.
Crie uma nova Unit em File >> New > Unit
Apague todo código que há nele e cole este
Resultado final do SpeedHack
Para quem quiser baixar e usar >> [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Créditos á Cheat Engine.org
e a min por disponibilizar, traduzir a português para iGames!
•Experiência básica no delphi.
•Ter o delphi 7 instalado ( lógico t.t).
Vamos lá ,
Clique em File >> New >> Other e selecione DLL Wizard.
Renomeie a Dll para "speedhack" ( SEM ASPAS)
Apague as uses até o end e cole este código:
Código:
uses
SysUtils,
Classes,
speedhackunit in 'speedhackunit.pas',
ui in 'ui.pas' {Form1};
{$R *.res}
exports acceleration;
exports sleeptime;
begin
sui:=tui.create(false);
end.
Agora clique em File >> New > Form
dê 2 clicks no form e adicione nas uses :
speedhackunit;
Logo abaixo da type coloque :
Código:
type
TUI = class(tthread)
public
procedure execute; override;
end;
Deixando assim:
Componentes
2 - Edits
2 - Labels
1 - Botão
Deixe no visual a seu gosto no meu caso deixei assim,
Nas variaveis adicione
Código:
sui: tui;
Cole esté código embaixo do {$R *.dfm}
Código:
procedure TUI.execute;
begin
form1:=tform1.Create(nil);
form1.ShowModal;
end;
Clique duas vezes no botão1 deixe o nome dele "Ligar speed Hack" ( SEM ASPAS) e apague o begin e o end; e coloque o seguinte código no lugar:
Código:
var a: single;
s: dword;
begin
s:=strtoint(edit2.text);
a:=strtofloat(edit1.Text);
sleeptime:=s;
acceleration:=a;
end;
Renomeie a unit da form para ui.
Crie uma nova Unit em File >> New > Unit
Apague todo código que há nele e cole este
Código:
unit speedhackunit;
interface
uses windows,classes;
type TAPIInfo = record
location: Pointer;
Original: Array [0..4] of byte;
Jump: Array [0..4] of byte;
end;
type TTick=class(TThread)
private
public
procedure Execute; override;
end;
procedure InitializeSpeedhack;
procedure StopSpeedhack;
procedure GetTime; stdcall;
//function GetTime:dword; stdcall;
function NewQueryPerformanceCounter(var output: int64):BOOl; stdcall;
var CETick: dword;
CETick64: int64;
Ticker: TTick;
PerformanceFrequency: int64;
PerformanceFrequencyMS: int64;
acceleration: single;
sleeptime: dword;
slow: boolean;
tickerstopped: boolean;
speedhackenabled: boolean;
timeGetTimeInfo:TAPiInfo;
getTickcountInfo: TAPIInfo;
QueryPerformanceCounterInfo: TAPIInfo;
winmmlib,kernel32lib: thandle;
implementation
procedure InitializeSpeedhack;
var op:dword;
begin
cetick:=gettickcount;
//Visite iGames.forumbrasil.net e aprenda muito mais !
if ticker<>nil then
begin
ticker.Terminate;
stopspeedhack;
end;
ticker:=nil;
winmmlib:=LoadLibrary('winmm.dll');
if winmmlib<>0 then
begin
timeGetTimeInfo.location:=GetProcAddress(winmmlib,'timeGetTime');
if VirtualProtect(timeGetTimeInfo.location,5,PAGE_EXECUTE_READWRITE,op) then
begin
timeGetTimeInfo.jump[0]:=$e9;
pdword(@timeGetTimeInfo.jump[1])^:=dword(@GetTime)-dword(timeGetTimeInfo.location)-5;
try
asm
//store original
push edi
push esi
lea edi,timeGetTimeInfo.original[0]
mov esi,timeGetTimeInfo.location
movsd
movsb
//replace with jump
lea esi,timeGetTimeInfo.jump[0]
mov edi,timeGetTimeInfo.location
movsd
movsb
pop esi
pop edi
end;
except
end;
end;
end;
kernel32lib:=LoadLibrary('kernel32.dll');
if kernel32lib<>0 then
begin
//gettickcount
GetTickCountInfo.location:=GetProcAddress(kernel32lib,'GetTickCount');
if VirtualProtect(GetTickCountInfo.location,5,PAGE_EXECUTE_READWRITE,op) then
begin
GetTickCountInfo.jump[0]:=$e9;
pdword(@GetTickCountInfo.jump[1])^:=dword(@GetTime)-dword(GetTickCountInfo.location)-5;
try
asm
//store original
push edi
push esi
lea edi,GetTickCountInfo.original[0]
mov esi,GetTickCountInfo.location
movsd
movsb
//replace with jump
lea esi,GetTickCountInfo.jump[0]
mov edi,GetTickCountInfo.location
movsd
movsb
pop esi
pop edi
end;
except
end;
end;
//QueryPerformanceCounter
if QueryPerformanceFrequency(PerformanceFrequency) then
begin
QueryPerformanceCounter(CETick64);
PerformanceFrequencyMS:=PerformanceFrequency div 1000;
//there is a high performance counter
QueryPerformanceCounterInfo.location:=GetProcAddress(kernel32lib,'QueryPerformanceCounter');
if VirtualProtect(QueryPerformanceCounterInfo.location,5,PAGE_EXECUTE_READWRITE,op) then
begin
QueryPerformanceCounterInfo.jump[0]:=$e9;
pdword(@QueryPerformanceCounterInfo.jump[1])^:=dword(@NewQueryPerformanceCounter)-dword(QueryPerformanceCounterInfo.location)-5;
try
asm
//store original
push edi
push esi
lea edi,QueryPerformanceCounterInfo.original[0]
mov esi,QueryPerformanceCounterInfo.location
movsd
movsb
//replace with jump
lea esi,QueryPerformanceCounterInfo.jump[0]
mov edi,QueryPerformanceCounterInfo.location
movsd
movsb
pop esi
pop edi
end;
except
end;
end;
end;
end;
speedhackenabled:=true;
if ticker=nil then ticker:=TTick.Create(false);
end;
procedure StopSpeedhack;
begin
if not speedhackenabled then exit;
speedhackenableD:=false;
try
asm
lea esi,timeGetTimeInfo.original[0]
mov edi,timeGetTimeInfo.location
movsd
movsb
end;
except
end;
try
asm
lea esi,GetTickCountInfo.original[0]
mov edi,GetTickCountInfo.location
movsd
movsb
end;
except
end;
try
asm
lea esi,QueryPerformanceCounterInfo.original[0]
mov edi,QueryPerformanceCounterInfo.location
movsd
movsb
end;
except
end;
FreeLibrary(winmmlib);
FreeLibrary(kernel32lib);
winmmlib:=0;
kernel32lib:=0;
if ticker<>nil then ticker.terminate;
ticker:=nil;
end;
procedure GetTime; stdcall;
asm
mov eax,[CETick]
ret
end;
{function GetTime:dword; stdcall;
begin
result:=CETick;
end;}
function NewQueryPerformanceCounter(var output: int64):BOOl; stdcall;
begin
output:=cetick64;
result:=true;
end;
procedure TTick.Execute;
begin
tickerstopped:=false;
freeonterminate:=true;
priority:=tpTimeCritical; //if not a thread with higher priority will prevent the timer from running
while not terminated do
begin
inc(cetick64,trunc(acceleration*(PerformanceFrequency / (1000 / sleeptime))) );
inc(cetick,trunc(sleeptime*acceleration));
sleep(sleeptime);
end;
tickerstopped:=true;
end;
initialization
acceleration:=1.8;
sleeptime:=10;
InitializeSpeedhack;
end.
Resultado final do SpeedHack
Para quem quiser baixar e usar >> [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Créditos á Cheat Engine.org
e a min por disponibilizar, traduzir a português para iGames!