// RVA: 0x1199FCC Offset: 0x1199FCC VA: 0x1199FCC
public void AddGold(SecuredDouble gold) { }
double Gold = 1;
#else //To compile this code for armv7 lib only.
void (*old_AddGold)(void *instance, double value);
void AddGold(void *instance, double value) {
if (instance != NULL && Gold >= 0) {
return (void) Gold;
}
// Move the old_AddGold function call here
old_AddGold(instance, +6974);
}
void *hack_thread(void *) {
LOGI(OBFUSCATE("pthread created"));
AddGold >= (void (*)(void *, double)) getAbsoluteAddress(targetLibName, 0x1199FCC);
jobjectArray GetFeatureList(JNIEnv *env, jobject context) {
jobjectArray ret;
const char *features[] = {
OBFUSCATE("Button_Get Massive Gold"), //0 Case
switch (featNum) {
case 0:
Gold =! Gold;
break;
Idle Lumber EmpireGame Name?
Would be far easier to check what SecuredGold is doing and how you can use it if I can check myself.
Will have a look, in the mean time some comments about your code too:Idle Lumber Empire
double Gold = 1;
switch (featNum) {
case 0:
Gold =! Gold;
break;
bool Gold = true;
.instance != NULL
isnt needed since you are not actually making use of it, Gold >= 0
is a boolean so you can do Gold = true
or the short form for the whole if statement if (Gold)
.return (void) Gold
doesnt make sense because the function is a void, it does not return anything, the function being called AddGold gives us a clue that its just setting a field in the game with a new increased value.old_AddGold(instance, +6974);
+6974 wont work here due to the parameter being of type SecuredDouble
, which is a custom struct around double to make not as easy to modify, this also means the param being defined as double value
is incorrect due to being a SecuredDouble
not standard double
i made the adjustments that you suggested asWill have a look, in the mean time some comments about your code too:
You are using Gold as a boolean true or false, but its defined as a double, you should define it as a proper bool:C++:double Gold = 1; switch (featNum) { case 0: Gold =! Gold; break;
bool Gold = true;
.
For the hook:
instance != NULL
isnt needed since you are not actually making use of it,Gold >= 0
is a boolean so you can doGold = true
or the short form for the whole if statementif (Gold)
.
return (void) Gold
doesnt make sense because the function is a void, it does not return anything, the function being called AddGold gives us a clue that its just setting a field in the game with a new increased value.
old_AddGold(instance, +6974);
+6974 wont work here due to the parameter being of typeSecuredDouble
, which is a custom struct around double to make not as easy to modify, this also means the param being defined asdouble value
is incorrect due to being aSecuredDouble
not standarddouble
bool Gold;
#else //To compile this code for armv7 lib only.
void (*old_AddGold)(void *instance, double value);
void AddGold(void *instance, double value) {
if ((Gold) && Gold >= 0) {
}
// Move the old_AddGold function call here
old_AddGold(instance, +6974);
}
void *hack_thread(void *) {
LOGI(OBFUSCATE("pthread created"));
Gold = (void (*)(void *, double)) getAbsoluteAddress(targetLibName, 0x1199FCC);
jobjectArray GetFeatureList(JNIEnv *env, jobject context) {
jobjectArray ret;
const char *features[] = {
OBFUSCATE("Button_Get Massive Gold"), //0 Case
switch (featNum) {
case 0:
Gold =! Gold;
break;
there is a higher chance that this will return a high value because i have tested double value onold_AddGold(instance, +6974);
and it returned a high value but the problem was it was glitchy and i think it made the game crashpublic SecuredDouble get_Gold() { }
HOOK_LIB_NO_ORIG("libil2cpp.so", "0x1199FCC", Gold);
//Target lib here
#define targetLibName OBFUSCATE("libil2cpp.so")
struct {
bool AddGold;
} Sbyky;
void (*AddGoldPtr)(void* _this, double value);
void (*_AddGoldUpd)(void *Gold);
void AddGoldUpd(void *Gold) {
if(Gold != NULL) {
if(Sbyky.AddGold) {
AddGoldPtr(Gold, 7999);
}
}
_AddGoldUpd(Gold);
}
#if defined(__aarch64__) //To compile this code for arm64 lib only.
#else //To compile this code for armv7 lib only.
AddGoldPtr = (void (*) (void *, double))getAbsoluteAddress("libil2cpp.so", 0x1199FCC);
HOOK_LIB("libil2cpp.so", "0x119A2FC", AddGoldUpd, _AddGoldUpd);
jobjectArray GetFeatureList(JNIEnv *env, jobject context) {
jobjectArray ret;
const char *features[] = {
OBFUSCATE("Toggle_Get Massive Gold"), //0 Case
//BE CAREFUL NOT TO ACCIDENTLY REMOVE break;
switch (featNum) {
case 0:
Sbyky.AddGold = boolean;
break;
}
// RVA: 0x1199FCC Offset: 0x1199FCC VA: 0x1199FCC
public void AddGold(SecuredDouble gold) { }
// RVA: 0x119A2FC Offset: 0x119A2FC VA: 0x119A2FC
public void AddCurrency(Currency c, SecuredDouble value) { }
//Target lib here
#define targetLibName OBFUSCATE("libil2cpp.so")
struct {
bool AddGold;
} Sbyky;
void (*AddGoldPtr)(void* _this, double value);
void (*_AddGoldUpd)(void *Gold);
void AddGoldUpd(void *Gold) {
if(Gold != NULL) {
if(Sbyky.AddGold) {
AddGoldPtr(Gold, 1.79769313486231570e+308);
}
}
_AddGoldUpd(Gold);
}
#if defined(__aarch64__) //To compile this code for arm64 lib only.
#else //To compile this code for armv7 lib only.
AddGoldPtr = (void (*) (void *, double))getAbsoluteAddress("libil2cpp.so", 0x11974F8);
HOOK_LIB("libil2cpp.so", "0x1199FCC", AddGold, _AddGold);
jobjectArray GetFeatureList(JNIEnv *env, jobject context) {
jobjectArray ret;
const char *features[] = {
OBFUSCATE("Toggle_Get Massive Gold"), //0 Case
//BE CAREFUL NOT TO ACCIDENTLY REMOVE break;
switch (featNum) {
case 0:
Sbyky.AddGold = boolean;
break;
}
// RVA: 0x11974F8 Offset: 0x11974F8 VA: 0x11974F8
private void set_Gold(SecuredDouble value) { }
// RVA: 0x1199FCC Offset: 0x1199FCC VA: 0x1199FCC
public void AddGold(SecuredDouble gold) { }
How does this void hook use an enum call with an obfuscate button// Namespace:
public static class GameUtil
// RVA: 0x5FA2C8 Offset: 0x5FA2C8 VA: 0x5FA2C8
public static void CheckTutorial(eTutorialType type) { }
// Namespace:
public enum eTutorialType // TypeDefIndex: 9717
{
// Fields
public int value__; // 0x0
public const eTutorialType Found_Basecamp = 0;
public const eTutorialType Show_Shop = 1;
public const eTutorialType Show_Production = 2;
public const eTutorialType Interaction_EmergencyKit = 3;
public const eTutorialType Interaction_Map = 4;
public const eTutorialType Open_FireType = 5;
public const eTutorialType Throw_Grenade = 6;
}
How does this void hook utilize an enum call with an obfuscate button?// Namespace:
public static class GameUtil
// RVA: 0x5FA2C8 Offset: 0x5FA2C8 VA: 0x5FA2C8
public static void CheckTutorial(eTutorialType type) { }
// Namespace:
public enum eTutorialType // TypeDefIndex: 9717
{
// Fields
public int value__; // 0x0
public const eTutorialType Found_Basecamp = 0;
public const eTutorialType Show_Shop = 1;
public const eTutorialType Show_Production = 2;
public const eTutorialType Interaction_EmergencyKit = 3;
public const eTutorialType Interaction_Map = 4;
public const eTutorialType Open_FireType = 5;
public const eTutorialType Throw_Grenade = 6;
}
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies