From db160ef6f2f1a9333c3d7d63dffca3cc0b7e61ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:37:30 +0800 Subject: [PATCH] rename --- LunaHook/CMakeLists.txt | 2 +- LunaHook/engine64/ENTERGRAM.h | 15 --------------- .../{ENTERGRAM.cpp => UnrealEngine.cpp} | 6 +++--- LunaHook/engine64/UnrealEngine.h | 19 +++++++++++++++++++ LunaHook/enginecollection64.cpp | 4 ++-- 5 files changed, 25 insertions(+), 21 deletions(-) delete mode 100644 LunaHook/engine64/ENTERGRAM.h rename LunaHook/engine64/{ENTERGRAM.cpp => UnrealEngine.cpp} (92%) create mode 100644 LunaHook/engine64/UnrealEngine.h diff --git a/LunaHook/CMakeLists.txt b/LunaHook/CMakeLists.txt index 47554ac..cb2490f 100644 --- a/LunaHook/CMakeLists.txt +++ b/LunaHook/CMakeLists.txt @@ -1,6 +1,6 @@ include_directories(. util engines) if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) - set(enginessrc MKXPZ Ryujinx livecaptions Kincaid vita3k rpcs3 yuzu TYPEMOON ENTERGRAM AGES7 mono Godot 5pb lucasystem LightVN V8 pchooks Artemis KiriKiri YOX PPSSPP CMVS Suika2 ) + set(enginessrc MKXPZ Ryujinx livecaptions Kincaid vita3k rpcs3 yuzu TYPEMOON UnrealEngine AGES7 mono Godot 5pb lucasystem LightVN V8 pchooks Artemis KiriKiri YOX PPSSPP CMVS Suika2 ) set(enginepath "engine64") set(collector "enginecollection64.cpp") else() diff --git a/LunaHook/engine64/ENTERGRAM.h b/LunaHook/engine64/ENTERGRAM.h deleted file mode 100644 index 206e71c..0000000 --- a/LunaHook/engine64/ENTERGRAM.h +++ /dev/null @@ -1,15 +0,0 @@ - - -class ENTERGRAM:public ENGINE{ - public: - ENTERGRAM(){ - - check_by=CHECK_BY::CUSTOM; - is_engine_certain=false; - check_by_target=[](){ - return GetProcAddress(GetModuleHandleA(0),"agsCheckDriverVersion"); - }; - }; - bool attach_function(); -}; - \ No newline at end of file diff --git a/LunaHook/engine64/ENTERGRAM.cpp b/LunaHook/engine64/UnrealEngine.cpp similarity index 92% rename from LunaHook/engine64/ENTERGRAM.cpp rename to LunaHook/engine64/UnrealEngine.cpp index 94cb5ee..741419b 100644 --- a/LunaHook/engine64/ENTERGRAM.cpp +++ b/LunaHook/engine64/UnrealEngine.cpp @@ -1,4 +1,4 @@ -#include "ENTERGRAM.h" +#include "UnrealEngine.h" bool ENTERGRAMfilter(void *data, size_t *size, HookParam *hp) { @@ -37,9 +37,9 @@ bool InsertENTERGRAM() hp.filter_fun = ENTERGRAMfilter; hp.offset = get_reg(regs::rsi); hp.newlineseperator = L"\\n"; - return NewHook(hp, "ENTERGRAM"); + return NewHook(hp, "UnrealEngine"); } -bool ENTERGRAM::attach_function() +bool UnrealEngine::attach_function() { return InsertENTERGRAM(); } diff --git a/LunaHook/engine64/UnrealEngine.h b/LunaHook/engine64/UnrealEngine.h new file mode 100644 index 0000000..4708311 --- /dev/null +++ b/LunaHook/engine64/UnrealEngine.h @@ -0,0 +1,19 @@ + + +class UnrealEngine : public ENGINE +{ +public: + UnrealEngine() + { + + check_by = CHECK_BY::CUSTOM; + is_engine_certain = false; + check_by_target = []() + { + // Copyright Epic Games, Inc. All Rights Reserved. + //++UE4+Release-4.27-CL-0 + return Util::SearchResourceString(L"Copyright Epic Games") || Util::SearchResourceString(L"UnrealEngine") || GetProcAddress(GetModuleHandleA(0), "agsCheckDriverVersion"); + }; + }; + bool attach_function(); +}; diff --git a/LunaHook/enginecollection64.cpp b/LunaHook/enginecollection64.cpp index eb2d12c..1a58b27 100644 --- a/LunaHook/enginecollection64.cpp +++ b/LunaHook/enginecollection64.cpp @@ -12,7 +12,7 @@ #include "engine64/CMVS.h" #include "engine64/5pb.h" #include "engine64/lucasystem.h" -#include "engine64/ENTERGRAM.h" +#include "engine64/UnrealEngine.h" #include "engine64/TYPEMOON.h" #include "engine64/Kincaid.h" #include "engine64/LightVN.h" @@ -41,7 +41,7 @@ std::vector check_engines() new AGES7, new _5pb, new TYPEMOON, - new ENTERGRAM, + new UnrealEngine, new yuzu, new PPSSPPengine, new vita3k,