mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-27 07:44:02 +08:00
fix
This commit is contained in:
parent
bf316dd54a
commit
0df7ec6832
@ -322,6 +322,10 @@ void SearchForHooks(SearchParam spUser)
|
|||||||
}
|
}
|
||||||
else if(sp.search_method==1){
|
else if(sp.search_method==1){
|
||||||
for(uintptr_t addr=sp.minAddress;addr<sp.maxAddress;addr++){
|
for(uintptr_t addr=sp.minAddress;addr<sp.maxAddress;addr++){
|
||||||
|
if(IsBadReadPtr((void*)addr,0x1000)){
|
||||||
|
addr+=0x1000-1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(((*(DWORD*)addr)==0xCCCCCCCC)||((*(DWORD*)addr)==0x90909090)){
|
if(((*(DWORD*)addr)==0xCCCCCCCC)||((*(DWORD*)addr)==0x90909090)){
|
||||||
if(((*(BYTE*)(addr+4))!=0xCC)&&(*(BYTE*)(addr+4))!=0x90){
|
if(((*(BYTE*)(addr+4))!=0xCC)&&(*(BYTE*)(addr+4))!=0x90){
|
||||||
addresses1.push_back(addr+4);
|
addresses1.push_back(addr+4);
|
||||||
@ -331,6 +335,10 @@ void SearchForHooks(SearchParam spUser)
|
|||||||
}
|
}
|
||||||
else if(sp.search_method==2){
|
else if(sp.search_method==2){
|
||||||
for(uintptr_t addr=sp.minAddress;addr<sp.maxAddress;addr++){
|
for(uintptr_t addr=sp.minAddress;addr<sp.maxAddress;addr++){
|
||||||
|
if(IsBadReadPtr((void*)addr,0x1000)){
|
||||||
|
addr+=0x1000-1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(((*(BYTE*)addr)==0xe8)){
|
if(((*(BYTE*)addr)==0xe8)){
|
||||||
auto off=*(DWORD*)(addr+1);
|
auto off=*(DWORD*)(addr+1);
|
||||||
auto funcaddr=addr+5+off;
|
auto funcaddr=addr+5+off;
|
||||||
|
Loading…
Reference in New Issue
Block a user