L L4D2node

CEntityDataInstantiator<touchlink_t>::CreateDataObject

0x0047f340 · 454 bytes · __thiscall

_ZN23CEntityDataInstantiatorI11touchlink_tE16CreateDataObjectEPK11CBaseEntity

Decompiled

undefined (2 params)

/* CEntityDataInstantiator<touchlink_t>::CreateDataObject(CBaseEntity const*) */

undefined4 __thiscall
CEntityDataInstantiator<touchlink_t>::CreateDataObject
          (CEntityDataInstantiator<touchlink_t> *this,CBaseEntity *param_1)

{
  char cVar1;
  uint uVar2;
  undefined4 *puVar3;
  int *piVar4;
  int iVar5;
  CUtlVector<CEntityDataInstantiator<touchlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<touchlink_t>::HashEntry,int>>
  *this_00;
  uint uVar6;
  int iVar7;
  uint local_34;
  CBaseEntity *local_24;
  undefined4 local_20;
  
  local_20 = 0;
  local_24 = param_1;
  local_34 = (**(code **)(this + 0x1c))(&local_24);
  if (this[0x20] == (CEntityDataInstantiator<touchlink_t>)0x0) {
    local_34 = local_34 % *(uint *)(this + 0x10);
  }
  else {
    local_34 = local_34 & *(uint *)(this + 0x24);
  }
  uVar6 = 0;
  piVar4 = (int *)(*(int *)(this + 4) + local_34 * 0x14);
  uVar2 = piVar4[3];
  if ((int)uVar2 < 1) {
LAB_0047f3ae:
    if ((uVar2 != uVar6) && (uVar2 = local_34 << 0x10 | uVar6, uVar2 != 0xffffffff)) {
      iVar5 = (uVar6 & 0xffff) * 8;
      iVar7 = (uVar2 >> 0x10) * 0x14;
      goto LAB_0047f3d5;
    }
  }
  else {
    do {
      cVar1 = (**(code **)(this + 0x18))(*piVar4 + uVar6 * 8,&local_24);
      if (cVar1 != '\0') goto LAB_0047f3ae;
      uVar6 = uVar6 + 1;
    } while (uVar6 != uVar2);
  }
  local_34 = (**(code **)(this + 0x1c))(&local_24);
  if (this[0x20] == (CEntityDataInstantiator<touchlink_t>)0x0) {
    local_34 = local_34 % *(uint *)(this + 0x10);
  }
  else {
    local_34 = local_34 & *(uint *)(this + 0x24);
  }
  uVar6 = 0;
  piVar4 = (int *)(*(int *)(this + 4) + local_34 * 0x14);
  uVar2 = piVar4[3];
  if ((int)uVar2 < 1) {
LAB_0047f465:
    if (uVar2 == uVar6) goto LAB_0047f4d2;
  }
  else {
    do {
      cVar1 = (**(code **)(this + 0x18))(*piVar4 + uVar6 * 8,&local_24);
      if (cVar1 != '\0') goto LAB_0047f465;
      uVar6 = uVar6 + 1;
    } while (uVar6 != uVar2);
LAB_0047f4d2:
    this_00 = (CUtlVector<CEntityDataInstantiator<touchlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<touchlink_t>::HashEntry,int>>
               *)(local_34 * 0x14 + *(int *)(this + 4));
    uVar6 = *(uint *)(this_00 + 0xc);
    CUtlVector<CEntityDataInstantiator<touchlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<touchlink_t>::HashEntry,int>>
    ::GrowVector(this_00,1);
    CUtlVector<CEntityDataInstantiator<touchlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<touchlink_t>::HashEntry,int>>
    ::ShiftElementsRight(this_00,uVar6,1);
    puVar3 = (undefined4 *)(*(int *)this_00 + uVar6 * 8);
    if (puVar3 != (undefined4 *)0x0) {
      *puVar3 = local_24;
      puVar3[1] = local_20;
    }
  }
  puVar3 = ::operator_new(0x14);
  *puVar3 = 0xffffffff;
  iVar5 = (uVar6 & 0xffff) * 8;
  iVar7 = ((local_34 << 0x10 | uVar6) >> 0x10) * 0x14;
  *(undefined4 **)(*(int *)(*(int *)(this + 4) + iVar7) + 4 + iVar5) = puVar3;
  _V_memset(*(void **)(*(int *)(*(int *)(this + 4) + iVar7) + 4 + iVar5),0,0x14);
LAB_0047f3d5:
  return *(undefined4 *)(*(int *)(*(int *)(this + 4) + iVar7) + 4 + iVar5);
}

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)