L L4D2node

Path::Copy

0x0075f600 · 794 bytes · __thiscall

_ZN4Path4CopyEP8INextBotRKS_

Decompiled

undefined (3 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Path::Copy(INextBot*, Path const&) */

void __thiscall Path::Copy(Path *this,INextBot *param_1,Path *param_2)

{
  uint *puVar1;
  char cVar2;
  int iVar3;
  Path *pPVar4;
  Path *pPVar5;
  int iVar6;
  int local_44;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_towlower == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_34,0,0,0,0,"/data/src/game/server/nextbot/path/nextbotpath.cpp",
               0x33f,&Copy(INextBot*,Path_const&)::tm_fmt,"(%s)%s","NextBot","Path::Copy");
    local_20 = _towlower;
  }
  iVar6 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 0075f866 to 0075f8c6 has its CatchHandler @ 0075f94c */
    iVar3 = ThreadGetCurrentId();
    if (iVar6 == iVar3) {
      if ((char *)*_DAT_0105d15c != "Path::Copy") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa498,(char *)0x0,0xca8906);
      }
      puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
      *puVar1 = *puVar1 | 4;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
                    /* try { // try from 0075f6bc to 0075f804 has its CatchHandler @ 0075f92b */
  (**(code **)(*(int *)this + 0x48))(this);
  iVar6 = *(int *)(param_2 + 0x4404);
  if (0 < iVar6) {
    local_44 = 0;
    iVar3 = 0;
    pPVar4 = param_2;
    pPVar5 = this;
    do {
      *(undefined4 *)(pPVar5 + 4) = *(undefined4 *)(pPVar4 + 4);
      *(undefined4 *)(pPVar5 + 8) = *(undefined4 *)(pPVar4 + 8);
      *(undefined4 *)(this + iVar3 + 0xc) = *(undefined4 *)(param_2 + iVar3 + 0xc);
      *(undefined4 *)(this + iVar3 + 0x10) = *(undefined4 *)(param_2 + iVar3 + 0x10);
      *(undefined4 *)(this + iVar3 + 0x14) = *(undefined4 *)(param_2 + iVar3 + 0x14);
      *(undefined4 *)(pPVar5 + 0x18) = *(undefined4 *)(pPVar4 + 0x18);
      *(undefined4 *)(pPVar5 + 0x1c) = *(undefined4 *)(pPVar4 + 0x1c);
      *(undefined4 *)(this + iVar3 + 0x20) = *(undefined4 *)(param_2 + iVar3 + 0x20);
      *(undefined4 *)(this + iVar3 + 0x24) = *(undefined4 *)(param_2 + iVar3 + 0x24);
      *(undefined4 *)(this + iVar3 + 0x28) = *(undefined4 *)(param_2 + iVar3 + 0x28);
      *(undefined4 *)(pPVar5 + 0x2c) = *(undefined4 *)(pPVar4 + 0x2c);
      *(undefined4 *)(pPVar5 + 0x30) = *(undefined4 *)(pPVar4 + 0x30);
      *(undefined4 *)(pPVar5 + 0x34) = *(undefined4 *)(pPVar4 + 0x34);
      *(undefined4 *)(this + iVar3 + 0x38) = *(undefined4 *)(param_2 + iVar3 + 0x38);
      *(undefined4 *)(this + iVar3 + 0x3c) = *(undefined4 *)(param_2 + iVar3 + 0x3c);
      local_44 = local_44 + 1;
      *(undefined4 *)(this + iVar3 + 0x40) = *(undefined4 *)(param_2 + iVar3 + 0x40);
      iVar3 = iVar3 + 0x44;
      *(undefined4 *)(pPVar5 + 0x44) = *(undefined4 *)(pPVar4 + 0x44);
      iVar6 = *(int *)(param_2 + 0x4404);
      pPVar4 = pPVar4 + 0x44;
      pPVar5 = pPVar5 + 0x44;
    } while (local_44 < iVar6);
  }
  *(int *)(this + 0x4404) = iVar6;
  (**(code **)(*(int *)this + 100))(this,param_1,0);
  iVar6 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    iVar3 = ThreadGetCurrentId();
    if (iVar6 == iVar3) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  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)