L L4D2node

CDllDemandLoader::GetFactory

0x0024ba30 · 87 bytes · __thiscall

_ZN16CDllDemandLoader10GetFactoryEv

Decompiled

undefined (1 param)

/* CDllDemandLoader::GetFactory() */

undefined4 __thiscall CDllDemandLoader::GetFactory(CDllDemandLoader *this)

{
  undefined4 uVar1;
  int iVar2;
  
  iVar2 = *(int *)(this + 8);
  if (iVar2 == 0) {
    if (this[0xc] == (CDllDemandLoader)0x0) {
      this[0xc] = (CDllDemandLoader)0x1;
      iVar2 = Sys_LoadModule(*(undefined4 *)(this + 4),0);
      *(int *)(this + 8) = iVar2;
      if (iVar2 != 0) goto LAB_0024ba41;
    }
    return 0;
  }
LAB_0024ba41:
  uVar1 = dlsym(iVar2,"CreateInterface");
  return uVar1;
}

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)