L L4D2node

CBaseServer::RemoveTag

0x00109370 · 438 bytes · __thiscall

_ZN11CBaseServer9RemoveTagEPKcb

Decompiled

undefined (3 params)

/* CBaseServer::RemoveTag(char const*, bool) */

void __thiscall CBaseServer::RemoveTag(CBaseServer *this,char *param_1,bool param_2)

{
  bool bVar1;
  char *pcVar2;
  size_t sVar3;
  int iVar4;
  int iVar5;
  int in_GS_OFFSET;
  int local_b8 [3];
  int local_ac;
  char local_a0 [128];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar2 = "FCVAR_NEVER_AS_STRING";
  if ((sv_tags._20_4_ & 0x1000) == 0) {
    pcVar2 = "";
    if (*(char **)(sv_tags._28_4_ + 0x24) != (char *)0x0) {
      pcVar2 = *(char **)(sv_tags._28_4_ + 0x24);
    }
  }
  if (*pcVar2 != '\0') {
    local_a0[0] = '\0';
    pcVar2 = "FCVAR_NEVER_AS_STRING";
    if ((sv_tags._20_4_ & 0x1000) == 0) {
      pcVar2 = "";
      if (*(char **)(sv_tags._28_4_ + 0x24) != (char *)0x0) {
        pcVar2 = *(char **)(sv_tags._28_4_ + 0x24);
      }
    }
    CSplitString::CSplitString((CSplitString *)local_b8,pcVar2,",");
    if (0 < local_ac) {
      iVar5 = 0;
      bVar1 = false;
      do {
        while (param_2) {
          sVar3 = strlen(param_1);
                    /* try { // try from 00109424 to 001094e8 has its CatchHandler @ 00109527 */
          iVar4 = V_strnicmp(*(char **)(local_b8[0] + iVar5 * 4),param_1,sVar3);
          if (iVar4 != 0) goto LAB_0010946d;
LAB_00109432:
          iVar5 = iVar5 + 1;
          bVar1 = true;
          if (local_ac <= iVar5) goto LAB_001094cd;
        }
        iVar4 = _V_stricmp(*(char **)(local_b8[0] + iVar5 * 4),param_1);
        if (iVar4 == 0) goto LAB_00109432;
LAB_0010946d:
        V_strncat(local_a0,*(char **)(local_b8[0] + iVar5 * 4),0x80,-1);
        V_strncat(local_a0,",",0x80,-1);
        iVar5 = iVar5 + 1;
      } while (iVar5 < local_ac);
LAB_001094cd:
      if (bVar1) {
        ConVar::SetValue(sv_tags);
      }
    }
    CSplitString::~CSplitString((CSplitString *)local_b8);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)