Good evening,
was wondering how can I read data record from a text file,
if they want to read data from a text:
(Offset : $4C8259; MemDump :($A1, $38, $BD, $4C, $00, $8B, $00, $8B, $4D, $FC, $BA, $C0, $82, $4C, $00, $E8, $1F, $F1, $FF, $FF, $33, $DB, $E8, $F8, $BE, $F3, $FF, $33, $C0, $5A, $59, $59); cName : ''),
(Offset : $4C8259; MemDump :($7C, $23, $8B, $45, $FC, $80, $38, $C1, $75, $1B, $8B, $45, $FC, $80, $78, $02, $F3, $75, $12, $8B, $45, $FC, $80, $78, $03, $00, $75, $09, $8B, $45, $FC, $80); cName : ''),
(offset : $401254; MemDump :($68, $14, $D2, $41, $00, $E8, $F0, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $30, $00, $00, $00, $40, $00, $00, $00, $00, $00, $00, $00, $8E, $F0, $24, $23); cName : 'Hack All Mu Minimized')
in the case thereby:
const
ProcessesDumps: array[0..Count -1] of TCheatList =
(
TXT CODE
};
code completion:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, tlhelp32, StdCtrls, Buttons;
const
Count = 3; // Cheat count
type
TMemDump = array[0..31] of Byte;
TCheatList = record
Offset : Cardinal;
MemDump : TMemDump;
cName : String;
end;
const
ProcessesDumps: array[0..Count -1] of TCheatList =
(
(Offset : $4C8259; MemDump :($A1, $38, $BD, $4C, $00, $8B, $00, $8B, $4D, $FC, $BA, $C0, $82, $4C, $00, $E8, $1F, $F1, $FF, $FF, $33, $DB, $E8, $F8, $BE, $F3, $FF, $33, $C0, $5A, $59, $59); cName : ''),
(Offset : $4C8259; MemDump :($7C, $23, $8B, $45, $FC, $80, $38, $C1, $75, $1B, $8B, $45, $FC, $80, $78, $02, $F3, $75, $12, $8B, $45, $FC, $80, $78, $03, $00, $75, $09, $8B, $45, $FC, $80); cName : ''),
(offset : $401254; MemDump :($68, $14, $D2, $41, $00, $E8, $F0, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $30, $00, $00, $00, $40, $00, $00, $00, $00, $00, $00, $00, $8E, $F0, $24, $23); cName : 'Hack All Mu Minimized')
);
type
TForm1 = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ Funções }
function ScanProcessMemory(hProcess: THandle):Boolean;
var
I: Integer;
aTmpBuffer: TMemDump;
aBytesRead: DWORD;
begin
for I := 0 to count do
begin
aBytesRead := 0;
ReadProcessMemory(hProcess, Pointer(ProcessesDumps[i].Offset),@aTmpBuffer, SizeOf(aTmpBuffer), aBytesRead);
if CompareMem(@aTmpBuffer,@ProcessesDumps[i].MemDump,32) then
begin
ShowMessage('Encontrado o hack '+ProcessesDumps[i].cName+' em seu sistema');
ExitProcess(0);
//TerminateProcess(OpenProcess(PROCESS_TERMINATE, 0, hProcess),0);
end;
end;
Result := False;
end;
procedure SystemProcessesScan;
var
hProcessSnap, hProcess: THandle;
pe32: PROCESSENTRY32;
begin
hProcessSnap := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if hProcessSnap <> INVALID_HANDLE_VALUE then
begin
pe32.dwSize := SizeOf(PROCESSENTRY32);
if Process32First(hProcessSnap, pe32) then
begin
repeat
hProcess := OpenProcess(PROCESS_ALL_ACCESS, FALSE,pe32.th32ProcessID);
if not (hProcess = 0) then
begin
ScanProcessMemory(hProcess);
end;
until not Process32Next(hProcessSnap, pe32);
end;
CloseHandle(hProcessSnap);
end;
end;
{ Funções }
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
SystemProcessesScan;
end;
end.
thanks.