Skip to content

Commit

Permalink
Make code better readable
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
  • Loading branch information
V10lator committed Jan 30, 2023
1 parent 67d0206 commit 61ea1aa
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@

#include <mocha/mocha.h>

#define VALUE_A 0xe3a00000 // mov r0, #0
#define VALUE_B 0xe12fff1e // bx lr
#define VALUE_C 0x20004770 // mov r0, #0; bx lr

int main(int argc, char **argv)
{
if (Mocha_InitLibrary() == MOCHA_RESULT_SUCCESS) {
Mocha_IOSUKernelWrite32(0x5014cac,0x20004770); // patch_MCP_authentication_check
Mocha_IOSUKernelWrite32(0x5052c44,0xe3a00000); // patch_IOSC_VerifyPubkeySign - first u32
Mocha_IOSUKernelWrite32(0x5052c48,0xe12fff1e); // patch_IOSC_VerifyPubkeySign - second u32
Mocha_IOSUKernelWrite32(0x5052a90,0xe3a00000); // patch_cert_verification - first u32
Mocha_IOSUKernelWrite32(0x5052a94,0xe12fff1e); // patch_cert_verification - second u32
Mocha_IOSUKernelWrite32(0x5054d6c,0xe3a00000); // patch_cached_cert_check - first u32
Mocha_IOSUKernelWrite32(0x5054d70,0xe12fff1e); // patch_cached_cert_check - second u32
Mocha_IOSUKernelWrite32(0x5014cac, VALUE_C); // patch_MCP_authentication_check
Mocha_IOSUKernelWrite32(0x5052c44, VALUE_A); // patch_IOSC_VerifyPubkeySign - first u32
Mocha_IOSUKernelWrite32(0x5052c48, VALUE_B); // patch_IOSC_VerifyPubkeySign - second u32
Mocha_IOSUKernelWrite32(0x5052a90, VALUE_A); // patch_cert_verification - first u32
Mocha_IOSUKernelWrite32(0x5052a94, VALUE_B); // patch_cert_verification - second u32
Mocha_IOSUKernelWrite32(0x5054d6c, VALUE_A); // patch_cached_cert_check - first u32
Mocha_IOSUKernelWrite32(0x5054d70, VALUE_B); // patch_cached_cert_check - second u32
Mocha_DeInitLibrary();
}

Expand Down

0 comments on commit 61ea1aa

Please sign in to comment.