forked from nb1027/Source
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMain.cpp
More file actions
26 lines (19 loc) · 720 Bytes
/
Main.cpp
File metadata and controls
26 lines (19 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "Memory.h"
#include "Cheats.h"
void mainios()
{
long ModuleBaseAddress = (long)_dyld_get_image_header(0);
if (ModuleBaseAddress != 0){
Cheats::Run();
}
}
static void didFinishLaunching(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef info)
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
mainios();
});
}
__attribute__((constructor)) static void initialize()
{
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), NULL, &didFinishLaunching, (CFStringRef)UIApplicationDidFinishLaunchingNotification, NULL, CFNotificationSuspensionBehaviorDrop);
}