L L4D2node

CServerPlugin::LoadPlugin

0x00209790 · 160 bytes · __thiscall

_ZN13CServerPlugin10LoadPluginEPKc

Decompiled

undefined (2 params)

/* CServerPlugin::LoadPlugin(char const*) */

undefined4 __thiscall CServerPlugin::LoadPlugin(CServerPlugin *this,char *param_1)

{
  CPlugin *pCVar1;
  undefined4 uVar2;
  CPlugin *local_10;
  
  local_10 = operator_new(0x110);
  *local_10 = (CPlugin)0x0;
  *(undefined4 *)(local_10 + 0x104) = 0;
  *(undefined4 *)(local_10 + 0x10c) = 0;
  local_10[0x100] = (CPlugin)0x0;
  local_10[0x80] = (CPlugin)0x0;
  local_10[0x101] = (CPlugin)0x0;
  uVar2 = CPlugin::Load(local_10,param_1);
  pCVar1 = local_10;
  if ((char)uVar2 == '\0') {
    if (local_10 != (CPlugin *)0x0) {
      CPlugin::~CPlugin(local_10);
      operator_delete(pCVar1);
    }
    return uVar2;
  }
  CUtlVector<CPlugin*,CUtlMemory<CPlugin*,int>>::InsertBefore
            ((CUtlVector<CPlugin*,CUtlMemory<CPlugin*,int>> *)(this + 4),*(int *)(this + 0x10),
             &local_10);
  return uVar2;
}

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)