alrighty.
/* Generated using http://armconverter.com/codeinjectgenerator/ */
/* To MSHook Offsets, use http://armconverter.com/mshookgenerator/ */
#import "writeData.h"
#import <Foundation/Foundation.h>
#import <substrate.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iosgods.postknightgaius.plist"
inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
%ctor {
if(GetPrefBool(@"skillpoints")) {
writeData(0xoffset, 0xhex);
} else {
}
if(GetPrefBool(@"diamonds")) {
writeData(0xoffset, 0xhex);
writeData(0xoffset, 0xhex);
} else {
}
if(GetPrefBool(@"coins")) {
writeData(0xoffset, 0xhex);
writeData(0xoffset, 0xhex);
} else {
}
}
I'm using thumb hex for the hex because it was all 2 byte. And for offset I'm using the one you'd type in in a hex editor. I've tried the one next to the instructions too.