L L4D2node

CDispInfo::CopyMapDispData

0x00139b80 · 376 bytes · __thiscall

_ZN9CDispInfo15CopyMapDispDataEPK11ddispinfo_t

Decompiled

undefined (2 params)

/* CDispInfo::CopyMapDispData(ddispinfo_t const*) */

void __thiscall CDispInfo::CopyMapDispData(CDispInfo *this,ddispinfo_t *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  void *pvVar5;
  int iVar6;
  
  *(undefined4 *)(this + 0x174) = *(undefined4 *)(param_1 + 0x28);
  iVar3 = *(int *)(param_1 + 0x14);
  *(int *)(this + 0x184) = iVar3;
  iVar3 = ::GetPowerInfo(iVar3);
  *(int *)(this + 0x1dc) = iVar3;
  iVar3 = *(int *)(iVar3 + 0x24);
  *(undefined4 *)(this + 0x100) = 0;
  iVar3 = iVar3 + -1;
  iVar3 = iVar3 * iVar3;
  iVar2 = iVar3 * 6;
  if (iVar2 == 0) goto LAB_00139bc8;
  iVar6 = *(int *)(this + 0xf8);
  if (iVar6 < iVar2) {
    iVar1 = *(int *)(this + 0xfc);
    if (iVar1 < 0) goto LAB_00139c1a;
    if (iVar1 == 0) {
      if (iVar6 == 0) {
        if (iVar2 < 0x11) {
          iVar6 = 0x10;
          goto LAB_00139c5f;
        }
        iVar6 = 0x10;
      }
      do {
        iVar6 = iVar6 * 2;
      } while (iVar6 < iVar2);
    }
    else {
      for (iVar6 = ((iVar2 + -1) / iVar1 + 1) * iVar1; iVar6 < iVar2; iVar6 = (iVar6 + iVar2) / 2) {
      }
    }
LAB_00139c5f:
    *(int *)(this + 0xf8) = iVar6;
    if (*(void **)(this + 0xf4) != (void *)0x0) {
      pvVar5 = realloc(*(void **)(this + 0xf4),iVar6 * 2);
      iVar6 = *(int *)(this + 0x100);
      *(void **)(this + 0xf4) = pvVar5;
      *(void **)(this + 0x104) = pvVar5;
      *(int *)(this + 0x100) = iVar2 + iVar6;
      if ((0 < iVar2) && (0 < iVar6)) {
        _V_memmove((void *)((int)pvVar5 + iVar3 * 0xc),pvVar5,iVar6 * 2);
      }
      goto LAB_00139bc8;
    }
    pvVar5 = malloc(iVar6 * 2);
    *(void **)(this + 0xf4) = pvVar5;
  }
  else {
LAB_00139c1a:
    pvVar5 = *(void **)(this + 0xf4);
  }
  *(int *)(this + 0x100) = iVar2;
  *(void **)(this + 0x104) = pvVar5;
LAB_00139bc8:
  if (*(void **)(this + 0x24c) != (void *)0x0) {
    operator_delete__(*(void **)(this + 0x24c));
  }
  uVar4 = 0xffffffff;
  if (*(uint *)(*(int *)(this + 0x1dc) + 0x34) < 0x4900001) {
    uVar4 = *(uint *)(*(int *)(this + 0x1dc) + 0x34) * 0x1c;
  }
  pvVar5 = operator_new__(uVar4);
  *(void **)(this + 0x24c) = pvVar5;
  return;
}

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)