diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index b2212a6d..c988eadf 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -10,7 +10,7 @@ jobs: target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6, DD2, MHWILDS] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: submodules: recursive @@ -21,7 +21,7 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ${{matrix.target}} - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 with: name: ${{matrix.target}} path: ${{github.workspace}}/build/bin/${{matrix.target}}/dinput8.dll diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 13ee5763..059df3fa 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -42,7 +42,7 @@ jobs: target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6, DD2, MHWILDS] steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: submodules: recursive fetch-depth: 0 @@ -67,7 +67,7 @@ jobs: 7z rn ${{github.workspace}}/${{matrix.target}}.zip scripts reframework/autorun - name: Upload artifacts - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 with: name: ${{matrix.target}} path: ${{github.workspace}}/${{matrix.target}}.zip @@ -79,7 +79,7 @@ jobs: if: github.ref == 'refs/heads/master' steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false diff --git a/src/mods/IntegrityCheckBypass.cpp b/src/mods/IntegrityCheckBypass.cpp index 94e91653..20483a5a 100644 --- a/src/mods/IntegrityCheckBypass.cpp +++ b/src/mods/IntegrityCheckBypass.cpp @@ -639,6 +639,8 @@ void IntegrityCheckBypass::immediate_patch_dd2() { spdlog::info("[IntegrityCheckBypass]: Scanning DD2..."); const auto game = utility::get_executable(); + const auto game_size = utility::get_module_size(game).value_or(0); + const auto game_end = (uintptr_t)game + game_size; #if TDB_VER >= 74 init_anti_debug_watcher(); @@ -704,6 +706,18 @@ void IntegrityCheckBypass::immediate_patch_dd2() { } else { spdlog::error("[IntegrityCheckBypass]: Could not find createBLAS!"); } + + static std::vector sus_constant_patches{}; + + for (auto ref = utility::scan(game, "81 ? E1 53 BD 4C"); + ref.has_value(); + ref = utility::scan(*ref + 1, (game_end - (*ref + 1)) - 0x1000, "81 ? E1 53 BD 4C")) + { + // Patch to 0x1337BEEF + sus_constant_patches.emplace_back(Patch::create(*ref + 2, { 0xEF, 0xBE, 0x37, 0x13 }, true)); + } + + spdlog::info("[IntegrityCheckBypass]: Patched {} sus_constants!", sus_constant_patches.size()); #endif const auto conditional_jmp_block = utility::scan(game, "41 8B ? ? 78 83 ? 07 ? ? 75 ?");