Jump to content

Recommended Posts

Posted (edited)

Hello, I couldn't figure out where to post this so I hope this is in appropriate place. I've finally completed my CLI tool that makes your Gameguardian scripts work on all updates! Normally, things that rely on function offsets - like hex patches and hooks - break when the game updates. However, this tool generates scripts that use pattern scanning to dynamically find the functions.

Here's the Github. Enjoy!
all_updates_generator.zipall_updates_generator.zip
demo.thumb.png.8a47be84bbee559d927a3639cf5b4879.png

all_updates_generator.zip

Edited by HorridModz
Posted (edited)

Hi @HorridModz, this is impressive. Does this work outside IL2CPP? Also with x86 / x64 architecture? (Not Arm)

Edited by MC874
Posted
12 hours ago, MC874 said:

Hi @HorridModz, this is impressive. Does this work outside IL2CPP? Also with x86 / x64 architecture? (Not Arm)

@MC874Thank you! This technique works for any game or app - all it needs to do is take the hex from the lib file and generate an array of bytes by reading the opcodes (nothing il2cpp-specific). It does this with python's keystone and capstone modules. As it is for Gameguardian, it only works for ARM and ARM64 (Android's architectures). However, it could be made to work with other architectures:

`

def make_ks(architecture: str) -> keystone.Ks:
    """
    Only do this once, because it is expensive.
    """
    if architecture == "32bit":
        return keystone.Ks(keystone.KS_ARCH_ARM, keystone.KS_MODE_ARM)
    elif architecture == "64bit":
        return keystone.Ks(keystone.KS_ARCH_ARM64, keystone.KS_MODE_LITTLE_ENDIAN)
    else:
        raise ValueError(f"Unrecognized architecture: {architecture}. Only '32bit' and '64bit' are valid strings")

def make_cs(architecture: str) -> capstone.Cs:
    """
    Only do this once, because it is expensive.
    """
    if architecture == "32bit":
        return capstone.Cs(capstone.CS_ARCH_ARM, capstone.CS_MODE_ARM)
    elif architecture == "64bit":
        return capstone.Cs(capstone.CS_ARCH_ARM64, capstone.CS_MODE_LITTLE_ENDIAN)
    else:
        raise ValueError(f"Unrecognized architecture: {architecture}. Only '32bit' and '64bit' are valid strings")

Keystone and Capstone support a wide range of architectures, so simply editing these functions would extend the tool to work for others. However, as I said Android only has ARM and ARM64, so I don't see why this would be necessary.
 

Posted

[ @HorridModz ]
Not really, I always uses x86 and x64 as Emulator users (Yes, the Emulator can also run Arms) and also it's because the least I'm familiar with. When making mod menu, I always thought to include All Architecture support, so intel chipset device can also uses it. I think it would be best if you include search-pattern that the tool use in the documentation, is it debug symbol, pointer or etc? Because I always find it difficult when finding function between Arm and x86/x64.

Posted
17 hours ago, MC874 said:

[ @HorridModz ]
Not really, I always uses x86 and x64 as Emulator users (Yes, the Emulator can also run Arms) and also it's because the least I'm familiar with. When making mod menu, I always thought to include All Architecture support, so intel chipset device can also uses it. I think it would be best if you include search-pattern that the tool use in the documentation, is it debug symbol, pointer or etc? Because I always find it difficult when finding function between Arm and x86/x64.

Interesting! I will have to implement that when I get a chance - should be simple. Thanks for the advice.

 

The documentation does say search pattern - it's simply an array of bytes search. The program generates an aob by reading bytes from the function's start offset and keeping the bytes that represent static instructions. Then it generates a group search by converting strings of static bytes into qwords, dwords, etc. This will not work between Architectures. Sadly, as far as I know the instructions aren't one-to-one so "transpiling" the aob to another architecture wouldn't work.

17 hours ago, MC874 said:

[ @HorridModz ]
Not really, I always uses x86 and x64 as Emulator users (Yes, the Emulator can also run Arms) and also it's because the least I'm familiar with. When making mod menu, I always thought to include All Architecture support, so intel chipset device can also uses it. I think it would be best if you include search-pattern that the tool use in the documentation, is it debug symbol, pointer or etc? Because I always find it difficult when finding function between Arm and x86/x64.

Out of curiosity, why have I never seen a script that supports x86 and x64? In fact, as far as I know gameguardian only supports target.isx64 or whatever it is and only supports armv7 / arm64 opcodes, etc. etc. - I'm unaware of Gameguardian supporting these alternative architectures at all. It would be great if you could point to some references for this.

Posted
17 hours ago, MC874 said:

[ @HorridModz ]
Not really, I always uses x86 and x64 as Emulator users (Yes, the Emulator can also run Arms) and also it's because the least I'm familiar with. When making mod menu, I always thought to include All Architecture support, so intel chipset device can also uses it. I think it would be best if you include search-pattern that the tool use in the documentation, is it debug symbol, pointer or etc? Because I always find it difficult when finding function between Arm and x86/x64.

Out of curiosity, why have I never seen a script that supports x86 and x64? In fact, as far as I know gameguardian only supports target.isx64 or whatever it is and only supports armv7 / arm64 opcodes, etc. etc. - I'm unaware of Gameguardian supporting these alternative architectures at all. It would be great if you could point to some references for this.

 

Update: hmm the *only* resource I could find for this was a stackoverflow post... https://stackoverflow.com/questions/17770907/is-android-os-only-used-for-arm-cpus

Posted
3 hours ago, HorridModz said:

I'm unaware of Gameguardian supporting these alternative architectures at all.

GG supports x86 and x86_64 architectures since very long time ago. From the description on download page: 

Quote

Runs on ARM, x64 and x86 devices, including x86 emulators (LDPlayer, Droid4X, MOMO, KOPlayer, Andy, Memu, Leapdroid, AMIDuOS, Windroye, RemixOS, PhoenixOS, AVD, Genymotion, Nox, BlueStacks etc.)

GG's disassembler and assembler aren't required functionality, so no wonder that they are only implemented for most common use cases.

Other than that, GG works just fine on x86 Android devices/emulators and nothing prevents one from doing whatever can be done on devices with ARM architecture. For example of modifying something in game code for x86 see:
https://gameguardian.net/forum/topic/33131-hotelstory-not-complying/#findComment-121354

Posted
On 8/13/2025 at 1:45 AM, CmP said:

GG supports x86 and x86_64 architectures since very long time ago. From the description on download page: 

GG's disassembler and assembler aren't required functionality, so no wonder that they are only implemented for most common use cases.

Other than that, GG works just fine on x86 Android devices/emulators and nothing prevents one from doing whatever can be done on devices with ARM architecture. For example of modifying something in game code for x86 see:
https://gameguardian.net/forum/topic/33131-hotelstory-not-complying/#findComment-121354

Thank you for the info! This is very interesting.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.