From a46fb9e0c4c493c6816a2c2fc5b7cb9e6f888a5c Mon Sep 17 00:00:00 2001 From: dankmeme01 <42031238+dankmeme01@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:42:29 +0100 Subject: [PATCH] double the size of the handler and the trampoline --- src/Handler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Handler.cpp b/src/Handler.cpp index 644123c..32de7df 100644 --- a/src/Handler.cpp +++ b/src/Handler.cpp @@ -23,10 +23,10 @@ Result> Handler::create(void* address, HandlerMetadata auto content = new (ret->m_content) HandlerContent(); // std::cout << std::hex << "m_content: " << (void*)ret->m_content << std::endl; - TULIP_HOOK_UNWRAP_INTO(ret->m_handler, Target::get().allocateArea(0x180)); + TULIP_HOOK_UNWRAP_INTO(ret->m_handler, Target::get().allocateArea(0x300)); // std::cout << std::hex << "m_handler: " << (void*)ret->m_handler << std::endl; - TULIP_HOOK_UNWRAP_INTO(ret->m_trampoline, Target::get().allocateArea(0x80)); + TULIP_HOOK_UNWRAP_INTO(ret->m_trampoline, Target::get().allocateArea(0x100)); auto wrapperMetadata = WrapperMetadata{ .m_convention = metadata.m_convention, @@ -118,16 +118,16 @@ void Handler::reorderFunctions() { Result<> Handler::interveneFunction() { return Target::get().writeMemory( - Target::get().getRealPtr(m_address), - static_cast(m_modifiedBytes.data()), + Target::get().getRealPtr(m_address), + static_cast(m_modifiedBytes.data()), m_modifiedBytes.size() ); } Result<> Handler::restoreFunction() { return Target::get().writeMemory( - Target::get().getRealPtr(m_address), - static_cast(m_originalBytes.data()), + Target::get().getRealPtr(m_address), + static_cast(m_originalBytes.data()), m_originalBytes.size() ); }