Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <pthread.h>
- #include "KittyMemory/MemoryPatch.h"
- #include "KittyMemory/Logger.h"
- #include <jni.h>
- struct Patch {
- MemoryPatch isUnlimatedGold;
- MemoryPatch isUnlimatedSilver;
- MemoryPatch isUnlimatedBackPack;
- MemoryPatch isUnlimatdGasTank;
- MemoryPatch isUnlimatedTrunk;
- MemoryPatch isUnlimatedKarma;
- MemoryPatch isUnlimatedSkillPoint;
- MemoryPatch isUnlimatedPerkPoint;
- MemoryPatch isUnlimatedHighDamage;
- MemoryPatch isAdsRemove;
- MemoryPatch isUnlimatedAmmoClip;
- MemoryPatch isUnlimatedAmmo;
- MemoryPatch isUnlimatedGas;
- } patches;
- bool isUnlimatedGold;
- bool isUnlimatedSilver;
- bool isUnlimatedBackPack;
- bool isUnlimatdGasTank;
- bool isUnlimatedTrunk;
- bool isUnlimatedKarma;
- bool isUnlimatedSkillPoint;
- bool isUnlimatedPerkPoint;
- bool isUnlimatedHighDamage;
- bool isAdsRemove;
- bool isUnlimatedAmmoClip;
- bool isUnlimatedAmmo;
- bool isUnlimatedGas;
- void* hack_thread(void*) {
- //Configure your patches here
- // loop until our target library is found
- ProcMap il2cppMap;
- do {
- il2cppMap = KittyMemory::getLibraryMap("libil2cpp.so");
- sleep(1);
- } while(!il2cppMap.isValid());
- patches.isUnlimatedGold = MemoryPatch("libil2cpp.so",0xD952E8,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedSilver = MemoryPatch("libil2cpp.so",0xD95178,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedBackPack = MemoryPatch("libil2cpp.so",0xD95B0C,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatdGasTank = MemoryPatch("libil2cpp.so",0xD95C74,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedTrunk = MemoryPatch("libil2cpp.so",0xD95B64,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedKarma = MemoryPatch("libil2cpp.so",0xD95D84,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedGas = MemoryPatch("libil2cpp.so",0xD94100,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedSkillPoint = MemoryPatch("libil2cpp.so",0xCD231C,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedPerkPoint = MemoryPatch("libil2cpp.so",0xCD23DC,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- //patches.isUnlimatedBackPack = MemoryPatch("libil2cpp.so",0xD95B0C,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedHighDamage = MemoryPatch("libil2cpp.so",0xFE7DC8,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isAdsRemove = MemoryPatch("libil2cpp.so",0xD95AB0,"\x00\x00\x80\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedAmmo = MemoryPatch("libil2cpp.so",0xFE9268,"\x20\x00\x80\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedAmmoClip = MemoryPatch("libil2cpp.so",0xFE91CC,"\x20\x00\x80\xd2\xc0\x03\x5f\xd6",8);
- return NULL;
- }
- extern "C"
- JNIEXPORT jobjectArray JNICALL Java_com_rh_mods_ModMenu_getListFT(JNIEnv *env, jobject jobj){
- jobjectArray ret;
- int i;
- int Total_Feature =14;
- const char *features[]={"Unlimated Gold", "Unlimated Silver", "Unlimated BackPack", "Unlimated GasTank", "Unlimated Trunk", "Unlimated Karma", "Unlimated SkillPoint", "Unlimated BackPack", "Unlimated PerkPoint", "High Damage", "Remove Ads", "Unlimaated AmmoClip", "Unlimated Ammo", "Unlimated Gas"};
- ret= (jobjectArray)env->NewObjectArray(Total_Feature,
- env->FindClass("java/lang/String"),
- env->NewStringUTF(""));
- for(i=0;i<Total_Feature;i++) {
- env->SetObjectArrayElement(
- ret,i,env->NewStringUTF(features[i]));
- }
- return(ret);
- }
- extern "C"
- JNIEXPORT void JNICALL Java_com_rh_mods_ModMenu_changeToggle(JNIEnv *env, jobject thisObj, jint number) {
- int i = (int) number;
- switch (i) {
- case 0:
- isUnlimatedGold=!isUnlimatedGold;
- if (isUnlimatedGold) {
- patches.isUnlimatedGold.Modify();
- } else {
- patches.isUnlimatedGold.Restore();
- } break;
- case 1:
- isUnlimatedSilver=!isUnlimatedSilver;
- if (isUnlimatedSilver) {
- patches.isUnlimatedSilver.Modify();
- } else {
- patches.isUnlimatedSilver.Restore();
- } break;
- case 2:
- isUnlimatedBackPack=!isUnlimatedBackPack;
- if (isUnlimatedBackPack) {
- patches.isUnlimatedBackPack.Modify();
- } else {
- patches.isUnlimatedBackPack.Restore();
- } break;
- case 3:
- isUnlimatdGasTank=!isUnlimatdGasTank;
- if (isUnlimatdGasTank) {
- patches.isUnlimatdGasTank.Modify();
- } else {
- patches.isUnlimatdGasTank.Restore();
- } break;
- case 4:
- isUnlimatedTrunk=!isUnlimatedTrunk;
- if (isUnlimatedTrunk) {
- patches.isUnlimatedTrunk.Modify();
- } else {
- patches.isUnlimatedTrunk.Restore();
- } break;
- case 5:
- isUnlimatedKarma=!isUnlimatedKarma;
- if (isUnlimatedKarma) {
- patches.isUnlimatedKarma.Modify();
- } else {
- patches.isUnlimatedKarma.Restore();
- } break;
- case 6:
- isUnlimatedSkillPoint=!isUnlimatedSkillPoint;
- if (isUnlimatedSkillPoint) {
- patches.isUnlimatedSkillPoint.Modify();
- } else {
- patches.isUnlimatedSkillPoint.Restore();
- } break;
- case 7:
- isUnlimatedPerkPoint=!isUnlimatedPerkPoint;
- if (isUnlimatedPerkPoint) {
- patches.isUnlimatedPerkPoint.Modify();
- } else {
- patches.isUnlimatedPerkPoint.Restore();
- } break;
- case 8:
- isUnlimatedBackPack=!isUnlimatedBackPack;
- if (isUnlimatedBackPack) {
- patches.isUnlimatedBackPack.Modify();
- } else {
- patches.isUnlimatedBackPack.Restore();
- } break;
- case 9:
- isUnlimatedHighDamage=!isUnlimatedHighDamage;
- if (isUnlimatedHighDamage) {
- patches.isUnlimatedHighDamage.Modify();
- } else {
- patches.isUnlimatedHighDamage.Restore();
- } break;
- case 10:
- isAdsRemove=!isAdsRemove;
- if (isAdsRemove) {
- patches.isAdsRemove.Modify();
- } else {
- patches.isAdsRemove.Restore();
- } break;
- case 11:
- isUnlimatedAmmoClip=!isUnlimatedAmmoClip;
- if (isUnlimatedAmmoClip) {
- patches.isUnlimatedAmmoClip.Modify();
- } else {
- patches.isUnlimatedAmmoClip.Restore();
- } break;
- case 12:
- isUnlimatedAmmo=!isUnlimatedAmmo;
- if (isUnlimatedAmmo) {
- patches.isUnlimatedAmmo.Modify();
- } else {
- patches.isUnlimatedAmmo.Restore();
- } break;
- case 13:
- isUnlimatedGas=!isUnlimatedGas;
- if (isUnlimatedGas) {
- patches.isUnlimatedGas.Modify();
- } else {
- patches.isUnlimatedGas.Restore();
- } break;
- }
- return;
- }
- __attribute__((constructor))
- void libloaded() {
- pthread_t ptid;
- pthread_create(&ptid, nullptr, hack_thread, nullptr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement