L L4D2node

CModelInfo::GetModelKeyValue

0x00193c10 · 254 bytes · __thiscall

_ZN10CModelInfo16GetModelKeyValueEPK7model_tR10CUtlBuffer

Decompiled

undefined (3 params)

/* CModelInfo::GetModelKeyValue(model_t const*, CUtlBuffer&) */

undefined4 __thiscall
CModelInfo::GetModelKeyValue(CModelInfo *this,model_t *param_1,CUtlBuffer *param_2)

{
  int iVar1;
  int iVar2;
  char *pcVar3;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  
  uVar4 = 0;
  if ((param_1 != (model_t *)0x0) && (*(int *)(param_1 + 0x110) == 3)) {
    iVar1 = (**(code **)(*g_pMDLCache + 0x28))(g_pMDLCache,*(undefined2 *)(param_1 + 0x134));
    if (iVar1 != 0) {
      if (*(int *)(iVar1 + 0x150) == 0) {
        pcVar3 = (char *)0x0;
        if (*(int *)(iVar1 + 0x13c) != 0) {
          pcVar3 = (char *)(*(int *)(iVar1 + 0x138) + iVar1);
        }
        CUtlBuffer::PutString(param_2,pcVar3);
        return 1;
      }
      iVar1 = (**(code **)(*(int *)this + 0x68))(this,iVar1);
      if ((iVar1 != 0) && (0 < *(int *)(iVar1 + 100))) {
        iVar5 = 0;
        iVar6 = 0;
        do {
          iVar2 = (**(code **)(*g_pMDLCache + 0x28))
                            (g_pMDLCache,*(undefined2 *)(*(int *)(iVar1 + 0x58) + iVar6));
          if (((iVar2 != 0) && (*(int *)(iVar2 + 0x13c) != 0)) &&
             (pcVar3 = (char *)(iVar2 + *(int *)(iVar2 + 0x138)), pcVar3 != (char *)0x0)) {
            CUtlBuffer::PutString(param_2,pcVar3);
          }
          iVar5 = iVar5 + 1;
          iVar6 = iVar6 + 0x90;
        } while (iVar5 < *(int *)(iVar1 + 100));
      }
      uVar4 = 1;
    }
  }
  return uVar4;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)