CS:GO — Hud update alternative

DREDD

Administrator
Administrator
Administrator
Administrator
Status
Offline
Joined
Apr 18, 2019
Messages
202
Reaction score
319
If you want to avoid using signatures, then you should
Code:
bool __fastcall hkGetBool_cl_hud_bomb_under_radar(PVOID pConVar, PVOID edx)
{
 
    ULONG HUDWeaponInterface = 0;
 
    
    __asm mov       HUDWeaponInterface, EBX;
 
 
    stack* pEBP;
    __asm mov pEBP, ebp;
 
    typedef int(__thiscall *UpdateItemByIndex_t)(ULONG thisptr, int index);
 
    static UpdateItemByIndex_t UpdateItemByIndex = NULL;
 
 
    if (HUDWeaponInterface)
    {
        int size = *(int*)(HUDWeaponInterface + 0x80);
 
 
        IClientEntity* pLocal = GetLocalEntity();
        if (pLocal && pLocal->GetVar<int>(g_pNetvars->m_ihealth) > 0)
        {
            
            if (size && size < 10 && g_pClientState->m_nDeltaTick != -1 && WantsUpdate)
            {
                
                    WantsUpdate = false;
 
                    if (!UpdateItemByIndex)
                    {
                        ULONG Addres = pEBP->ret - 65;
                        UpdateItemByIndex = (UpdateItemByIndex_t)(Addres + *(ULONG*)Addres + 4);
                    }
 
 
                    for (int index = 0; index < size; index++)
                    {
                        //*(int*)(*(ULONG*)(HUDWeaponInterface + 0x74) + 44 * index + 32) = -1;//delayed so we call function directly instead
                        UpdateItemByIndex(HUDWeaponInterface, index);
 
                    }
                
 
        
            }
 
        
 
        }
 
 
    }
 
 
 
 
    //call original
 
}
Author said:
Note theres a small antipaste with asm part, but its pretty obvious
 

NiceL

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Jul 5, 2019
Messages
3
Reaction score
1
Not enough index of hook, struct of UpdateItemByIndex_t and etc
 
Top