AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Signature Request Thread (https://forums.alliedmods.net/showthread.php?t=78309)

Chrisber 02-12-2009 19:42

Re: Signature Request Thread
 
Hi.
I'm searching the sig and the mask for CBasePlayer::FireBullets currently.

Thanks,
- Chris

your-name-here 02-12-2009 23:43

Re: Signature Request Thread
 
Quote:

Originally Posted by Chrisber (Post 760673)
Hi.
I'm searching the sig and the mask for CBasePlayer::FireBullets currently.

Thanks,
- Chris

What game?

@CrimsonGT: I couldn't find that sig lol, it's one of those ones that are "unsiggable" unless you tried patchdiff'ing between hl2dm and tf2 :/

Chrisber 02-13-2009 07:27

Re: Signature Request Thread
 
Hi.
For Counterstrike: Source.

Thanks,
- Chris

Keeper 02-13-2009 09:20

Re: Signature Request Thread
 
Can't you just hook that function?

Virtual offset 101...

http://wiki.alliedmods.net/CBasePlayer_Offset_List_(Counter-Strike:_Source)

Chrisber 02-13-2009 09:39

Re: Signature Request Thread
 
How I should do this? I can't lay a hook about all player instances, that not possible. For that, I need the sig and mask, do I!?

~ Chris

Keeper 02-13-2009 09:58

Re: Signature Request Thread
 
You can hook when a player connects, then unhook when they leave. I do this for FireBullets, TraceAttack...

Works fine.

Chrisber 02-13-2009 10:34

Re: Signature Request Thread
 
Nice!
Very cool idea, and yep, it works.
Thank you so much :)

Thanks,
- Chris

CrimsonGT 02-13-2009 11:44

Re: Signature Request Thread
 
Quote:

Originally Posted by your-name-here (Post 760729)
What game?

@CrimsonGT: I couldn't find that sig lol, it's one of those ones that are "unsiggable" unless you tried patchdiff'ing between hl2dm and tf2 :/

haha damnit, ah well. I was hoping :P

L. Duke 02-13-2009 13:18

Re: Signature Request Thread
 
Anyone have any ideas on how I could go about finding CTFGameStats::IncrementStat(CTFPlayer *, TFStatType_t, int) ???

your-name-here 02-13-2009 18:30

Re: Signature Request Thread
 
Quote:

Originally Posted by L. Duke (Post 760988)
Anyone have any ideas on how I could go about finding CTFGameStats::IncrementStat(CTFPlayer *, TFStatType_t, int) ???

I think this is another unsiggable function because each time I get to a function that references it, I get:

Code:

  v11 = 684 * (*(int (__stdcall **)(_DWORD))(*(_DWORD *)dword_1047E1B8 + 72))(*(_DWORD *)(v3 + 24));
  ++*(_DWORD *)(v11 + v4 + 156);
  ++*(_DWORD *)(v11 + v4 + 248);
  ++*(_DWORD *)(v11 + v4 + 340);
  return v11 + v4 + 148;

It doesn't look like it's being directly called :S

What you can probably do is use this:
Code:

\x2A\x2A\x2A\x2A\x2A\x83\xB8\x18\x03\x00\x00\x04\x53\x2A\x2A\x2A\x2A\x56\x57\x8B\xF1\xBF\x01\x00\x00\x00\x75\x39
Which is the (untested) signature for CTFGameStats_Event_PlayerFiredWeapon which calls CTFGameStats::IncrementStats. From there....

Code:

void* pfnIncStats = NULL;
void* pfnFireWeaponFunc = gSigMngr.findsignature(laddr, the_sig_above, length_of_above_sig);

typedef void (*IncrementStatsFunc)( void* /* this */, int /* TFStat Type */, int /* Some random integer :S */);
IncrementStatsFunc pStatsFunc;

//Not sure if this is right. Very low level and only for windows :/
memcpy( pfnIncStats, ((char *)pfnFireWeaponFunc + 0x65), sizeof(char *) );

//Call the function :D
//....

This should rip the pointer to CTFGameStats__IncStats directly from eax (assuming I did the hex right :P)

Let me know if it works for you.


All times are GMT -4. The time now is 19:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.