L L4D2node

CUtlVector<GCSDK::FKColumnRelation_t,CUtlMemory<GCSDK::FKColumnRelation_t,int>>::InsertBefore

0x0008fdf0 · 315 bytes · __thiscall

_ZN10CUtlVectorIN5GCSDK18FKColumnRelation_tE10CUtlMemoryIS1_iEE12InsertBeforeEiRKS1_

Decompiled

undefined (3 params)

/* CUtlVector<GCSDK::FKColumnRelation_t, CUtlMemory<GCSDK::FKColumnRelation_t, int>
   >::InsertBefore(int, GCSDK::FKColumnRelation_t const&) */

int __thiscall
CUtlVector<GCSDK::FKColumnRelation_t,CUtlMemory<GCSDK::FKColumnRelation_t,int>>::InsertBefore
          (CUtlVector<GCSDK::FKColumnRelation_t,CUtlMemory<GCSDK::FKColumnRelation_t,int>> *this,
          int param_1,FKColumnRelation_t *param_2)

{
  undefined4 *puVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  byte bVar6;
  
  bVar6 = 0;
  iVar4 = *(int *)(this + 4);
  iVar5 = *(int *)(this + 0xc) + 1;
  if (iVar4 < iVar5) {
    iVar3 = *(int *)(this + 8);
    if (iVar3 < 0) goto LAB_0008fe0c;
    if (iVar3 == 0) {
      if (iVar4 == 0) {
        if (iVar5 < 2) {
          iVar3 = 1;
          goto LAB_0008fe7f;
        }
        iVar4 = 1;
      }
      do {
        iVar3 = iVar4 * 2;
        if (iVar5 <= iVar3) break;
        iVar3 = iVar4 * 4;
        iVar4 = iVar3;
      } while (iVar3 < iVar5);
    }
    else {
      for (iVar3 = iVar3 * (*(int *)(this + 0xc) / iVar3 + 1); iVar3 < iVar5;
          iVar3 = (iVar3 + iVar5) / 2) {
      }
    }
LAB_0008fe7f:
    *(int *)(this + 4) = iVar3;
    if (*(void **)this != (void *)0x0) {
      pvVar2 = realloc(*(void **)this,iVar3 * 0x102);
      iVar5 = *(int *)(this + 0xc);
      *(void **)this = pvVar2;
      *(void **)(this + 0x10) = pvVar2;
      *(int *)(this + 0xc) = iVar5 + 1;
      iVar5 = (iVar5 + 1) - param_1;
      goto joined_r0x0008feb5;
    }
    pvVar2 = malloc(iVar3 * 0x102);
    *(void **)this = pvVar2;
  }
  else {
LAB_0008fe0c:
    pvVar2 = *(void **)this;
  }
  *(int *)(this + 0xc) = iVar5;
  iVar5 = iVar5 - param_1;
  *(void **)(this + 0x10) = pvVar2;
joined_r0x0008feb5:
  if (0 < iVar5 + -1) {
    _V_memmove((void *)((int)pvVar2 + param_1 * 0x102 + 0x102),
               (void *)((int)pvVar2 + param_1 * 0x102),(iVar5 + -1) * 0x102);
    pvVar2 = *(void **)this;
  }
  puVar1 = (undefined4 *)((int)pvVar2 + param_1 * 0x102);
  if (puVar1 != (undefined4 *)0x0) {
    for (iVar5 = 0x40; iVar5 != 0; iVar5 = iVar5 + -1) {
      *puVar1 = *(undefined4 *)param_2;
      param_2 = param_2 + (uint)bVar6 * -8 + 4;
      puVar1 = puVar1 + (uint)bVar6 * -2 + 1;
    }
    *(undefined2 *)puVar1 = *(undefined2 *)param_2;
  }
  return param_1;
}

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)