L L4D2node

CMaster::IsCorrectMasterChallenge

0x00201690 · 153 bytes · __thiscall

_ZN7CMaster24IsCorrectMasterChallengeEPK8netadr_siP11CBaseServer

Decompiled

undefined (4 params)

/* CMaster::IsCorrectMasterChallenge(netadr_s const*, int, CBaseServer*) */

undefined4 __thiscall
CMaster::IsCorrectMasterChallenge(CMaster *this,netadr_s *param_1,int param_2,CBaseServer *param_3)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = 0;
  if (0 < *(int *)(this + 0x10)) {
    do {
      uVar2 = netadr_s::CompareAdr((netadr_s *)(*(int *)(this + 4) + iVar5 * 0x24),param_1,false);
      if ((char)uVar2 != '\0') {
        iVar4 = iVar5 * 0x24 + *(int *)(this + 4);
        iVar1 = *(int *)(iVar4 + 0x1c);
        if (0 < iVar1) {
          iVar4 = *(int *)(iVar4 + 0x10);
          iVar3 = 0;
          do {
            if ((*(int *)(iVar4 + 4) == param_2) && (*(CBaseServer **)(iVar4 + 0xc) == param_3)) {
              return uVar2;
            }
            iVar3 = iVar3 + 1;
            iVar4 = iVar4 + 0x10;
          } while (iVar3 != iVar1);
        }
      }
      iVar5 = iVar5 + 1;
    } while (iVar5 < *(int *)(this + 0x10));
  }
  return 0;
}

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)