L L4D2node

CServerDemo::WriteBaseFlex

0x005962b0 · 179 bytes · __thiscall

_ZN11CServerDemo13WriteBaseFlexEP9KeyValues

Decompiled

undefined (2 params)

/* CServerDemo::WriteBaseFlex(KeyValues*) */

void __thiscall CServerDemo::WriteBaseFlex(CServerDemo *this,KeyValues *param_1)

{
  int iVar1;
  KeyValues *this_00;
  undefined4 *puVar2;
  int *piVar3;
  
  if (WriteBaseFlex(KeyValues*)::hSym == '\0') {
    iVar1 = __cxa_guard_acquire(&WriteBaseFlex(KeyValues*)::hSym);
    if (iVar1 != 0) {
                    /* try { // try from 00596330 to 0059634c has its CatchHandler @ 00596363 */
      piVar3 = (int *)KeyValuesSystem();
      WriteBaseFlex(KeyValues*)::hSym = (**(code **)(*piVar3 + 0x14))(piVar3,"baseflex",1);
      __cxa_guard_release(&WriteBaseFlex(KeyValues*)::hSym);
    }
  }
  this_00 = (KeyValues *)KeyValues::FindKey(param_1,WriteBaseFlex(KeyValues*)::hSym);
  if (this_00 != (KeyValues *)0x0) {
    puVar2 = (undefined4 *)KeyValues::GetPtr(this_00,(char *)0x0,(void *)0x0);
    if (puVar2 != (undefined4 *)0x0) {
      *puVar2 = 0x1c;
      puVar2[1] = 0xffffffff;
      CCircularBuffer::Write(*(CCircularBuffer **)this,puVar2,0x1c);
    }
  }
  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)