L L4D2node

KeyValues::RemoveSubKey

0x00041c80 · 74 bytes · __thiscall

_ZN9KeyValues12RemoveSubKeyEPS_

Decompiled

undefined (2 params)

/* KeyValues::RemoveSubKey(KeyValues*) */

void __thiscall KeyValues::RemoveSubKey(KeyValues *this,KeyValues *param_1)

{
  KeyValues *pKVar1;
  KeyValues *pKVar2;
  
  if (param_1 != (KeyValues *)0x0) {
    pKVar1 = *(KeyValues **)(this + 0x20);
    if (*(KeyValues **)(this + 0x20) == param_1) {
      *(undefined4 *)(this + 0x20) = *(undefined4 *)(param_1 + 0x1c);
      *(undefined4 *)(param_1 + 0x1c) = 0;
    }
    else {
      do {
        pKVar2 = pKVar1;
        pKVar1 = *(KeyValues **)(pKVar2 + 0x1c);
        if (pKVar1 == (KeyValues *)0x0) {
          *(undefined4 *)(param_1 + 0x1c) = 0;
          return;
        }
      } while (param_1 != pKVar1);
      *(undefined4 *)(pKVar2 + 0x1c) = *(undefined4 *)(param_1 + 0x1c);
      *(undefined4 *)(param_1 + 0x1c) = 0;
    }
  }
  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)