This commit is contained in:
恍兮惚兮 2024-05-09 15:30:31 +08:00
parent 5f2f2e55f7
commit d6fafd58fe
2 changed files with 8 additions and 1 deletions

View File

@ -207,10 +207,16 @@ bool NewHook(HookParam hp, LPCSTR name){
return NewHook_1(hp,name); return NewHook_1(hp,name);
if(hp.jittype==JITTYPE::UNITY){ if(hp.jittype==JITTYPE::UNITY){
auto spls=strSplit(hp.unityfunctioninfo,":"); auto spls=strSplit(hp.unityfunctioninfo,":");
if(spls.size()!=5){
ConsoleOutput("invalid");
return false;
}
hp.address = tryfindmonoil2cpp(spls[0].c_str(),spls[1].c_str() ,spls[2].c_str(),spls[3].c_str(),std::stoi(spls[4])); hp.address = tryfindmonoil2cpp(spls[0].c_str(),spls[1].c_str() ,spls[2].c_str(),spls[3].c_str(),std::stoi(spls[4]));
if(!hp.address) if(!hp.address){
ConsoleOutput("not find");
return false; return false;
}
return NewHook_1(hp,name); return NewHook_1(hp,name);
} }
//下面的是手动插入 //下面的是手动插入

View File

@ -168,6 +168,7 @@ namespace
if(hp.jittype==JITTYPE::UNITY){ if(hp.jittype==JITTYPE::UNITY){
if(HCode[0]!=L'@')return {}; if(HCode[0]!=L'@')return {};
HCode.erase(0,1); HCode.erase(0,1);
HCode=HCode.substr(0,HCode.size()-wcslen(L":JIT:UNITY"));
hp.argidx=hp.offset; hp.argidx=hp.offset;
hp.offset=0; hp.offset=0;
hp.address=0; hp.address=0;