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 isUnlimatedGas;
- MemoryPatch isUnlimatedKarma;
- MemoryPatch isUnlimatedSP;
- MemoryPatch isUnlimatedPK;
- MemoryPatch isUnlimatedBK;
- MemoryPatch isUnlimatedGasTank;
- MemoryPatch isUnlimatedTrunk;
- MemoryPatch isHighDamage;
- MemoryPatch isRemoveAds;
- } patches;
- bool isUnlimatedGold;
- bool isUnlimatedSilver;
- bool isUnlimatedGas;
- bool isUnlimatedKarma;
- bool isUnlimatedSP;
- bool isUnlimatedPK;
- bool isUnlimatedBK;
- bool isUnlimatedGasTank;
- bool isUnlimatedTrunk;
- bool isHighDamage;
- bool isRemoveAds;
- 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",0xD9B0D4,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedSilver = MemoryPatch("libil2cpp.so",0xD9AF84,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedGas = MemoryPatch("libil2cpp.so",0xD9A694,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedKarma = MemoryPatch("libil2cpp.so",0xD9B890,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedSP = MemoryPatch("libil2cpp.so",0xC7DEA4,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedPK = MemoryPatch("libil2cpp.so",0xC7DF64,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedBK = MemoryPatch("libil2cpp.so",0xD9B734,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedGasTank = MemoryPatch("libil2cpp.so",0xD9B7E0,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isUnlimatedTrunk = MemoryPatch("libil2cpp.so",0xD9B76C,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isHighDamage = MemoryPatch("libil2cpp.so",0xE4AD6C,"\x00\xe0\xaf\xd2\xc0\x03\x5f\xd6",8);
- patches.isRemoveAds = MemoryPatch("libil2cpp.so",0xD9B6F8,"\x00\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 =11;
- const char *features[]={"Unlimated Gold", "Unlimated Silver", "Unlimated Gas", "Unlimated Karma", "Unlimated SkillPoint", "Unlimated PerkPoint", "Unlimated BackPack", "Unlimated GasTank", "Unlimated Trunk", "High Damage", "Remove Ads" };
- 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:
- isUnlimatedGas=!isUnlimatedGas;
- if (isUnlimatedGas) {
- patches.isUnlimatedGas.Modify();
- } else {
- patches.isUnlimatedGas.Restore();
- } break;
- case 3:
- isUnlimatedKarma=!isUnlimatedKarma;
- if (isUnlimatedKarma) {
- patches.isUnlimatedKarma.Modify();
- } else {
- patches.isUnlimatedKarma.Restore();
- } break;
- case 4:
- isUnlimatedSP=!isUnlimatedSP;
- if (isUnlimatedSP) {
- patches.isUnlimatedSP.Modify();
- } else {
- patches.isUnlimatedSP.Restore();
- } break;
- case 5:
- isUnlimatedPK=!isUnlimatedPK;
- if (isUnlimatedPK) {
- patches.isUnlimatedPK.Modify();
- } else {
- patches.isUnlimatedPK.Restore();
- } break;
- case 6:
- isUnlimatedBK=!isUnlimatedBK;
- if (isUnlimatedBK) {
- patches.isUnlimatedBK.Modify();
- } else {
- patches.isUnlimatedBK.Restore();
- } break;
- case 7:
- isUnlimatedGasTank=!isUnlimatedGasTank;
- if (isUnlimatedGasTank) {
- patches.isUnlimatedGasTank.Modify();
- } else {
- patches.isUnlimatedGasTank.Restore();
- } break;
- case 8:
- isUnlimatedTrunk=!isUnlimatedTrunk;
- if (isUnlimatedTrunk) {
- patches.isUnlimatedTrunk.Modify();
- } else {
- patches.isUnlimatedTrunk.Restore();
- } break;
- case 9:
- isHighDamage=!isHighDamage;
- if (isHighDamage) {
- patches.isHighDamage.Modify();
- } else {
- patches.isHighDamage.Restore();
- } break;
- case 10:
- isRemoveAds=!isRemoveAds;
- if (isRemoveAds) {
- patches.isRemoveAds.Modify();
- } else {
- patches.isRemoveAds.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