L L4D2node

CSaveRestoreBlockSet::PreSave

0x004ad720 · 168 bytes · __thiscall

_ZN20CSaveRestoreBlockSet7PreSaveEP16CSaveRestoreData

Decompiled

undefined (2 params)

/* CSaveRestoreBlockSet::PreSave(CSaveRestoreData*) */

void __thiscall CSaveRestoreBlockSet::PreSave(CSaveRestoreBlockSet *this,CSaveRestoreData *param_1)

{
  undefined4 *puVar1;
  int *piVar2;
  char *pcVar3;
  char *pcVar4;
  int iVar5;
  int iVar6;
  
  iVar5 = *(int *)(this + 0x30);
  *(undefined4 *)(this + 0x4c) = 0;
  if (iVar5 != 0) {
    CUtlVector<SaveRestoreBlockHeader_t,CUtlMemory<SaveRestoreBlockHeader_t,int>>::GrowVector
              ((CUtlVector<SaveRestoreBlockHeader_t,CUtlMemory<SaveRestoreBlockHeader_t,int>> *)
               (this + 0x40),iVar5);
    CUtlVector<SaveRestoreBlockHeader_t,CUtlMemory<SaveRestoreBlockHeader_t,int>>::
    ShiftElementsRight((CUtlVector<SaveRestoreBlockHeader_t,CUtlMemory<SaveRestoreBlockHeader_t,int>>
                        *)(this + 0x40),0,iVar5);
    if (0 < *(int *)(this + 0x30)) {
      iVar5 = 0;
      iVar6 = 0;
      do {
        puVar1 = *(undefined4 **)(*(int *)(this + 0x24) + iVar5 * 4);
        pcVar3 = (char *)(**(code **)*puVar1)(puVar1);
        pcVar4 = (char *)(*(int *)(this + 0x40) + iVar6);
        iVar6 = iVar6 + 0x28;
        V_strncpy(pcVar4,pcVar3,0x20);
        piVar2 = *(int **)(*(int *)(this + 0x24) + iVar5 * 4);
        iVar5 = iVar5 + 1;
        (**(code **)(*piVar2 + 4))(piVar2,param_1);
      } while (iVar5 < *(int *)(this + 0x30));
      return;
    }
  }
  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)