L L4D2node

InfectedWander::OnCommandString

0x00a3a6a0 · 582 bytes · __cdecl

_ZN14InfectedWander15OnCommandStringEP8InfectedPKc

Decompiled

undefined (2 params)

/* InfectedWander::OnCommandString(Infected*, char const*) */

Infected * InfectedWander::OnCommandString(Infected *param_1,char *param_2)

{
  int iVar1;
  Action *pAVar2;
  InfectedWander *this;
  char *in_stack_00000010;
  
  if (in_stack_00000010 != "z_sit_down") {
    iVar1 = _V_stricmp("z_sit_down",in_stack_00000010);
    if (iVar1 != 0) {
      if (in_stack_00000010 != "z_lie_down") {
        iVar1 = _V_stricmp("z_lie_down",in_stack_00000010);
        if (iVar1 != 0) {
          if (in_stack_00000010 != "z_stand") {
            iVar1 = _V_stricmp("z_stand",in_stack_00000010);
            if (iVar1 != 0) {
              *(undefined4 *)param_1 = 0;
              *(undefined4 *)(param_1 + 4) = 0;
              *(undefined4 *)(param_1 + 8) = 0;
              *(undefined4 *)(param_1 + 0xc) = 1;
              return param_1;
            }
          }
          pAVar2 = ::operator_new(0x34);
          *(undefined4 *)(pAVar2 + 0x20) = 0;
          *(undefined4 *)(pAVar2 + 0x24) = 0;
          *(undefined4 *)(pAVar2 + 0x28) = 0;
          *(undefined4 *)(pAVar2 + 0xc) = 0;
          *(undefined4 *)(pAVar2 + 0x10) = 0;
          *(undefined4 *)(pAVar2 + 0x14) = 0;
          *(undefined4 *)(pAVar2 + 0x18) = 0;
          *(undefined4 *)(pAVar2 + 0x1c) = 0;
          *(undefined4 *)(pAVar2 + 8) = 0;
          pAVar2[0x30] = (Action)0x0;
          pAVar2[0x31] = (Action)0x0;
          *(undefined4 *)(pAVar2 + 0x2c) = 0;
          *(undefined ***)pAVar2 = &PTR__InfectedStandDazed_00d25148;
          *(undefined ***)(pAVar2 + 4) = &PTR__InfectedStandDazed_00d252ac;
          goto LAB_00a3a74d;
        }
      }
      pAVar2 = ::operator_new(0x40);
      *(undefined4 *)(pAVar2 + 0x20) = 0;
      *(undefined4 *)(pAVar2 + 0x24) = 0;
      *(undefined4 *)(pAVar2 + 0x28) = 0;
      *(undefined4 *)(pAVar2 + 0xc) = 0;
      *(undefined4 *)(pAVar2 + 0x10) = 0;
      *(undefined4 *)(pAVar2 + 0x14) = 0;
      *(undefined4 *)(pAVar2 + 0x18) = 0;
      *(undefined4 *)(pAVar2 + 0x1c) = 0;
      *(undefined4 *)(pAVar2 + 8) = 0;
      pAVar2[0x30] = (Action)0x0;
      pAVar2[0x31] = (Action)0x0;
      *(undefined4 *)(pAVar2 + 0x2c) = 0;
      *(undefined ***)pAVar2 = &PTR__InfectedLieDown_00d24368;
      *(undefined ***)(pAVar2 + 4) = &PTR__InfectedLieDown_00d244cc;
      *(undefined ***)(pAVar2 + 0x34) = &PTR_NetworkStateChanged_00c0b6e0;
      *(undefined4 *)(pAVar2 + 0x38) = 0;
      *(undefined4 *)(pAVar2 + 0x3c) = 0xbf800000;
      goto LAB_00a3a74d;
    }
  }
  pAVar2 = ::operator_new(0x40);
  *(undefined4 *)(pAVar2 + 0x20) = 0;
  *(undefined4 *)(pAVar2 + 0x24) = 0;
  *(undefined4 *)(pAVar2 + 0x28) = 0;
  *(undefined4 *)(pAVar2 + 0xc) = 0;
  *(undefined4 *)(pAVar2 + 0x10) = 0;
  *(undefined4 *)(pAVar2 + 0x14) = 0;
  *(undefined4 *)(pAVar2 + 0x18) = 0;
  *(undefined4 *)(pAVar2 + 0x1c) = 0;
  *(undefined4 *)(pAVar2 + 8) = 0;
  pAVar2[0x30] = (Action)0x0;
  pAVar2[0x31] = (Action)0x0;
  *(undefined4 *)(pAVar2 + 0x2c) = 0;
  *(undefined ***)pAVar2 = &PTR__InfectedSitDown_00d24848;
  *(undefined ***)(pAVar2 + 4) = &PTR__InfectedSitDown_00d249ac;
  *(undefined ***)(pAVar2 + 0x34) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(pAVar2 + 0x38) = 0;
  *(undefined4 *)(pAVar2 + 0x3c) = 0xbf800000;
LAB_00a3a74d:
  this = ::operator_new(0x74);
  InfectedWander(this,pAVar2);
  *(undefined4 *)param_1 = 1;
  *(InfectedWander **)(param_1 + 4) = this;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0xc) = 1;
  return param_1;
}

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)