Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[DELPHI]WRITE TO POINTERS?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Obitio
Advanced Cheater
Reputation: 0

Joined: 09 Apr 2012
Posts: 68
Location: null

PostPosted: Mon Apr 09, 2012 1:55 pm    Post subject: [DELPHI]WRITE TO POINTERS? Reply with quote

hmm I was searching all over the internet for a way to write to a pointer but I could not find one..so can anyone help me?
I've tried this:
pdword(pdword(address)^+offset)^:=value;
but that only destroys the pointers address -.-
and I also need help with my memory scanning DLL but I'm focusing on writing to a pointer..
Thanks and -Peace-

SINful.
Back to top
View user's profile Send private message
BlackDeviL13
Newbie cheater
Reputation: 0

Joined: 17 Mar 2012
Posts: 15

PostPosted: Thu Apr 12, 2012 6:33 am    Post subject: Reply with quote

you want to write to other process??

if yes,, you can use this..

readprocessmemory(handle,pointer(address),@buffaddr,sizeof(buffaddr),temp);
writeprocessmemory(handle,pointer(buffaddr+offset),@value,sizeof(value),temp);

but you must have the handle to the process..
this is the easiest way to do it

getwindowthreadprocessid(findwindow(nil,'The Caption of the Process'),@pid);
handle:=openprocess(process_all_access,false,pid);

_________________
GG always one step behind ~
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25827
Location: The netherlands

PostPosted: Thu Apr 12, 2012 6:46 am    Post subject: Reply with quote

If that destroys the pointer, then you're not deep enough
Try: pdword(pdword(pdword(address)^+offset)^+offset2or0)^:=value;

_________________
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
View user's profile Send private message MSN Messenger
Obitio
Advanced Cheater
Reputation: 0

Joined: 09 Apr 2012
Posts: 68
Location: null

PostPosted: Fri Apr 13, 2012 1:17 pm    Post subject: Reply with quote

procedure TForm1.Timer9Timer(Sender: TObject);
begin
if CheckBox7.Checked=true then
try
pdword(pdword(pdword(09676618)^+$1Cool^+0)^:=3;
except
on E:EaccessViolation do begin
Edit1.Text:='PATCHED';
Timer9.Enabled:=false;
end;
end;
end;
that's the updated code but it doesn't work still...........I cannot use RPM because this game is protected.(and I don't know how in the world you can hook WPM then jump 5 bytes here then 5 bytes their -.- --I suck at assembler because I don't have a clue what it is.)
Back to top
View user's profile Send private message
BlackDeviL13
Newbie cheater
Reputation: 0

Joined: 17 Mar 2012
Posts: 15

PostPosted: Sat Apr 14, 2012 1:43 am    Post subject: Reply with quote

Are you sure that your game always use that address+offset?
Some game use multilevel pointer..
And I think 09676618 is a hexadecimal,, so you should write it $09676618 in Delphi..

I am in a process of writing DLL scanner too..
and I need to know,,
which one is faster to scan own memory? RPM / PByte(address)^?
in this case, the program doesnt have any GG..

_________________
GG always one step behind ~
Back to top
View user's profile Send private message
Obitio
Advanced Cheater
Reputation: 0

Joined: 09 Apr 2012
Posts: 68
Location: null

PostPosted: Sat Apr 14, 2012 7:36 pm    Post subject: Reply with quote

@blackdevil13
I just tried that to but it didn't work....
Back to top
View user's profile Send private message
BlackDeviL13
Newbie cheater
Reputation: 0

Joined: 17 Mar 2012
Posts: 15

PostPosted: Sun Apr 15, 2012 3:06 am    Post subject: Reply with quote

try that program in other game (i.e. Minesweeper)..
if that works fine in Minesweeper, then it has some possibilites..
i.e. :
1. the pointer is invalid
2. the pointer isnt writable
3. the pointer is protected
4. and some others
and we can be sure that the code isnt wrong Smile

you dont answer my question,
which one is faster to scan own memory? RPM / use the PByte(address)^?
please answer Crying or Very sad

_________________
GG always one step behind ~
Back to top
View user's profile Send private message
Obitio
Advanced Cheater
Reputation: 0

Joined: 09 Apr 2012
Posts: 68
Location: null

PostPosted: Tue Apr 17, 2012 8:20 pm    Post subject: Reply with quote

BlackDeviL13 wrote:
try that program in other game (i.e. Minesweeper)..
if that works fine in Minesweeper, then it has some possibilites..
i.e. :
1. the pointer is invalid
2. the pointer isnt writable
3. the pointer is protected
4. and some others
and we can be sure that the code isnt wrong Smile

you dont answer my question,
which one is faster to scan own memory? RPM / use the PByte(address)^?
please answer Crying or Very sad

Smile PByte(address)^ is super fast..WAAAAAY FASTER THAN WPM!
Anyways..I can't figure out how to write to pointers so I'm just going to write to the function that enables the hack!
Back to top
View user's profile Send private message
BlackDeviL13
Newbie cheater
Reputation: 0

Joined: 17 Mar 2012
Posts: 15

PostPosted: Fri Apr 20, 2012 1:29 pm    Post subject: Reply with quote

I have tried it..
it really fast,, but always give me access violation..
I have used virtualquery to determine the readable region,, but it still give AV..

In RPM, I just need to use
"if RPM=true then"
it works very well and doesnt give any AV..

Can I do something like that in Pbyte(address)^?
May be something like this:
if sizeof(Pbyte(Address)^)=sizeof(byte) then ??
or this:
if cek(address) <> noaccess then ??

I have tried the first one but still give AV..
and I have no idea about the function in the second one..
Can you help me?
NB: I have tried to use "try" and "except", but it takes a lot of time and skip some "right" address

Thanks before Smile

_________________
GG always one step behind ~
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites