Memory offsets?
See original GitHub issueThere’s a few methods in there which don’t use native functions, but access memory to change stuff. One of those is setting a headlight damage status:
void Vehicle::LeftHeadLightBroken::set(bool value) {
unsigned char *const address = reinterpret_cast<unsigned char *>(Native::MemoryAccess::GetAddressOfEntity(Handle));
if (address == nullptr) {
return;
}
const unsigned char mask = 1 << 0;
if (value) {
*(address + 1916) |= mask;
}
else {
*(address + 1916) &= ~mask;
}
}
Now, I get the basic gist of it, but how did you discover this specific offset of 1916 bytes(?) to damage the headlights? Is there any other documentation available for what I think is a Vehicle struct? Specifically, I want to find out what damages the wheels such that the suspension lowers.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Offset (computer science)
In computer science, an offset within an array or other data structure object is an integer indicating the distance (displacement) between the beginning...
Read more >assembly - Memory address and offset
Memory address and offset ... I have a noob questions about how memory address stores values. For example, addr +0 +1 +2 +3...
Read more >What is offset in computer memory function?
The base address, in this case, is the location the of the person right now, and the offset is the number of houses...
Read more >Memory Segment - Offset - (Relative|Effective) address
The offset is the second part of a logical address that permits to locate an Address inside a memory segment A offset is...
Read more >[Help] What are offsets and why do i need them?
An offset is simply the distance between a known memory address and the memory address of the value or data structure you want...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know it’s old but the head light setter was made from reversing the head light getter native
Ah, I think I’ll stick to the CheatEngine + experimental poking around then.