Пример #1
0
//Patches
void patchFirm(){
    
    //Disable signature checks
    memcpy((u8*)sigPatch(1), sigPat1, sizeof(sigPat1));
    memcpy((u8*)sigPatch(2), sigPat2, sizeof(sigPat2));
    
    //Create arm9 thread
    fileRead((u8*)threadCode(), "/rei/thread/arm9.bin", 0);
    memcpy((u8*)threadHook(1), th1, sizeof(th1));
    memcpy((u8*)threadHook(2), th2, sizeof(th2));
}
Пример #2
0
//Patches
void patchFirm(){
    
    //Part1: Set MPU for payload area
    memcpy((u8*)mpuCode(), mpu, sizeof(mpu));
    
    //Part2: Disable signature checks
    memcpy((u8*)sigPatch(1), sigPat1, sizeof(sigPat1));
    memcpy((u8*)sigPatch(2), sigPat2, sizeof(sigPat2));
    
    //Part3: Create arm9 thread
    fileRead((u8*)threadCode(), "/rei/thread/arm9.bin", 0);
    memcpy((u8*)threadHook(1), th1, sizeof(th1));
    memcpy((u8*)threadHook(2), th2, sizeof(th2));
}