L L4D2node

CResponseDict<Criteria,unsigned_short>::Find

0x005bf2b0 · 444 bytes · __thiscall

_ZNK13CResponseDictI8CriteriatE4FindEPKc

Decompiled

undefined (2 params)

/* CResponseDict<Criteria, unsigned short>::Find(char const*) const */

uint __thiscall
CResponseDict<Criteria,unsigned_short>::Find
          (CResponseDict<Criteria,unsigned_short> *this,char *param_1)

{
  byte bVar1;
  ushort uVar2;
  char cVar3;
  void *__ptr;
  int iVar4;
  int iVar5;
  uint uVar6;
  int local_48;
  undefined2 local_44;
  undefined4 local_42;
  undefined2 local_3e;
  undefined1 local_3c;
  undefined4 local_3b;
  undefined4 local_37;
  byte local_33;
  undefined2 local_32;
  undefined2 local_30;
  void *local_2e;
  undefined4 local_2a;
  undefined4 local_26;
  undefined4 local_22;
  
  iVar4 = -0x55555556;
  bVar1 = *param_1;
  while (bVar1 != 0) {
    param_1 = param_1 + 1;
    iVar4 = (uint)bVar1 + iVar4 * 0x21;
    bVar1 = *param_1;
  }
  local_33 = local_33 & 0x80;
  local_32 = 0xffff;
  local_44 = 0xffff;
  local_30 = 0xffff;
  local_3b = 0;
  local_37 = 0;
  local_2e = (void *)0x0;
  local_2a = 0;
  local_26 = 0;
  local_22 = 0;
  local_42 = 0;
  local_3e = float16::ConvertFloatTo16bits(1.0);
  uVar6 = (uint)*(ushort *)(this + 0x10);
  local_3c = 0;
  local_48 = iVar4;
  if (*(ushort *)(this + 0x10) == 0xffff) {
    __ptr = (void *)0x0;
  }
  else {
    iVar4 = *(int *)(this + 4);
    do {
      while( true ) {
        iVar5 = uVar6 * 0x34;
                    /* try { // try from 005bf38f to 005bf3a8 has its CatchHandler @ 005bf47f */
        cVar3 = (**(code **)this)(&local_48,iVar4 + 8 + iVar5);
        if (cVar3 != '\0') break;
        cVar3 = (**(code **)this)(*(int *)(this + 4) + iVar5 + 8,&local_48);
        __ptr = local_2e;
        if (cVar3 == '\0') goto LAB_005bf3c7;
        if ((CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
             ::Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                         ::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f21cd2 = 0xffff;
          DAT_00f21cd4 = 0xffff;
          __cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                               ::Links(unsigned_short)::s_Sentinel);
        }
        iVar4 = *(int *)(this + 4);
        uVar2 = *(ushort *)(iVar4 + 2 + iVar5);
        uVar6 = (uint)uVar2;
        __ptr = local_2e;
        if (uVar2 == 0xffff) goto LAB_005bf3c7;
      }
      if ((CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
           ::Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                       ::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
        DAT_00f21cd2 = 0xffff;
        CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
        ::Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f21cd4 = 0xffff;
        __cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                             ::Links(unsigned_short)::s_Sentinel);
      }
      iVar4 = *(int *)(this + 4);
      uVar6 = (uint)*(ushort *)(iVar4 + iVar5);
      __ptr = local_2e;
    } while (*(ushort *)(iVar4 + iVar5) != 0xffff);
  }
LAB_005bf3c7:
  free(__ptr);
  return uVar6;
}

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)