This commit is contained in:
恍兮惚兮 2024-04-02 10:40:03 +08:00
parent a8d8e362dd
commit 6c18608566
2 changed files with 7 additions and 1 deletions

View File

@ -386,6 +386,12 @@ void SearchForHooks(SearchParam spUser)
{
safeautoleaveveh=false;
ConsoleOutput(HOOK_SEARCH_INITIALIZED, jitaddr2emuaddr.size());
uintptr_t minemaddr=-1,maxemaddr=0;
for(auto addr:jitaddr2emuaddr){
minemaddr=min(minemaddr,addr.first);
maxemaddr=max(maxemaddr,addr.first);
}
ConsoleOutput("%p %p",minemaddr);
std::vector<uint64_t>successaddr;int i=0;
for(auto addr:jitaddr2emuaddr){
i+=1;

View File

@ -216,7 +216,7 @@ void delayinsertNewHook(uintptr_t em_address){
NewHook(h.second,h.first.c_str());
}
bool NewHook(HookParam hp, LPCSTR name){
if(hp.address)
if(hp.address||hp.jittype==JITTYPE::PC)
return NewHook_1(hp,name);
//下面的是手动插入
if(emuaddr2jitaddr.find(hp.emu_addr)==emuaddr2jitaddr.end()){