View Single Post
TheAvenger
Junior Member
Join Date: May 2012
Old 05-04-2012 , 02:52   Re: The art of signature scanning
Reply With Quote #11

Quote:
Originally Posted by joaquimandrade View Post
The thing is: the offset of the pev member in classes is compilation dependent and maybe mod dependent. If you check hamdata.ini in an amxmodx installation you can see:
Code:
@section cstrike linux
    pev 0
@section cstrike windows
    pev 4
So, if you plan on doing stuff only for cstrike linux is ok to assume 0.
Aa that explains it! Thought it was a bit counter-intuitive at first, but I guess it all makes
sense in the end. I also wanted to ask you a bit about you're detouring implementation though.

Right now my detouring implementation works flawlessly (for _cdecl and _thiscall, haven't
tried _stdcall) but there is one improvement I want to implement. I program in pure C++;
I use no globals and enclose everything in classes (what a bitch to program in the HLSDK )

The problem is that I haven't been able to implement my 'hook' (jmp call) to supply a 'this'
pointer, which would enable class methods as 'hooks' instead of using static/global functions.

I could just skim through the Orpheu source, but I wanted to ask you in person. How have
you dealt with the problem? I'm not sure if I can just push a this pointer (as the last argument
since it's GCC convention) or if I need to solve the problem with a completely different approach?

EDIT: And I also must ask; do you prefer AT&T or Intel ASM syntax ?

Last edited by TheAvenger; 05-04-2012 at 03:53.
TheAvenger is offline