From 7b2c17313812e03ad68318fbf9f2c3e600bef062 Mon Sep 17 00:00:00 2001 From: ThirteenAG Date: Tue, 16 Jan 2024 20:24:22 +0800 Subject: [PATCH] fix assembly2 --- source/extrainfo.ixx | 4 ++-- source/includes/assembly2.hpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/extrainfo.ixx b/source/extrainfo.ixx index 3c5a693f..dc7c4979 100644 --- a/source/extrainfo.ixx +++ b/source/extrainfo.ixx @@ -25,7 +25,7 @@ public: { struct MS_PAUSED_HOOK { - void operator()(injector::reg_pack& regs) + void operator()(SafetyHookContext& regs) { static std::wstring extra = L""; regs.eax += 0x78; @@ -47,7 +47,7 @@ public: regs.eax = (uintptr_t)extra.c_str(); } - }; injector::MakeInline(pattern.get_first(0)); + }; injector::MakeInline2(pattern.get_first(0)); } } }; diff --git a/source/includes/assembly2.hpp b/source/includes/assembly2.hpp index 3f99958f..240a6ccd 100644 --- a/source/includes/assembly2.hpp +++ b/source/includes/assembly2.hpp @@ -39,6 +39,7 @@ namespace injector template void MakeInline2(memory_pointer_tr at) { + MakeNOP(at, 5); typedef injector_asm2::wrapper functor; if(false) functor::call(nullptr); // To instantiate the template, if not done _asm will fail injector_asm2::make_SafetyHookContext_and_call(at);