L L4D2node

VOX_LRUInit

0x000f0040 · 149 bytes · __regparm3

_Z11VOX_LRUInitP15sentencegroup_t.part.16

Decompiled

undefined (1 param)

/* VOX_LRUInit(sentencegroup_t*) [clone .part.16] */

void __regparm3 VOX_LRUInit(sentencegroup_t *param_1)

{
  undefined1 uVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = *(short *)(param_1 + 2) + g_GroupLRU;
  if (0 < *(short *)param_1) {
    iVar4 = 0;
    do {
      *(char *)(iVar5 + iVar4) = (char)iVar4;
      iVar4 = iVar4 + 1;
      iVar2 = (int)*(short *)param_1;
    } while (iVar4 < iVar2);
    if (0 < iVar2) {
      iVar4 = 0;
      do {
        iVar4 = iVar4 + 1;
        iVar2 = RandomInt(0,iVar2 + -1);
        iVar3 = RandomInt(0,*(short *)param_1 + -1);
        uVar1 = *(undefined1 *)(iVar2 + iVar5);
        *(undefined1 *)(iVar2 + iVar5) = *(undefined1 *)(iVar3 + iVar5);
        *(undefined1 *)(iVar3 + iVar5) = uVar1;
        iVar2 = (int)*(short *)param_1;
      } while (iVar4 < iVar2 * 4);
    }
  }
  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)