Add EUR watch dogs patch

This commit is contained in:
Rambo6Glaz 2023-07-11 09:39:24 +02:00
commit 58357a59ee
3 changed files with 37 additions and 0 deletions

View file

@ -20,6 +20,7 @@
#include "patches/youtube.h"
#include "patches/just_dance.h"
#include "patches/watch_dogs.h"
void RunPatcher() {
auto orplinfo = TryGetRPLInfo();
@ -55,4 +56,5 @@ void RunPatcher() {
// "always" patches
Patch_youtube(titleVer, titleId, rpls);
Patch_just_dance(titleVer, titleId, rpls);
Patch_watch_dogs(titleVer, titleId, rpls);
}

View file

@ -0,0 +1,23 @@
//
// Created by rambo on 11/07/23.
//
#include "watch_dogs.h"
#include "utils/logger.h"
#include "patcher/patcher.h"
#include <cstdint>
void Patch_watch_dogs(uint32_t titleVer, uint64_t titleId, const rplinfo& rpls) {
if (titleId == 0x00050000'10140500 && titleVer == 0) {
auto rpx = FindRPL(rpls, "duniademo.rpx");
if (!rpx) return;
DEBUG_FUNCTION_LINE("Detected WATCH_DOGS EUR v%d - patching...", titleVer);
// Disable Proxy CURL settings (use current connection settings)
PatchInstruction((void*)(rpx->textAddr + 0x04A3B4EC), 0x7C0802A6, 0x38600001);
PatchInstruction((void*)(rpx->textAddr + 0x04A3B4F0), 0x9421FFE8, 0x4E800020);
// Disable NSSL verify nlibcurl
PatchInstruction((void*)(rpx->textAddr + 0x04A3B8F8), 0x38000007, 0x38000000);
}
}

View file

@ -0,0 +1,12 @@
//
// Created by rambo on 11/07/23.
//
#ifndef INKAY_WATCH_DOGS_H
#define INKAY_WATCH_DOGS_H
#include "patcher/rplinfo.h"
void Patch_watch_dogs(uint32_t titleVer, uint64_t titleId, const rplinfo& rpls);
#endif //INKAY_WATCH_DOGS_H