diff --git a/LunaHook/engine32/CaramelBox.cpp b/LunaHook/engine32/CaramelBox.cpp index 80c55c0..6404b17 100644 --- a/LunaHook/engine32/CaramelBox.cpp +++ b/LunaHook/engine32/CaramelBox.cpp @@ -120,4 +120,22 @@ bool CaramelBoxMilkAji::attach_function(){ hp.offset=get_stack(1); return NewHook(hp, "CaramelBox"); +} +bool CaramelBox2::attach_function(){ + //https://vndb.org/r19777 + //Otoboku - Maidens Are Falling for Me! - Download Edition + trigger_fun=[](LPVOID addr1, hook_stack* stack){ + if(addr1!=TextOutA&& addr1!=GetTextExtentPoint32A)return false; + auto addr=stack->retaddr; + addr = MemDbg::findEnclosingAlignedFunction(addr); + if (addr == 0)return false; + HookParam hp; + hp.address = addr; + hp.type = USING_STRING|USING_SPLIT; + hp.offset=get_stack(2); + hp.split=get_stack(2); + NewHook(hp, "CaramelBox"); + return true; + }; + return true; } \ No newline at end of file diff --git a/LunaHook/engine32/CaramelBox.h b/LunaHook/engine32/CaramelBox.h index 6cae650..707a501 100644 --- a/LunaHook/engine32/CaramelBox.h +++ b/LunaHook/engine32/CaramelBox.h @@ -31,6 +31,21 @@ class CaramelBoxMilkAji:public ENGINE{ check_by_target=L"SdActiRc.dll"; is_engine_certain=false; + }; + bool attach_function(); +}; + +class CaramelBox2:public ENGINE{ + public: + CaramelBox2(){ + + check_by=CHECK_BY::CUSTOM; + check_by_target=[](){ + if(!Util::CheckFile(L"*.mpg"))return true; + char copyright[]="OTOBOKU-CaramelBox";//OTOBOKU-CaramelBox //Software\Caramel-Box\OTOMEHABOKUNIKOISHITERU + return 0!=MemDbg::findBytes(copyright,sizeof(copyright),processStartAddress,min(processStopAddress,processStartAddress+0x200000)); + }; + }; bool attach_function(); }; \ No newline at end of file diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index 65152f3..c288eea 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -332,7 +332,8 @@ std::vector check_engines(){ new mirage, new VALKYRIA, new CoffeeMaker, - new Fizz + new Fizz, + new CaramelBox2 }; }