L L4D2node

CC_RR_Debug_ResponseConcept_Exclude

0x005b99b0 · 1254 bytes · __cdecl

_ZL35CC_RR_Debug_ResponseConcept_ExcludeRK8CCommand

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CC_RR_Debug_ResponseConcept_Exclude(CCommand const&) */

void CC_RR_Debug_ResponseConcept_Exclude(CCommand *param_1)

{
  int iVar1;
  void *pvVar2;
  char *pcVar3;
  int iVar4;
  short *psVar5;
  undefined1 *puVar6;
  undefined4 uVar7;
  uint uVar8;
  uint uVar9;
  CAI_Concept *this;
  uint uVar10;
  int iVar11;
  int local_30;
  short local_24 [2];
  undefined4 local_20;
  
  if (g_pAIConceptTable != 0) {
    iVar11 = *(int *)param_1;
    if (iVar11 == 1) {
      Msg("Usage:  rr_debugresponseconcept_exclude  Concept1 Concept2 Concept3...\n");
      Msg("\tseparate multiple concepts with spaces.\n");
      Msg("\tcall with no arguments to see this message and a list of current excludes.\n");
      Msg("\tto reset the exclude list, type \"rr_debugresponseconcept_exclude !\"\n");
      Msg("\nCurrent exclude list:\n");
      if (((((int)DAT_00fb7c8c < 0) || (DAT_00fb7c84 <= (int)DAT_00fb7c8c)) ||
          (DAT_00fb7ca0 < DAT_00fb7c8c)) ||
         ((uVar10 = (uint)*(ushort *)
                           ((int)CResponseSystem::m_DebugExcludeList + DAT_00fb7c8c * 0xc + 8),
          DAT_00fb7c8c == uVar10 &&
          (DAT_00fb7c8c !=
           *(ushort *)((int)CResponseSystem::m_DebugExcludeList + DAT_00fb7c8c * 0xc + 10))))) {
        Msg("\t<none>\n");
      }
      else {
        iVar11 = DAT_00fb7c8c * 0xc;
        this = (CAI_Concept *)((int)CResponseSystem::m_DebugExcludeList + iVar11);
        uVar8 = DAT_00fb7c8c;
        if (DAT_00fb7c8c == uVar10) goto LAB_005b9e3a;
        do {
          do {
            uVar7 = CAI_Concept::GetStringConcept(this);
            Msg(&DAT_00c5799d,uVar7);
            uVar8 = (uint)*(ushort *)((int)CResponseSystem::m_DebugExcludeList + iVar11 + 10);
            if (DAT_00fb7c84 <= (int)uVar8) {
              return;
            }
            if (DAT_00fb7ca0 < uVar8) {
              return;
            }
            iVar11 = uVar8 * 0xc;
            this = (CAI_Concept *)((int)CResponseSystem::m_DebugExcludeList + iVar11);
          } while (uVar8 != *(ushort *)((int)CResponseSystem::m_DebugExcludeList + uVar8 * 0xc + 8))
          ;
LAB_005b9e3a:
        } while (*(ushort *)(this + 10) == uVar8);
      }
    }
    else {
      if (iVar11 == 2) {
        if (**(char **)(param_1 + 0x40c) == '!') {
          CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
          ::RemoveAll((CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                       *)&CResponseSystem::m_DebugExcludeList);
          CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>::Purge
                    ((CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int> *)
                     &CResponseSystem::m_DebugExcludeList);
          _DAT_00fb7c94 = 0xffff;
          _DAT_00fb7c9c = 0;
          DAT_00fb7ca0 = 0xffffffff;
          _DAT_00fb7ca4 = CResponseSystem::m_DebugExcludeList;
          Msg("Exclude list emptied.\n");
          return;
        }
        if (100 < DAT_00fb7c98) {
          return;
        }
      }
      else {
        if (iVar11 == 0) {
          return;
        }
        if (100 < DAT_00fb7c98) {
          return;
        }
        if (iVar11 < 2) {
          return;
        }
      }
      iVar11 = 1;
      do {
        uVar7 = *(undefined4 *)(param_1 + iVar11 * 4 + 0x408);
        CUtlSymbolTable::Find((char *)local_24);
        if (local_24[0] == -1) {
          puVar6 = &DAT_00d539c2;
          if (iVar11 < *(int *)param_1) {
            puVar6 = *(undefined1 **)(param_1 + iVar11 * 4 + 0x408);
          }
          Msg("\t\'%s\' is not a known concept (adding it anyway)\n",puVar6,uVar7);
        }
        pcVar3 = "";
        if (iVar11 < *(int *)param_1) {
          pcVar3 = *(char **)(param_1 + iVar11 * 4 + 0x408);
        }
        CAI_Concept::CAI_Concept((CAI_Concept *)local_24,pcVar3);
        uVar8 = DAT_00fb7ca0;
        uVar10 = _DAT_00fb7c94;
        pvVar2 = CResponseSystem::m_DebugExcludeList;
        if (_DAT_00fb7c94 == 0xffff) {
          if (((int)DAT_00fb7ca0 < 0) || (DAT_00fb7c84 <= (int)DAT_00fb7ca0)) {
            if (DAT_00fb7c84 < 1) goto LAB_005b9bca;
LAB_005b9ccc:
            uVar10 = 0;
LAB_005b9c7d:
            pvVar2 = CResponseSystem::m_DebugExcludeList;
            local_30._0_2_ = (short)uVar10;
            if ((short)local_30 == -1) {
LAB_005b9cd2:
              if (CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                  ::AllocInternal(bool)::__executeCount < 10) {
                CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                ::AllocInternal(bool)::__executeCount =
                     CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                     ::AllocInternal(bool)::__executeCount + 1;
                Warning("CUtlLinkedList overflow! (exhausted index range)\n");
              }
            }
            else {
              _DAT_00fb7c9c = _DAT_00fb7c9c + 1;
              iVar4 = uVar10 * 0xc;
              DAT_00fb7ca0 = uVar10;
              *(short *)((int)CResponseSystem::m_DebugExcludeList + iVar4 + 10) = (short)local_30;
              *(short *)((int)pvVar2 + iVar4 + 8) = (short)local_30;
              if (uVar10 != 0xffff) goto LAB_005b9a65;
            }
          }
          else {
            uVar9 = DAT_00fb7ca0 + 1;
            if ((-1 < (int)uVar9) && ((int)uVar9 < DAT_00fb7c84)) {
LAB_005b9c76:
              uVar10 = uVar9 & 0xffff;
              if (uVar10 == uVar9) goto LAB_005b9c7d;
              goto LAB_005b9cd2;
            }
LAB_005b9bca:
            if (DAT_00fb7c88 < 0) {
              local_30 = DAT_00fb7c84;
            }
            else {
              iVar4 = DAT_00fb7c84 + 1;
              if (DAT_00fb7c88 == 0) {
                iVar1 = 3;
                if (DAT_00fb7c84 != 0) {
                  iVar1 = DAT_00fb7c84;
                }
                for (; (local_30 = iVar1, iVar1 < iVar4 && (local_30 = iVar1 * 2, local_30 < iVar4))
                    ; iVar1 = iVar1 * 4) {
                }
              }
              else {
                for (local_30 = DAT_00fb7c88 * (DAT_00fb7c84 / DAT_00fb7c88 + 1); local_30 < iVar4;
                    local_30 = (local_30 + iVar4) / 2) {
                }
              }
              DAT_00fb7c84 = local_30;
              if (CResponseSystem::m_DebugExcludeList == (void *)0x0) {
                CResponseSystem::m_DebugExcludeList = malloc(local_30 * 0xc);
              }
              else {
                CResponseSystem::m_DebugExcludeList =
                     realloc(CResponseSystem::m_DebugExcludeList,local_30 * 0xc);
                local_30 = DAT_00fb7c84;
                uVar8 = DAT_00fb7ca0;
              }
            }
            _DAT_00fb7ca4 = CResponseSystem::m_DebugExcludeList;
            if (((int)uVar8 < 0) || (local_30 <= (int)uVar8)) {
              if (0 < local_30) goto LAB_005b9ccc;
            }
            else {
              uVar9 = uVar8 + 1;
              if ((-1 < (int)uVar9) && ((int)uVar9 < local_30)) goto LAB_005b9c76;
            }
            if (CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                ::AllocInternal(bool)::__executeCount < 10) {
              CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
              ::AllocInternal(bool)::__executeCount =
                   CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                   ::AllocInternal(bool)::__executeCount + 1;
              Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
            }
          }
        }
        else {
          local_30._0_2_ = (short)_DAT_00fb7c94;
          iVar4 = _DAT_00fb7c94 * 0xc;
          _DAT_00fb7c94 = (uint)*(ushort *)((int)CResponseSystem::m_DebugExcludeList + iVar4 + 10);
          *(short *)((int)CResponseSystem::m_DebugExcludeList + iVar4 + 10) = (short)local_30;
          *(short *)((int)pvVar2 + iVar4 + 8) = (short)local_30;
LAB_005b9a65:
          CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
          ::Unlink((CUtlLinkedList<CAI_Concept,unsigned_short,false,unsigned_int,CUtlMemory<UtlLinkedListElem_t<CAI_Concept,unsigned_short>,unsigned_int>>
                    *)&CResponseSystem::m_DebugExcludeList,uVar10);
          pvVar2 = CResponseSystem::m_DebugExcludeList;
          psVar5 = (short *)(iVar4 + (int)CResponseSystem::m_DebugExcludeList);
          psVar5[5] = -1;
          psVar5[4] = (short)DAT_00fb7c90;
          uVar8 = uVar10;
          if ((short)DAT_00fb7c90 != -1) {
            uVar8 = DAT_00fb7c90 & 0xffff;
            DAT_00fb7c90 = uVar10;
            *(short *)((int)pvVar2 + uVar8 * 0xc + 10) = (short)local_30;
            uVar10 = DAT_00fb7c8c;
            uVar8 = DAT_00fb7c90;
          }
          DAT_00fb7c90 = uVar8;
          DAT_00fb7c8c = uVar10;
          DAT_00fb7c98 = DAT_00fb7c98 + 1;
          *psVar5 = local_24[0];
          *(undefined4 *)(psVar5 + 2) = local_20;
        }
        iVar11 = iVar11 + 1;
      } while (iVar11 < *(int *)param_1);
    }
  }
  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)