Hi All, I'm currently creating a series of mod menu's using Ted2's template - I'm bumping into similar issues for a couple of mods. I'm looking for a way to modify a field. Hypothetical Example: Assume we have this decompiled from il/dnSpy [Token(Token = "0x2000342")] public class Item { [Token(Token = "0x400131B")] [FieldOffset(Offset = "0x1C")] public int Amount; [Token(Token = "0x4001313")] [FieldOffset(Offset = "0x30")] public bool IsUnlimited; [Address(RVA = "0x1ABB3A8", Offset = "0x1ABB3A8", VA = "0x1ABB3A8")] public void Init(CRefItem refMain, int amount = 0, bool is_attached = false) { } ... } There is no getter or setter for the Amount or IsUnlimited field. Goal: Forceable set Amount to 9999 for all Items. Forceable set IsUnlimited to True for all Items. Attempts and Theory: In Ted2's template, the best approach i've been able to figure out to get anywhere close to a meaningful outcome is hooking to the init function and pass in desired Amount argument. However, Tweak.xm Doesnt know what a CRefItem is, So I cant pass this param into my reinterpreted cast Heres an example Tweak.xm to show this offset for the init function is 0x1ABB3A8 #import "Macros.h" auto modInit = reinterpret_cast<void(*) (void *, CRefItem, int, bool)>(getRealOffset(0x1ABB3A8)); void(*oldInit)(void *this_); void newInit(void *this_) { if ([switches isSwitchOn:@"9999 Items"]) { modInit(this_, ???????? ,9999, false); return; } old_Init(this_); } // SETUP void setup() { HOOK(0x1ABB3A8, newInit, oldInit); [switches addSwitch:@"9999 Items" description:@"Enable on Oppenents Turn" ]; } ... Rest of Ted2 Stuff Notice: This isnt working code - this is just an example of whats going through my mind Issues I see: 1) I'm not too sure what to hook onto in the setup as i've already got a casted reference to the Init function - hooking into something im casting to and calling again seems like a bad idea. 2) Im not too sure how to pass the CRefItem argument into the modInit call. 3) IsAttached arg will always be False - which may not always be the case - would be nice to know how to get the original passed args 4) Does not deal with IsUnlimited field 5) I could go up the tree in the decompiled code and cast to functions elsewhere but they all require types which I dont understand how to pass (Vector3, CRefItem...) Reading From Other NIC Templates: I'v been digging around and noticed something in R16s template called UIKeyPatch, From the docs it seems like you're able to set the value of a field using the fields offset //call these inside ur own custom functions *(int*)[UIKeyPatch address:@"0x1C" ptr:this_] = 9999; *(bool*)[UIKeyPatch address:@"0x30" ptr:this_] = true; As we don't have UIKeyPatch in Ted2 and the R16 repo seems to be offline, I can't find out how UIKeyPatch was implemented. The example doesnt show what would be hooked into in the setup function in Tweak.xm as I assume the offsets wouldnt work be different if I hooked into the Init function. Correct me if im wrong. Ask I hope the above examples highlights the gaps in my knowledge and give enough info on what I'm trying to achieve. As I'm using Ted2 and given the R16 Nic Template is unavailable. I've come here to seek help on making this happen. Any advice which can put me on the right path will be greatly appreciated
from iOSGods RSS Feed https://ift.tt/yo9EMD3
Subscribe to:
Post Comments (Atom)
-
Yubo Yoti bypass Requirements: Yubo app Jailbroken iPhone Apps Manager Brain Steps: Open Apps Manager Locate Yubo in Apps Manager and open i...
-
Modded/Hacked App: Simply Guitar by JoyTunes by JoyTunes Bundle ID: com.joytunes.SimplyGuitar iTunes Store Link: https://ift.tt/2ANDd7d Mod ...
-
I don't know how this happened, i was trying to install Kinemaster modded version on my iPhone 7 running iOS 14.0.1, maybe it's beca...
-
Hey everyone I am running Ipad 6th generation running ios 14.0 32 gb capacity with 19.1 gb left I used sideloadly yesterday to install an ap...
-
Hello! I am using this for practice using a dummy Snapchat account I've made and created a My Eyes Only tab. Now, if you don't know ...
-
Hello, does anyone know why I cannot use my Apple password or password from apple servers? Sideloadly version 0.16.1 Checking iOS version......
-
As the title says upon installing Last Day on Earth with sideloadly i get this error ERROR: Guru Meditation 6020bc@89:f11511 Call to np_clie...
-
Hello friends, So I have a problem with Sideloadly, I installed it on my (32x bit Windows 7) laptop (SONY) and tried opening it, but when I ...
-
Hello, I am currently running with an iPhone XR on IOS 12.2. I am trying to install ipa files through cydia impactor but keep receiving this...
-
Netflix is now offering users a chance to win a free subscription for 83 years. The company calls it the “immortal” Netflix account. T...
No comments:
Post a Comment