L L4D2node

CEventQueue::Restore

0x0063d8d0 · 848 bytes · __thiscall

_ZN11CEventQueue7RestoreER8IRestore

Decompiled

undefined (2 params)

/* CEventQueue::Restore(IRestore&) */

undefined4 __thiscall CEventQueue::Restore(CEventQueue *this,IRestore *param_1)

{
  void *pvVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  undefined1 *puVar5;
  undefined *puVar6;
  undefined *puVar7;
  undefined1 *puVar8;
  undefined4 uVar9;
  undefined4 uVar10;
  undefined4 local_70;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  float local_54;
  undefined1 *local_50;
  undefined1 *local_4c;
  uint local_48;
  uint local_44;
  undefined4 local_40;
  uint local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  
  pvVar2 = *(void **)(this + 0x30);
  uVar10 = DAT_00f2a87c;
  while (DAT_00f2a87c = uVar10, pvVar2 != (void *)0x0) {
    pvVar1 = *(void **)((int)pvVar2 + 0x30);
    CUtlMemoryPool::Free((CUtlMemoryPool *)EventQueuePrioritizedEvent_t::s_Allocator,pvVar2);
    pvVar2 = pvVar1;
    uVar10 = DAT_00f2a87c;
  }
  local_48 = 0xffffffff;
  local_44 = 0xffffffff;
  local_3c = 0xffffffff;
  local_38 = 0;
  *(undefined4 *)(this + 0x30) = 0;
  local_2c = 0xffffffff;
  local_28 = 0;
  iVar3 = (**(code **)(*(int *)param_1 + 0xc))(param_1,"EventQueue",this,0,m_DataMap,uVar10);
  if (iVar3 == 0) {
    return 0;
  }
  if (0 < *(int *)(this + 0x38)) {
    iVar3 = 0;
    do {
      iVar4 = (**(code **)(*(int *)param_1 + 0xc))
                        (param_1,"PEvent",&local_54,0,EventQueuePrioritizedEvent_t::m_DataMap,
                         DAT_00f2a864);
      if (iVar4 == 0) {
        return 0;
      }
      if ((((local_3c == 0xffffffff) ||
           (puVar6 = g_pEntityList + (local_3c & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc))
          || (*(uint *)(puVar6 + 8) != local_3c >> 0xc)) || (*(int *)(puVar6 + 4) == 0)) {
        local_70 = 0;
        if (((local_44 != 0xffffffff) &&
            (puVar6 = g_pEntityList + (local_44 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc))
           && (*(uint *)(puVar6 + 8) == local_44 >> 0xc)) {
          local_70 = *(undefined4 *)(puVar6 + 4);
        }
        uVar10 = 0;
        if (((local_48 != 0xffffffff) &&
            (puVar6 = g_pEntityList + (local_48 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc))
           && (*(uint *)(puVar6 + 8) == local_48 >> 0xc)) {
          uVar10 = *(undefined4 *)(puVar6 + 4);
        }
        local_68 = local_38;
        local_64 = local_34;
        local_60 = local_30;
        local_5c = local_2c;
        local_58 = local_28;
        puVar8 = local_4c;
        if (local_4c == (undefined1 *)0x0) {
          puVar8 = &DAT_00d539c2;
        }
        puVar5 = local_50;
        if (local_50 == (undefined1 *)0x0) {
          puVar5 = &DAT_00d539c2;
        }
        AddEvent(this,puVar5,puVar8,&local_68,local_54 - *(float *)(gpGlobals + 0xc),uVar10,local_70
                 ,local_40);
      }
      else {
        local_70 = 0;
        if (((local_44 != 0xffffffff) &&
            (puVar7 = g_pEntityList + (local_44 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
           && (*(uint *)(puVar7 + 8) == local_44 >> 0xc)) {
          local_70 = *(undefined4 *)(puVar7 + 4);
        }
        uVar10 = 0;
        if (((local_48 != 0xffffffff) &&
            (puVar7 = g_pEntityList + (local_48 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
           && (*(uint *)(puVar7 + 8) == local_48 >> 0xc)) {
          uVar10 = *(undefined4 *)(puVar7 + 4);
        }
        local_68 = local_38;
        local_64 = local_34;
        local_60 = local_30;
        local_5c = local_2c;
        local_58 = local_28;
        puVar8 = local_4c;
        if (local_4c == (undefined1 *)0x0) {
          puVar8 = &DAT_00d539c2;
        }
        if (*(uint *)(puVar6 + 8) == *(uint *)(puVar6 + 8)) {
          uVar9 = *(undefined4 *)(puVar6 + 4);
        }
        else {
          uVar9 = 0;
        }
        AddEvent(this,uVar9,puVar8,&local_68,local_54 - *(float *)(gpGlobals + 0xc),uVar10,local_70,
                 local_40);
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(int *)(this + 0x38));
  }
  return 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)