Skip to content

Commit

Permalink
Merge branch 'master' into csharp-api
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Mar 3, 2025
2 parents 7f8f615 + 702e973 commit 2189ac0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
14 changes: 14 additions & 0 deletions src/mods/IntegrityCheckBypass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -704,6 +706,18 @@ void IntegrityCheckBypass::immediate_patch_dd2() {
} else {
spdlog::error("[IntegrityCheckBypass]: Could not find createBLAS!");
}

static std::vector<Patch::Ptr> 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 ?");
Expand Down

0 comments on commit 2189ac0

Please sign in to comment.