L L4D2node

ParseTable

0x00b465f0 · 550 bytes · __regparm3

_ZL10ParseTableP11CBaseEntityP9HSCRIPT__PKc

Decompiled

undefined (3 params)

/* ParseTable(CBaseEntity*, HSCRIPT__*, char const*) */

void __regparm3 ParseTable(CBaseEntity *param_1,HSCRIPT__ *param_2,char *param_3)

{
  int iVar1;
  HSCRIPT__ *pHVar2;
  char *pcVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 local_44;
  char *local_34 [2];
  undefined2 local_2c;
  ushort local_2a;
  HSCRIPT__ *local_28;
  undefined4 local_24;
  ushort local_20;
  ushort local_1e;
  
  local_1e = 0;
  local_20 = 0;
  local_2c = 0;
  local_2a = 0;
  local_34[0] = (char *)0x0;
  local_28 = (HSCRIPT__ *)0x0;
                    /* try { // try from 00b46640 to 00b46838 has its CatchHandler @ 00b4683e */
  iVar1 = (**(code **)(*g_pScriptVM + 0x88))(g_pScriptVM,param_2);
  if (0 < iVar1) {
    iVar4 = 0;
    local_44 = 0;
    do {
      local_44 = (**(code **)(*g_pScriptVM + 0x8c))(g_pScriptVM,param_2,local_44,local_34,&local_28)
      ;
      pcVar3 = param_3;
      if (param_3 == (char *)0x0) {
        pcVar3 = local_34[0];
      }
      switch(local_20) {
      default:
        pcVar3 = "unknown_variant_type";
        if (local_20 < 0x29) {
          pcVar3 = *(char **)(CSWTCH_2512 + (uint)local_20 * 4);
        }
        Warning("Unsupported KeyValue type for key %s (type %s)\n",local_34[0],pcVar3);
        break;
      case 1:
        (**(code **)(*(int *)param_1 + 0x88))(param_1,pcVar3,local_28);
        break;
      case 3:
        pHVar2 = (HSCRIPT__ *)&vec3_origin;
        if (local_28 != (HSCRIPT__ *)0x0) {
          pHVar2 = local_28;
        }
        (**(code **)(*(int *)param_1 + 0x8c))(param_1,pcVar3,pHVar2);
        break;
      case 5:
        (**(code **)(*(int *)param_1 + 0x88))(param_1,pcVar3,(float)(int)local_28);
        break;
      case 6:
        uVar5 = 0;
        if ((char)local_28 != '\0') {
          uVar5 = 0x3f800000;
        }
        (**(code **)(*(int *)param_1 + 0x88))(param_1,pcVar3,uVar5);
        break;
      case 0x1f:
        (**(code **)(*(int *)param_1 + 0x84))(param_1,pcVar3,local_28);
        break;
      case 0x20:
        ParseTable(param_1,local_28,local_34[0]);
      }
      (**(code **)(*g_pScriptVM + 0x9c))(g_pScriptVM,local_34);
      (**(code **)(*g_pScriptVM + 0x9c))(g_pScriptVM,&local_28);
      iVar4 = iVar4 + 1;
    } while (iVar4 != iVar1);
  }
  if ((local_1e & 1) != 0) {
    free(local_28);
    local_1e = local_1e & 0xfffe;
  }
  local_28 = (HSCRIPT__ *)0x0;
  local_24 = 0;
  local_20 = 0;
  if ((local_2a & 1) != 0) {
    free(local_34[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)