View Single Post
Author Message
raydan
Senior Member
Join Date: Aug 2006
Old 12-31-2010 , 23:48   Detour in __usercall
Reply With Quote #1

Code:
static void PhysicsCheckSweep( CBaseEntity *pEntity, const Vector& vecAbsStart, const Vector &vecAbsDelta, trace_t *pTrace )
{
...
}
use ob-valve build

Code:
 ; void __usercall PhysicsCheckSweep(CBaseEntity *pEntity<esi>, Vector *vecAbsStart<edi>, Vector *vecAbsDelta, CGameTrace *pTrace)
.text:1019A390                         PhysicsCheckSweep proc near             ; CODE XREF: CBaseEntity::PhysicsPushEntity(Vector const &,CGameTrace *)+BAp
.text:1019A390
.text:1019A390                         vecAbsEnd       = Vector ptr -0Ch
.text:1019A390                         vecAbsDelta     = dword ptr  4
.text:1019A390                         pTrace          = dword ptr  8
.text:1019A390
.text:1019A390                         pEntity = esi
.text:1019A390                         vecAbsStart = edi
.text:1019A390 83 EC 0C                                sub     esp, 0Ch
.text:1019A393 8B 06                                   mov     eax, [pEntity]
.text:1019A395 8B 90 64 02 00 00                       mov     edx, [eax+264h]
.text:1019A39B 53                                      push    ebx
.text:1019A39C 8B 5C 24 14                             mov     ebx, [esp+10h+vecAbsDelta]
.text:1019A3A0 55                                      push    ebp
.text:1019A3A1 8B CE                                   mov     ecx, pEntity
.text:1019A3A3 FF D2                                   call    edx
.text:1019A3A5 D9 07                                   fld     dword ptr [vecAbsStart]
.text:1019A3A7 80 BE 69 01 00 00 00                    cmp     byte ptr [pEntity+169h], 0
.text:1019A3AE D8 03                                   fadd    dword ptr [ebx]
.text:1019A3B0 8B E8                                   mov     ebp, eax
.text:1019A3B2 D9 5C 24 08                             fstp    [esp+14h+vecAbsEnd.x]
.text:1019A3B6 D9 47 04                                fld     dword ptr [vecAbsStart+4]
.text:1019A3B9 D8 43 04                                fadd    dword ptr [ebx+4]
.text:1019A3BC D9 5C 24 0C                             fstp    [esp+14h+vecAbsEnd.y]
.text:1019A3C0 D9 47 08                                fld     dword ptr [vecAbsStart+8]
.text:1019A3C3 D8 43 08                                fadd    dword ptr [ebx+8]
.text:1019A3C6 D9 5C 24 10                             fstp    [esp+14h+vecAbsEnd.z]
.text:1019A3CA 74 16                                   jz      short loc_1019A3E2
.text:1019A3CC F6 86 64 01 00 00 04                    test    byte ptr [pEntity+164h], 4
.text:1019A3D3 75 0D                                   jnz     short loc_1019A3E2
.text:1019A3D5 8A 86 64 01 00 00                       mov     al, [pEntity+164h]
.text:1019A3DB C0 E8 05                                shr     al, 5
.text:1019A3DE A8 01                                   test    al, 1
.text:1019A3E0 74 46                                   jz      short loc_1019A428


css server.dll
Code:
; int __cdecl sub_10171D60(int, void *)
.text:10171D60                         sub_10171D60    proc near               ; CODE XREF: sub_10172AB0+BAp
.text:10171D60
.text:10171D60                         var_C           = dword ptr -0Ch
.text:10171D60                         var_8           = dword ptr -8
.text:10171D60                         var_4           = dword ptr -4
.text:10171D60                         arg_0           = dword ptr  4
.text:10171D60                         arg_4           = dword ptr  8
.text:10171D60
.text:10171D60 83 EC 0C                                sub     esp, 0Ch
.text:10171D63 8B 06                                   mov     eax, [esi]
.text:10171D65 8B 90 8C 02 00 00                       mov     edx, [eax+28Ch]
.text:10171D6B 53                                      push    ebx
.text:10171D6C 8B 5C 24 14                             mov     ebx, [esp+10h+arg_0]
.text:10171D70 55                                      push    ebp
.text:10171D71 8B CE                                   mov     ecx, esi
.text:10171D73 FF D2                                   call    edx
.text:10171D75 D9 07                                   fld     dword ptr [edi]
.text:10171D77 80 BE 69 01 00 00 00                    cmp     byte ptr [esi+169h], 0
.text:10171D7E D8 03                                   fadd    dword ptr [ebx]
.text:10171D80 8B E8                                   mov     ebp, eax
.text:10171D82 D9 5C 24 08                             fstp    [esp+14h+var_C]
.text:10171D86 D9 47 04                                fld     dword ptr [edi+4]
.text:10171D89 D8 43 04                                fadd    dword ptr [ebx+4]
.text:10171D8C D9 5C 24 0C                             fstp    [esp+14h+var_8]
.text:10171D90 D9 47 08                                fld     dword ptr [edi+8]
.text:10171D93 D8 43 08                                fadd    dword ptr [ebx+8]
.text:10171D96 D9 5C 24 10                             fstp    [esp+14h+var_4]
.text:10171D9A 74 16                                   jz      short loc_10171DB2
.text:10171D9C F6 86 64 01 00 00 04                    test    byte ptr [esi+164h], 4
.text:10171DA3 75 0D                                   jnz     short loc_10171DB2
.text:10171DA5 8A 86 64 01 00 00                       mov     al, [esi+164h]
.text:10171DAB C0 E8 05                                shr     al, 5
.text:10171DAE A8 01                                   test    al, 1
.text:10171DB0 74 46                                   jz      short loc_10171DF8

any idea?
raydan is offline