L L4D2node

CPureServerWhitelist::Encode

0x001d75a0 · 234 bytes · __thiscall

_ZN20CPureServerWhitelist6EncodeER10CUtlBuffer

Decompiled

undefined (2 params)

/* CPureServerWhitelist::Encode(CUtlBuffer&) */

void __thiscall CPureServerWhitelist::Encode(CPureServerWhitelist *this,CUtlBuffer *param_1)

{
  CPureServerWhitelist CVar1;
  char cVar2;
  int iVar3;
  
  EncodeCommandList(this,(CUtlDict *)(this + 8),param_1);
  EncodeCommandList(this,(CUtlDict *)(this + 0x2c),param_1);
  EncodeCommandList(this,(CUtlDict *)(this + 0x50),param_1);
  CVar1 = this[0x88];
  if (((((byte)param_1[0x15] & 1) != 0) && (*(int *)(param_1 + 0x10) != 0)) &&
     (*(char *)(*(int *)param_1 + ((*(int *)(param_1 + 0x10) + -1) - *(int *)(param_1 + 0x20))) ==
      '\n')) {
    if (((byte)param_1[0x15] & 0x10) == 0) {
      iVar3 = *(int *)(param_1 + 0x18);
    }
    else {
      iVar3 = 0;
    }
    while (iVar3 = iVar3 + -1, -1 < iVar3) {
      cVar2 = CUtlBuffer::CheckPut(param_1,1);
      if (cVar2 != '\0') {
        *(undefined1 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = 9
        ;
        *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
        CUtlBuffer::AddNullTermination(param_1);
      }
    }
  }
  cVar2 = CUtlBuffer::CheckPut(param_1,1);
  if (cVar2 == '\0') {
    return;
  }
  *(CPureServerWhitelist *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20)))
       = CVar1;
  *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
  CUtlBuffer::AddNullTermination(param_1);
  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)