Wednesday 29 November 2023

MSHookFunction issue. Game crashes instantly on launch

I havent really got too much of a clue of what I am doing as I don't exaactly have a clear understanding off how MS stuff works. I follow this tutorial. Not sure if its out dated or not. Code: @import Foundation; @import UIKit; #import "Menu.h" #import <substrate.h> #import <mach-o/dyld.h> #include <substrate.h> /*%ctor { [APMenu.sharedInstance setTargetBinaryNamed:APEncrypt("@Framework/UnityFramework.framework/UnityFramework")]; //[APMenu.sharedInstance setTargetBinaryNamed:@"Frameworks/FrameworkName.framework/ExecutableName"]; //[APPatch writeToOffset:APEncrypt("10020081C") hexValue:APEncrypt("C0035FD6")]; // // obf long: get_Value)_ //[APPatch writeToOffset:APEncrypt("024E038C") hexValue:APEncrypt("400680D21F2003D5C0035FD6")]; // //iG_writeData((APEncrypt("1001D9900")), APEncrypt("20008052C0035FD6")); // writeData is still available for use }*/ // ignore WIP void infAutoSwipe() { } bool ReturnTrue() { return true; } double ReturnNone() { return 0; } double multi() { return 99; } %ctor{ [APMenu.sharedInstance setTargetBinaryNamed:APEncrypt("@Framework/UnityFramework.framework/UnityFramework")]; //MSHookFunction(((void*)MSFindSymbol(NULL, "Alexplay.OilRush.App.Extraction.Machines.SwipeChargingMachineActionDetector$$SetSwipeProgress")),(void*)infAutoSwipe, NULL); // should give inf auto swipe MSHookFunction(((bool*)MSFindSymbol(NULL, "Alexplay.OilRush.App.Extraction.Machines.MachineUtils$$IsMachineOwned")),(bool*)ReturnTrue, NULL); // own all machines MSHookFunction(((double*)MSFindSymbol(NULL, "Alexplay.OilRush.App.Extraction.Machines.Upgrades.MachineUpgradeUtils$$GetPrice")),(double*)ReturnNone, NULL); // 0 upgrade price MSHookFunction(((double*)MSFindSymbol(NULL, "Alexplay.OilRush.App.Extraction.Machines.Machine$$get_ExtractionMultiplier")),(double*)multi, NULL); // 99x extract multi } If someone could help that would mean alot aswell as give a good explanation of function hooking etc. The tutorials available kind of confuse me. Also some functions have custom types and or types that I cannot define by default so I am not too sure what to do about those.

from iOSGods RSS Feed https://ift.tt/HnTvWBy

No comments:

Post a Comment