What is an offset?

2
Well, I'm researching about game cheats and I came across the term "offset", I researched and did not think, that offset is a calculation of the distance of the address to where you want to allocate such a variable. Is this thought right? if not, what is offset?

    
asked by anonymous 26.08.2017 / 05:47

2 answers

2

I think it depends a lot on the context, because the word itself, just means deslocado , compensado , equilibrado ...

Given the context you mentioned, memory addressing, you would consider offset as the offset of the desired address. So, I think your thinking: "It's a calculation of the distance of the address to where you want to allocate such a variable" is correct.

    
26.08.2017 / 06:21
2
  • What is an offset?

Offset, as already answered, is where process information is allocated to a position. In written form this is, but for the subject, I prefer to give examples and show images:

To base ourselves better, let's assume that a game has the following architecture:

Let'sassumethefollowingoffsets:

ClientDll=0x12EA567;//Emrelaçãoaopontoinicial,esseseriaomoduloemquevamostrabalharLocalplayer=0x4BCD3F;//EmrelaçãoaoClientDllVida=0x100;//EmrelaçãoaoLocalplayer

Howdoyougetthelifeofthelocalplayer?Simple!Addall:

VidaDoJogador=ClientDll+Localplayer+Vida;

Noticethatwhatwedidistogetinformationthatiscontainedinaprocessfromanaddresswegetfromtheoffsets.

Real-code(C++&WinAPI):

intVidaDoJogador=0;DWORDendereço=ClientDll+Localplayer+Vida;ReadProcessMemory(processo,(void*)endereço,&VidaDoJogador,sizeof(VidaDoJogador),0);

Whereprocessois HANDLE of the process.

  • Why not work with offsets?

Offsets are very dynamic and can change whenever the source code of the process changes. I recommend giving a read in Pattern Scanner, where instead of creating variables for offsets and having to keep changing it always finds them for you, according to the static values close to it.

    
03.09.2017 / 16:45