L L4D2node

CDirector::CDirector

0x00885530 · 2437 bytes · __thiscall

_ZN9CDirectorC2Ev

Decompiled

undefined (1 param)

/* CDirector::CDirector() */

void __thiscall CDirector::CDirector(CDirector *this)

{
  char cVar1;
  CDirector *pCVar2;
  CDirector *pCVar3;
  CDirector *pCVar4;
  void *pvVar5;
  CDirectorItemManager *this_00;
  CDirectorMusicBanks *this_01;
  CDirectorSessionManager *this_02;
  CDirectorScriptedEventManager *this_03;
  CDirectorVersusMode *this_04;
  CDirectorSurvivalMode *this_05;
  CDirectorScavengeMode *this_06;
  CDirectorChallengeMode *this_07;
  undefined4 uVar6;
  int *piVar7;
  int iVar8;
  
  this[8] = (CDirector)0x0;
  *(undefined4 *)(this + 4) = 0x2a;
  *(undefined ***)this = &PTR__CDirector_00ce1108;
  *(undefined4 *)(this + 0x10c) = 0;
  *(undefined4 *)(this + 0x110) = 0;
  pCVar3 = this + 0xc;
  for (iVar8 = 0x40; iVar8 != 0; iVar8 = iVar8 + -1) {
    *(undefined4 *)pCVar3 = 0;
    pCVar3 = pCVar3 + 4;
  }
  *(undefined2 *)(this + 0x132) = 0xffff;
  *(undefined2 *)(this + 300) = 0xffff;
  *(undefined2 *)(this + 0x12e) = 0;
  *(code **)(this + 0x11c) = CDefOps<unsigned_long_long>::LessFunc;
  pCVar3 = this + 0x2f4;
  *(undefined4 *)(this + 0x120) = 0;
  *(undefined4 *)(this + 0x124) = 0;
  *(undefined4 *)(this + 0x128) = 0;
  *(undefined2 *)(this + 0x130) = 0xffff;
  *(undefined4 *)(this + 0x134) = 0;
  *(undefined4 *)(this + 0x138) = 0;
  *(undefined4 *)(this + 0x13c) = 0;
  *(undefined4 *)(this + 0x140) = 0;
  *(undefined4 *)(this + 0x144) = 0;
  *(undefined4 *)(this + 0x148) = 0;
  *(undefined4 *)(this + 0x14c) = 0;
  *(undefined4 *)(this + 0x150) = 0;
  *(undefined4 *)(this + 0x154) = 0;
  *(undefined4 *)(this + 0x158) = 0;
  *(undefined4 *)(this + 0x15c) = 0;
  *(undefined ***)(this + 0x16c) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x170) = 0;
  *(undefined4 *)(this + 0x174) = 0xbf800000;
  *(undefined ***)(this + 0x178) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x17c) = 0;
  *(undefined4 *)(this + 0x180) = 0xbf800000;
  *(undefined ***)(this + 0x184) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x188) = 0;
  *(undefined4 *)(this + 0x18c) = 0xbf800000;
  *(undefined4 *)(this + 400) = 0xffffffff;
  *(undefined ***)(this + 0x198) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x19c) = 0;
  *(undefined4 *)(this + 0x1a0) = 0xbf800000;
  *(undefined4 *)(this + 0x1a8) = 0;
  *(undefined4 *)(this + 0x1ac) = 0;
  *(undefined4 *)(this + 0x1b0) = 0;
  *(undefined4 *)(this + 0x1b4) = 0;
  *(undefined4 *)(this + 0x1b8) = 0;
  *(undefined ***)(this + 0x1d0) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1d4) = 0;
  *(undefined4 *)(this + 0x1d8) = 0xbf800000;
  *(undefined ***)(this + 0x238) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x23c) = 0;
  *(undefined4 *)(this + 0x240) = 0xbf800000;
  *(undefined ***)(this + 0x250) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x254) = 0;
  *(undefined4 *)(this + 600) = 0xbf800000;
  *(undefined ***)(this + 0x25c) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x260) = 0;
  *(undefined4 *)(this + 0x264) = 0xbf800000;
  *(undefined ***)(this + 0x268) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x26c) = 0;
  *(undefined4 *)(this + 0x270) = 0xbf800000;
  *(undefined ***)(this + 0x274) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x278) = 0;
  *(undefined4 *)(this + 0x27c) = 0xbf800000;
  *(undefined ***)(this + 0x294) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x298) = 0;
  *(undefined4 *)(this + 0x29c) = 0xbf800000;
  *(undefined ***)(this + 0x2a0) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x2a4) = 0;
  *(undefined4 *)(this + 0x2a8) = 0xbf800000;
  pCVar4 = this + 0x2ac;
  do {
    *(undefined ***)pCVar4 = &PTR_NetworkStateChanged_00c23e10;
    pCVar2 = pCVar4 + 8;
    *(undefined4 *)(this + (int)(pCVar4 + (0x2b0 - (int)(this + 0x2ac)))) = 0xbf800000;
    pCVar4 = pCVar2;
  } while (pCVar2 != pCVar3);
  pCVar4 = pCVar3;
  do {
    *(undefined ***)pCVar4 = &PTR_NetworkStateChanged_00c0b6e0;
    pCVar2 = pCVar4 + 0xc;
    *(undefined4 *)(this + (int)(pCVar4 + (0x2f8 - (int)pCVar3))) = 0;
    *(undefined4 *)(this + (int)(pCVar4 + (0x2fc - (int)pCVar3))) = 0xbf800000;
    pCVar4 = pCVar2;
  } while (pCVar2 != this + 0x33c);
  *(undefined4 *)(this + 0x340) = 3;
  pCVar3 = this + 0x34c;
  *(CDirector **)(this + 0x33c) = pCVar3;
  *(undefined4 *)(this + 0x344) = 0xffffffff;
  pCVar4 = pCVar3;
  do {
    *(undefined ***)pCVar4 = &PTR_NetworkStateChanged_00c0b6e0;
    pCVar2 = pCVar4 + 0xc;
    *(undefined4 *)(this + (int)(pCVar4 + (0x350 - (int)pCVar3))) = 0;
    *(undefined4 *)(this + (int)(pCVar4 + (0x354 - (int)pCVar3))) = 0xbf800000;
    pCVar4 = pCVar2;
  } while (pCVar2 != this + 0x370);
  *(undefined4 *)(this + 0x348) = 0;
  *(undefined4 *)(this + 0x370) = 0;
  *(undefined ***)(this + 0x378) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x37c) = 0;
  *(undefined4 *)(this + 0x374) = *(undefined4 *)(this + 0x33c);
  *(undefined4 *)(this + 0x380) = 0xbf800000;
  *(undefined4 *)(this + 0x3a4) = 0xffffffff;
  *(undefined ***)(this + 0x3a8) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x3ac) = 0xbf800000;
  *(undefined ***)(this + 0x3d4) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x3d8) = 0;
  *(undefined4 *)(this + 0x3dc) = 0xbf800000;
  *(undefined4 *)(this + 0x3e0) = 0;
  *(undefined4 *)(this + 0x3e4) = 0;
  *(undefined4 *)(this + 1000) = 0;
  *(undefined4 *)(this + 0x3ec) = 0;
  *(undefined4 *)(this + 0x3f0) = 0;
  *(undefined ***)(this + 0x3f4) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x3f8) = 0;
  *(undefined4 *)(this + 0x3fc) = 0xbf800000;
  *(undefined4 *)(this + 0x400) = 0;
  *(undefined4 *)(this + 0x404) = 0;
  *(undefined4 *)(this + 0x408) = 0;
  *(undefined4 *)(this + 0x40c) = 0;
  *(undefined4 *)(this + 0x410) = 0;
  *(undefined ***)(this + 0x428) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42c) = 0;
  *(undefined4 *)(this + 0x430) = 0xbf800000;
  *(undefined ***)(this + 0x434) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x438) = 0;
  *(undefined4 *)(this + 0x43c) = 0xbf800000;
  *(undefined4 *)(this + 0x454) = 0;
  *(undefined4 *)(this + 0x458) = 0;
  *(undefined4 *)(this + 0x45c) = 0;
  *(undefined4 *)(this + 0x460) = 0;
  *(undefined4 *)(this + 0x464) = 0;
  *(undefined ***)(this + 0x468) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x46c) = 0;
  *(undefined4 *)(this + 0x470) = 0xbf800000;
  *(undefined4 *)(this + 0x474) = 0;
  *(undefined4 *)(this + 0x478) = 0;
  *(undefined4 *)(this + 0x47c) = 0;
  *(undefined4 *)(this + 0x480) = 0;
  *(undefined4 *)(this + 0x484) = 0;
  pCVar3 = this + 0x488;
  do {
    *(undefined4 *)pCVar3 = 0xffffffff;
    pCVar4 = pCVar3 + 0xc;
    *(undefined4 *)(pCVar3 + 4) = 0;
    *(undefined4 **)(this + (int)(pCVar3 + (0x490 - (int)(this + 0x488)))) =
         &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
          StaticData()::staticData;
    pCVar3 = pCVar4;
  } while (pCVar4 != this + 0x4b8);
  *(undefined4 *)(this + 0x4b8) = 0xffffffff;
  *(undefined4 *)(this + 0x4bc) = 0;
  *(undefined4 **)(this + 0x4c0) =
       &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::StaticData()
        ::staticData;
  *(undefined ***)(this + 0x4d4) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x4d8) = 0;
  *(undefined4 *)(this + 0x4dc) = 0xbf800000;
  *(undefined ***)(this + 0x4e8) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x4ec) = 0;
  *(undefined4 *)(this + 0x4f0) = 0xbf800000;
  *(undefined4 *)(this + 0x508) = 0;
  *(undefined4 *)(this + 0x50c) = 0;
  *(undefined4 *)(this + 0x510) = 0;
  *(undefined4 *)(this + 0x514) = 0;
  *(undefined4 *)(this + 0x518) = 0;
  *(undefined ***)(this + 0x51c) = &PTR_InitQuietTruncation_00c08ee8;
  this[0x520] = (CDirector)0x1;
  this[0x521] = (CDirector)0x0;
  *(undefined4 *)(this + 0x624) = 0;
                    /* try { // try from 00885b3e to 00885b6e has its CatchHandler @ 00885eb7 */
  pvVar5 = ::operator_new(1);
  *(void **)(this + 0x628) = pvVar5;
  this_00 = malloc(0x468);
  _V_memset(this_00,0,0x468);
                    /* try { // try from 00885b72 to 00885b76 has its CatchHandler @ 00885f32 */
  CDirectorItemManager::CDirectorItemManager(this_00);
  *(CDirectorItemManager **)(this + 0x62c) = this_00;
  this_01 = malloc(0x5c);
                    /* try { // try from 00885b9e to 00885ba2 has its CatchHandler @ 00885eb7 */
  _V_memset(this_01,0,0x5c);
                    /* try { // try from 00885ba6 to 00885baa has its CatchHandler @ 00885f28 */
  CDirectorMusicBanks::CDirectorMusicBanks(this_01);
  *(CDirectorMusicBanks **)(this + 0x630) = this_01;
  this_02 = malloc(0x4c);
                    /* try { // try from 00885bd2 to 00885bd6 has its CatchHandler @ 00885eb7 */
  _V_memset(this_02,0,0x4c);
                    /* try { // try from 00885bda to 00885bde has its CatchHandler @ 00885f26 */
  CDirectorSessionManager::CDirectorSessionManager(this_02);
  *(CDirectorSessionManager **)(this + 0x634) = this_02;
  this_03 = malloc(0x154);
                    /* try { // try from 00885c06 to 00885c0a has its CatchHandler @ 00885eb7 */
  _V_memset(this_03,0,0x154);
                    /* try { // try from 00885c0e to 00885c12 has its CatchHandler @ 00885f24 */
  CDirectorScriptedEventManager::CDirectorScriptedEventManager(this_03);
  *(CDirectorScriptedEventManager **)(this + 0x638) = this_03;
  this_04 = malloc(0x5c);
                    /* try { // try from 00885c3a to 00885c3e has its CatchHandler @ 00885eb7 */
  _V_memset(this_04,0,0x5c);
                    /* try { // try from 00885c42 to 00885c46 has its CatchHandler @ 00885f36 */
  CDirectorVersusMode::CDirectorVersusMode(this_04);
  *(CDirectorVersusMode **)(this + 0x63c) = this_04;
  this_05 = malloc(0xa0);
                    /* try { // try from 00885c6e to 00885c72 has its CatchHandler @ 00885eb7 */
  _V_memset(this_05,0,0xa0);
                    /* try { // try from 00885c76 to 00885c7a has its CatchHandler @ 00885f34 */
  CDirectorSurvivalMode::CDirectorSurvivalMode(this_05);
  *(CDirectorSurvivalMode **)(this + 0x640) = this_05;
  this_06 = malloc(0x68);
                    /* try { // try from 00885ca2 to 00885ca6 has its CatchHandler @ 00885eb7 */
  _V_memset(this_06,0,0x68);
                    /* try { // try from 00885caa to 00885cae has its CatchHandler @ 00885f42 */
  CDirectorScavengeMode::CDirectorScavengeMode(this_06);
  *(CDirectorScavengeMode **)(this + 0x644) = this_06;
  this_07 = malloc(0x19c);
                    /* try { // try from 00885cd6 to 00885cda has its CatchHandler @ 00885eb7 */
  _V_memset(this_07,0,0x19c);
                    /* try { // try from 00885cde to 00885ce2 has its CatchHandler @ 00885f10 */
  CDirectorChallengeMode::CDirectorChallengeMode(this_07);
  *(CDirectorChallengeMode **)(this + 0x648) = this_07;
  this[0x281] = (CDirector)0x0;
  this[0x282] = (CDirector)0x0;
  this[0x114] = (CDirector)0x0;
  *(undefined4 *)(this + 0x414) = 0;
  this[0x28e] = (CDirector)0x0;
  this[0x28c] = (CDirector)0x0;
  this[0x28f] = (CDirector)0x0;
  this[0x28d] = (CDirector)0x0;
  this[0x3b4] = (CDirector)0x0;
  *(undefined4 *)(this + 0x3b0) = 0;
  *(undefined4 *)(this + 0x38c) = 0;
  *(undefined4 *)(this + 0x390) = 0;
  *(undefined4 *)(this + 0x394) = 0;
  *(undefined4 *)(this + 0x418) = 0;
  *(undefined4 *)(this + 0x440) = 0;
  *(undefined4 *)(this + 0x41c) = 0xffffffff;
  this[0x115] = (CDirector)0x0;
  *(undefined4 *)(this + 0x420) = 0;
  *(undefined4 *)(this + 0x424) = 0;
  this[0x290] = (CDirector)0x0;
  this[0x291] = (CDirector)0x0;
  this[0x4e6] = (CDirector)0x0;
  this[0x4e7] = (CDirector)0x0;
  this[0x168] = (CDirector)0x0;
  *(undefined4 *)(this + 0x1bc) = 0;
  this[0x4f4] = (CDirector)0x0;
                    /* try { // try from 00885dcf to 00885eb0 has its CatchHandler @ 00885eb7 */
  iVar8 = RandomInt(0,1);
  this[0x504] = (CDirector)0x0;
  *(undefined4 *)(this + 400) = 0xffffffff;
  this[0x4e5] = (CDirector)0x0;
  *(undefined4 *)(this + 0x4e0) = 0x3f800000;
  *(uint *)(this + 0x500) = (iVar8 != 1) + 5;
  piVar7 = engine;
  *(undefined4 *)(this + 0x4c4) = 0;
  *(undefined4 *)(this + 0x4c8) = 0;
  *(undefined4 *)(this + 0x4cc) = 0;
  *(undefined4 *)(this + 0x4d0) = 0;
  cVar1 = (**(code **)(*piVar7 + 0x1f0))(piVar7);
  if ((cVar1 == '\0') && (cVar1 = (**(code **)(*engine + 0x1f8))(engine), cVar1 == '\0')) {
    piVar7 = (int *)CommandLine_Tier0();
    iVar8 = (**(code **)(*piVar7 + 0xc))(piVar7,"-bugbait",0);
    if (iVar8 == 0) goto LAB_00885e5c;
  }
  ConVar::SetValue(0xffcce0);
LAB_00885e5c:
  uVar6 = RandomInt(0,100);
  *(undefined4 *)(this + 0x4fc) = uVar6;
  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)