Skip to content

Commit

Permalink
MemoryMgr.GTA: Introduce ASLR support for GTA III and Vice City
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePLMonster committed Apr 6, 2024
1 parent 7cfebfd commit 3d5474e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions MemoryMgr.GTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ namespace Memory

if ( *bVer == -1 )
{
if (*(uint32_t*)0x5C1E75 == 0xB85548EC) *bVer = 0;
else if (*(uint32_t*)0x5C2135 == 0xB85548EC) *bVer = 1;
else if (*(uint32_t*)0x5C6FD5 == 0xB85548EC) *bVer = 2;
if (*(uint32_t*)DynBaseAddress(0x5C1E75) == 0xB85548EC) *bVer = 0;
else if (*(uint32_t*)DynBaseAddress(0x5C2135) == 0xB85548EC) *bVer = 1;
else if (*(uint32_t*)DynBaseAddress(0x5C6FD5) == 0xB85548EC) *bVer = 2;
}
}

Expand All @@ -75,9 +75,9 @@ namespace Memory

if ( *bVer == -1 )
{
if (*(uint32_t*)0x667BF5 == 0xB85548EC) *bVer = 0;
else if (*(uint32_t*)0x667C45 == 0xB85548EC) *bVer = 1;
else if (*(uint32_t*)0x666BA5 == 0xB85548EC) *bVer = 2;
if (*(uint32_t*)DynBaseAddress(0x667BF5) == 0xB85548EC) *bVer = 0;
else if (*(uint32_t*)DynBaseAddress(0x667C45) == 0xB85548EC) *bVer = 1;
else if (*(uint32_t*)DynBaseAddress(0x666BA5) == 0xB85548EC) *bVer = 2;
}
}

Expand Down Expand Up @@ -352,17 +352,17 @@ namespace Memory
#ifdef assert
assert(address11);
#endif
return address11;
return DynBaseAddress(address11);
case 2:
#ifdef assert
assert(addressSteam);
#endif
return addressSteam;
return DynBaseAddress(addressSteam);
default:
#ifdef assert
assert(address10);
#endif
return address10;
return DynBaseAddress(address10);
}
}

Expand Down

0 comments on commit 3d5474e

Please sign in to comment.