L L4D2node

WitchBehavior::InitialContainedAction

0x00a3e7f0 · 448 bytes · __cdecl

_ZN13WitchBehavior22InitialContainedActionEP8Infected

Decompiled

undefined (1 param)

/* WitchBehavior::InitialContainedAction(Infected*) */

undefined4 * WitchBehavior::InitialContainedAction(Infected *param_1)

{
  char cVar1;
  undefined4 *puVar2;
  
  if (*(int *)(witch_force_wander._28_4_ + 0x30) == 0) {
    cVar1 = IsTimeOfDayBetween(2,4);
    if (cVar1 == '\0') {
      puVar2 = ::operator_new(0x50);
      puVar2[8] = 0;
      puVar2[9] = 0;
      puVar2[10] = 0;
      puVar2[3] = 0;
      puVar2[4] = 0;
      puVar2[5] = 0;
      puVar2[6] = 0;
      puVar2[7] = 0;
      puVar2[2] = 0;
      *(undefined1 *)(puVar2 + 0xc) = 0;
      *(undefined1 *)((int)puVar2 + 0x31) = 0;
      puVar2[0xb] = 0;
      *puVar2 = &PTR__WitchIdle_00d265a8;
      puVar2[1] = &PTR__WitchIdle_00d2670c;
      puVar2[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
      puVar2[0xe] = 0;
      puVar2[0xf] = 0xbf800000;
      puVar2[0x10] = &PTR_NetworkStateChanged_00c0b6e0;
      puVar2[0x11] = 0;
      puVar2[0x12] = 0xbf800000;
      puVar2[0x13] = 0xffffffff;
      return puVar2;
    }
  }
  puVar2 = ::operator_new(0x4854);
  puVar2[8] = 0;
  puVar2[9] = 0;
  puVar2[10] = 0;
  puVar2[3] = 0;
  puVar2[4] = 0;
  puVar2[5] = 0;
  puVar2[6] = 0;
  puVar2[7] = 0;
  puVar2[2] = 0;
  *(undefined1 *)(puVar2 + 0xc) = 0;
  *(undefined1 *)((int)puVar2 + 0x31) = 0;
  puVar2[0xb] = 0;
  *puVar2 = &PTR__WitchWander_00d26e28;
  puVar2[1] = &PTR__WitchWander_00d26f8c;
  puVar2[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
  puVar2[0xe] = 0;
  puVar2[0xf] = 0xbf800000;
                    /* try { // try from 00a3e88d to 00a3e891 has its CatchHandler @ 00a3e9b3 */
  PathFollower::PathFollower((PathFollower *)(puVar2 + 0x10));
  puVar2[0x120b] = &PTR_NetworkStateChanged_00c23e10;
  puVar2[0x120c] = 0xbf800000;
  puVar2[0x120d] = &PTR_NetworkStateChanged_00c0b6e0;
  puVar2[0x120e] = 0;
  puVar2[0x120f] = 0xbf800000;
  puVar2[0x1211] = &PTR_NetworkStateChanged_00c0b6e0;
  puVar2[0x1212] = 0;
  puVar2[0x1213] = 0xbf800000;
  puVar2[0x1214] = 0xffffffff;
  return puVar2;
}

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)