2024-02-07 20:59:24 +08:00
|
|
|
|
#include"VitaminSoft.h"
|
|
|
|
|
|
|
|
|
|
namespace{
|
|
|
|
|
bool _1(){
|
|
|
|
|
//どうして?いじってプリンセスFinalRoad~もう!またこんなところで3~
|
|
|
|
|
bool ok=false;
|
2024-04-25 18:09:46 +08:00
|
|
|
|
for(auto addr:findiatcallormov_all((DWORD)ExtTextOutA,processStartAddress,processStartAddress,processStopAddress,PAGE_EXECUTE)){
|
2024-02-07 20:59:24 +08:00
|
|
|
|
addr = MemDbg::findEnclosingAlignedFunction(addr);
|
|
|
|
|
if (!addr) continue;
|
|
|
|
|
HookParam hp;
|
|
|
|
|
hp.address = addr;
|
|
|
|
|
hp.offset=get_stack(3);
|
|
|
|
|
hp.type = DATA_INDIRECT;
|
|
|
|
|
hp.index = 0;
|
|
|
|
|
ok|=NewHook(hp, "VitaminSoft");
|
|
|
|
|
}
|
|
|
|
|
return ok;
|
|
|
|
|
}
|
|
|
|
|
bool _2(){
|
|
|
|
|
//ねとって女神
|
|
|
|
|
//ねとって女神 NEO
|
|
|
|
|
bool ok=false;
|
2024-04-25 18:09:46 +08:00
|
|
|
|
for(auto addr:findiatcallormov_all((DWORD)TextOutA,processStartAddress,processStartAddress,processStopAddress,PAGE_EXECUTE)){
|
2024-02-07 20:59:24 +08:00
|
|
|
|
addr = MemDbg::findEnclosingAlignedFunction(addr);
|
|
|
|
|
if (!addr) continue;
|
|
|
|
|
HookParam hp;
|
|
|
|
|
hp.address = addr;
|
|
|
|
|
hp.offset=get_stack(1);
|
|
|
|
|
hp.type = USING_STRING;
|
|
|
|
|
ok|=NewHook(hp, "VitaminSoft");
|
|
|
|
|
}
|
|
|
|
|
return ok;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VitaminSoft::attach_function(){
|
|
|
|
|
|
|
|
|
|
return _2()||_1();
|
|
|
|
|
}
|