Page 1 of 1

Regarding pointers and scripts

Posted: Mon Nov 11, 2019 3:04 pm
by The Mogician
When I make pointer tables, the pointers are individually available and doesn't require any prerequisite scripts to populate. I often see tables with pointers being tied into scripts. I'm a bit curious how that works and what is the function of the scripts in the scenario. Can someone explain a bit?

Re: Regarding pointers and scripts

Posted: Mon Nov 11, 2019 3:29 pm
by cfemen
Hey,

lets say you are searching for a (int/4 byte) value, you find it and you have the address:

now you can look what read/writes on this address

for a 4 byte (int) on an x64 game you will see something like this on read:

Code: Select all

mov eax,[rcx+8]
and on write:

Code: Select all

mov [rcx+8],eax
rcx+8 = address of the value

now you can allocate memory to copy the address of rcx
access on this memory location+ 8 and you have a pointer to the value that will work everytime.

this gives many more advantages, rcx could hold an complete struct of the player and you can find many more pointers without searching them.
or for inventory things, hook into a function/method that gets called each time the player selects an item -> you get the pointer to the current item.