L L4D2node

CC_Ent_Info

0x00600cc0 · 539 bytes · __cdecl

_Z11CC_Ent_InfoRK8CCommand

Decompiled

undefined (1 param)

/* CC_Ent_Info(CCommand const&) */

void CC_Ent_Info(CCommand *param_1)

{
  char cVar1;
  CBasePlayer *pCVar2;
  int *piVar3;
  int *piVar4;
  char *pcVar5;
  undefined1 *puVar6;
  int iVar7;
  int iVar8;
  
  pCVar2 = (CBasePlayer *)UTIL_GetCommandClient();
  if ((pCVar2 != (CBasePlayer *)0x0) &&
     (cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2), cVar1 != '\0')) {
    if (*(int *)param_1 < 2) {
      ClientPrint(pCVar2,2,"Usage:\n   ent_info <class name>\n",(char *)0x0,(char *)0x0,(char *)0x0,
                  (char *)0x0);
    }
    else {
      piVar3 = (int *)CreateEntityByName(*(char **)(param_1 + 0x40c),-1,true);
      if (piVar3 != (int *)0x0) {
        for (piVar4 = (int *)(**(code **)(*piVar3 + 0x30))(piVar3); piVar4 != (int *)0x0;
            piVar4 = (int *)piVar4[3]) {
          if (0 < piVar4[1]) {
            iVar8 = 0;
            do {
              while (iVar7 = iVar8 * 0x40 + *piVar4, (*(byte *)(iVar7 + 0xe) & 0x10) == 0) {
                iVar8 = iVar8 + 1;
                if (piVar4[1] <= iVar8) goto LAB_00600da4;
              }
              iVar8 = iVar8 + 1;
              pcVar5 = (char *)UTIL_VarArgs("  output: %s\n",*(undefined4 *)(iVar7 + 0x10));
              ClientPrint(pCVar2,2,pcVar5,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
            } while (iVar8 < piVar4[1]);
          }
LAB_00600da4:
        }
        piVar4 = (int *)(**(code **)(*piVar3 + 0x30))(piVar3);
        do {
          if (piVar4 == (int *)0x0) {
                    /* WARNING: Could not recover jumptable at 0x00600e4d. Too many branches */
                    /* WARNING: Treating indirect jump as call */
            (**(code **)(*piVar3 + 4))();
            return;
          }
          if (0 < piVar4[1]) {
            iVar8 = 0;
            do {
              while (iVar7 = iVar8 * 0x40 + *piVar4, (*(byte *)(iVar7 + 0xe) & 8) == 0) {
                iVar8 = iVar8 + 1;
                if (piVar4[1] <= iVar8) goto LAB_00600e34;
              }
              iVar8 = iVar8 + 1;
              pcVar5 = (char *)UTIL_VarArgs("  input: %s\n",*(undefined4 *)(iVar7 + 0x10));
              ClientPrint(pCVar2,2,pcVar5,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
            } while (iVar8 < piVar4[1]);
          }
LAB_00600e34:
          piVar4 = (int *)piVar4[3];
        } while( true );
      }
      puVar6 = &DAT_00d539c2;
      if (1 < *(int *)param_1) {
        puVar6 = *(undefined1 **)(param_1 + 0x40c);
      }
      pcVar5 = (char *)UTIL_VarArgs("no such entity %s\n",puVar6);
      ClientPrint(pCVar2,2,pcVar5,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
    }
  }
  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)