hello guys,
I'm trying to get the memdump external processes via delphi
But I'm struggling.
I am programming an anti-hack.
To detect hacks :
PHP Code:
(Offset : $0432360; MemDump :($45, $FC, $8B, $40, $14, $8B, $40, $18, $83, $F8, $02, $74, $02, $EB, $0B, $8B, $45, $FC, $8B, $40, $24, $89, $45, $F8, $EB, $12, $8B, $45, $FC, $8B, $58, $14)), //Cheat Engine 6.1
Good people have this function to get the internal memdump:
Code:
function MemoryDump(Address : DWORD; SizeOfDump : Byte; RepeatX : DWORD):string;
var
value : Int64;
i,Count : DWORD;
s,vType : string;
begin
if (SizeOfDump in [1,2,4,8]) then
begin
Count := 0;
case (SizeOfDump) of
1: vType := 'Byte';
2: vType := 'Word';
4: vType := 'DWORD';
8: vType := 'Int64';
end;
Result := 'Memory Dump from Address[$'+
IntToHex(Address,8)+']:'#13#10'Dump : array [0..$'+IntToHex(RepeatX,8)+
'] of '+vType+' = '#13#10'('#13#10' ';
repeat
s := '';
value := 0;
MoveMemory(@value,Pointer(Address + (SizeOfDump * Count)),SizeOfDump);
s := IntToHex(value,SizeOfDump);
if (Count <> RepeatX-1) then
begin
if ((Count+1) mod 8 = 0) then
Result := Result + '$'+s+', '#13#10' '
else
Result := Result + '$'+s+', '
end
else
Result := Result + '$'+s+#13#10');';
Inc(Count);
until (Count = RepeatX);
end
else
Result := '';
end;
Memo1.Text := MemoryDump($0044EC90,1,50);
I would get the memdump an external process via PID
But I tried and not worked with ReadProcessMemory
I appreciate everyone's attention!
thank you!