L L4D2node

CBaseServer::UpdateMasterServerRules

0x0010a540 · 228 bytes · __thiscall

_ZN11CBaseServer23UpdateMasterServerRulesEv

Decompiled

undefined (1 param)

/* CBaseServer::UpdateMasterServerRules() */

void __thiscall CBaseServer::UpdateMasterServerRules(CBaseServer *this)

{
  ISteamGameServer *pIVar1;
  char cVar2;
  int iVar3;
  int *piVar4;
  int *piVar5;
  
  if (this[0x14d] != (CBaseServer)0x0) {
    iVar3 = Steam3Server();
    pIVar1 = *(ISteamGameServer **)(iVar3 + 4);
    if (pIVar1 != (ISteamGameServer *)0x0) {
      (**(code **)(*(int *)pIVar1 + 0x4c))(pIVar1);
      piVar4 = (int *)(**(code **)(*g_pCVar + 0x98))(g_pCVar);
                    /* try { // try from 0010a58b to 0010a60e has its CatchHandler @ 0010a62a */
      (**(code **)(*piVar4 + 8))(piVar4);
      while( true ) {
        cVar2 = (**(code **)(*piVar4 + 0x10))(piVar4);
        if (cVar2 == '\0') break;
        piVar5 = (int *)(**(code **)(*piVar4 + 0x14))(piVar4);
        cVar2 = (**(code **)(*piVar5 + 0xc))(piVar5,0x100);
        if (cVar2 != '\0') {
          iVar3 = __dynamic_cast(piVar5,&ConCommandBase::typeinfo,&ConVar::typeinfo,0);
          if (iVar3 != 0) {
            SetMasterServerKeyValue(pIVar1,(IConVar *)(iVar3 + 0x18));
          }
        }
        (**(code **)(*piVar4 + 0xc))(piVar4);
      }
      iVar3 = Steam3Server();
      if (*(int *)(iVar3 + 4) != 0) {
        RecalculateTags(this);
      }
      this[0x14d] = (CBaseServer)0x0;
                    /* WARNING: Could not recover jumptable at 0x0010a628. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*piVar4 + 4))();
      return;
    }
  }
  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)