Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
CaramelBox
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jun 4, 2024
1 parent ba0479c commit d420d17
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
18 changes: 18 additions & 0 deletions LunaHook/engine32/CaramelBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
15 changes: 15 additions & 0 deletions LunaHook/engine32/CaramelBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};
3 changes: 2 additions & 1 deletion LunaHook/enginecollection32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ std::vector<ENGINE*> check_engines(){
new mirage,
new VALKYRIA,
new CoffeeMaker,
new Fizz
new Fizz,
new CaramelBox2
};

}
Expand Down

0 comments on commit d420d17

Please sign in to comment.