
Originally Posted by
Aqollo
I'm still stumped ;l
Code:
cILTClient *ILTClient;
ILTClient = *(cILTClient**)0x377ED910
What are the two levels of "indirection" here, this is what I'm not getting clear. Is it that..
You had already mentioned how ILTClient** itself is 0x377ED910 I remember that...
So the two astrieks mean:
initally the address 0x377.. is ILTClient** but the value it holds points to ILTClient* which points to cILTClient?
Okay, ima have a shot too. Do tell us who's explanation you liked best xD
Let's invent a hypothetical LTClient class:
[php]class LTClient
{
bool GetGameStatus();
int RunConsoleCommand(char *szCommand);
}[/php]
Now, in game, let's say I have a function that takes the LTClient as a parameter.
I do not want to use a new LTClient, but whatever I do I want to modify the current LTClient. To do this, I use a pointer, which points to the real LTClient, rather than a copy of it.
[php]
void UpdatePlayerPositions(LTClient * client)
{
client->RunConsoleCommand("whatever");
}
[/php]
At this point, we might get the address of the POINTER that tells us (points) where the real LTClient is. Because we've made a hack, we cannot directly access that pointer, and we do not know the address of the original LTClient.
Therefore, we have to create a pointer to that pointer which will then tell us where the real LTClient is.
LTClient** = points to the LTClient* that we know, which points to the LTClient whose address we do not know.
That's why we need 2 levels of indirection. The first level is due to the game, the second is because we need to access something that we don't have direct access to.