diff --git a/PATCHES.md b/PATCHES.md new file mode 100644 index 0000000..271d5e9 --- /dev/null +++ b/PATCHES.md @@ -0,0 +1,7 @@ +## `ssl_verify_cert_chain` +- can be identified by `ssl_client` string (string is also used in .data, safe to ignore) +- patch first error check to always take, but return 1 instead of 0 in the error case, problem solved! + +## `X509_verify_cert` +- Chromium calls this directly because screw you +- just replace the whole function with `li r3, 1; blr` diff --git a/src/patcher/ingame.cpp b/src/patcher/ingame.cpp index a198d58..e20de15 100644 --- a/src/patcher/ingame.cpp +++ b/src/patcher/ingame.cpp @@ -19,6 +19,7 @@ #include #include "patches/youtube.h" +#include "patches/just_dance_2016.h" void RunPatcher() { auto orplinfo = TryGetRPLInfo(); @@ -53,4 +54,5 @@ void RunPatcher() { // "always" patches Patch_youtube(titleVer, titleId, rpls); + Patch_just_dance_2016(titleVer, titleId, rpls); } diff --git a/src/patcher/patches/just_dance_2016.cpp b/src/patcher/patches/just_dance_2016.cpp new file mode 100644 index 0000000..684b1f2 --- /dev/null +++ b/src/patcher/patches/just_dance_2016.cpp @@ -0,0 +1,24 @@ +// +// Created by ash on 24/10/22. +// + +#include "just_dance_2016.h" +#include "utils/logger.h" +#include "patcher/patcher.h" + +#include + +void Patch_just_dance_2016(uint32_t titleVer, uint64_t titleId, const rplinfo& rpls) { + if (titleId == 0x00050000101B9800 && titleVer == 32) { + auto rpx = FindRPL(rpls, "wiiu_ua_engine_f.rpx"); + if (!rpx) return; + + DEBUG_FUNCTION_LINE("Detected JD2016 EUR v%d - patching...", titleVer); + // OpenSSL ssl_verify_cert_chain + PatchInstruction((void*)(rpx->textAddr + 0x0200907c), 0x40820020, 0x60000000); + PatchInstruction((void*)(rpx->textAddr + 0x02009094), 0x38600000, 0x38600001); + // OpenSSL X509_verify_cert (just in case lol) + PatchInstruction((void*)(rpx->textAddr + 0x0203ebfc), 0x9421ffb8, 0x38600001); + PatchInstruction((void*)(rpx->textAddr + 0x0203ec00), 0xbe410010, 0x4e800020); + } +} diff --git a/src/patcher/patches/just_dance_2016.h b/src/patcher/patches/just_dance_2016.h new file mode 100644 index 0000000..73f44b0 --- /dev/null +++ b/src/patcher/patches/just_dance_2016.h @@ -0,0 +1,12 @@ +// +// Created by ash on 24/10/22. +// + +#ifndef INKAY_JUST_DANCE_2016_H +#define INKAY_JUST_DANCE_2016_H + +#include "patcher/rplinfo.h" + +void Patch_just_dance_2016(uint32_t titleVer, uint64_t titleId, const rplinfo& rpls); + +#endif //INKAY_JUST_DANCE_2016_H