onlyus Newbie cheater
Reputation: 0
Joined: 27 Aug 2011 Posts: 19 Location: 214214
|
Posted: Sun Feb 26, 2012 6:09 pm Post subject: [delphi] what's wrong my code? |
|
|
cheatengine value my scanner value doesnt match
procedure TForm1.Button1Click(Sender: TObject);
const
EndAddress = $00550000;
var
mbi : TMemoryBasicInformation;
CurrentAddress, BaseAddress, i : DWORD;
buff: Pointer;
temp : SIZE_T;
begin
Memo1.Clear;
CurrentAddress := $00400000;
ZeroMemory(@mbi,SizeOf(mbi));
while CurrentAddress < EndAddress do
begin
if VirtualQueryEx(GetCurrentProcess, Pointer(CurrentAddress), mbi, SizeOf(mbi)) <> SizeOf(mbi) then break;
if ((mbi.RegionSize > 0) and ((mbi.Type_9 = MEM_IMAGE) or
(mbi.Type_9 = MEM_PRIVATE)) and (mbi.State = MEM_COMMIT) and
((mbi.Protect = PAGE_WRITECOPY) or (mbi.Protect = PAGE_EXECUTE_WRITECOPY)
or (mbi.Protect = PAGE_EXECUTE_READWRITE) or
(mbi.Protect = PAGE_READWRITE))) then
begin
GetMem(buff, mbi.RegionSize);
ReadProcessMemory(GetCurrentProcess, mbi.BaseAddress, buff, mbi.RegionSize, temp);
i := 0;
while i < Integer(mbi.RegionSize) do
begin
Memo1.Lines.Add(Inttohex(CurrentAddress+i, + '/' + Inttostr(PInteger(buff)^));
inc(i, 4);
inc(PInteger(buff)^);
end;
CurrentAddress := DWORD(mbi.BaseAddress) + mbi.RegionSize;
FreeMem(buff);
end
else begin
CurrentAddress := DWORD(mbi.BaseAddress) + mbi.RegionSize;
end;
end;
end;
end.
thanks
_________________
i'm noob |
|