Thread: CollisionHook
View Single Post
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 02-16-2021 , 09:30   Re: CollisionHook
Reply With Quote #119

Quote:
Originally Posted by cravenge View Post
What's the string to search for in order to find this function? The reason why I'm asking this is cuz I want to get its base address instead since I'm using BHaType's hooking via script manager method.
You can find it by searching "RagdollImpact" which will lead you to the "CBaseEntity::FireBullets" function. That function contains other strings you can reference but the "RagdollImpact" is the one closest to the function we'll need. A little below that string, you'll see a function called "Pickup_ForcePlayerToDropThisObject" (the function we need) which will only have two references. The second one will be the function "CTraceFilterMelee::ShouldHitEntity". When you look inside that function, you will see that it calls "PassServerEntityFilter" in the Linux binaries. In the Windows binaries, it'll be the 2nd subroutine that you'll see in an "if" statement.

Linux:
PHP Code:
v3 0;
  if ( (
unsigned __int8)StandardFilterRules(a2a3) )
  {
    if ( 
PassServerEntityFilter(a2, *((const IHandleEntity **)this 1))
      && !(*(
unsigned __int8 (__cdecl **)(intIHandleEntity *))(*(_DWORD *)staticpropmgr 8))(staticpropmgra2) )
    { 
Windows:
PHP Code:
if ( !(unsigned __int8)sub_1020B800(a2a3)
    || !(
unsigned __int8)sub_1020B760(a2, *(_DWORD *)(this 4)) 
I ran makesig.idc on "sub_1020B760" and got the same signature (minus the last wildcarded byte) as Spirit_12:
PHP Code:
Signature for sub_1020B760:
55 8B EC 57 8B 7D 0C 85 FF 75 
\
x55\x8B\xEC\x57\x8B\x7D\x0C\x85\xFF\x75\x2A 
__________________

Last edited by Psyk0tik; 02-16-2021 at 09:32.
Psyk0tik is offline