L L4D2node

GCSDK::CRecordInfo::BFindColumnByName

0x00093f60 · 369 bytes · __thiscall

_ZN5GCSDK11CRecordInfo17BFindColumnByNameEPKcPi

Decompiled

undefined (3 params)

/* GCSDK::CRecordInfo::BFindColumnByName(char const*, int*) */

bool __thiscall GCSDK::CRecordInfo::BFindColumnByName(CRecordInfo *this,char *param_1,int *param_2)

{
  ushort uVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  uint uVar5;
  char *local_24 [5];
  
  *param_2 = -1;
  if (this[0xe2] == (CRecordInfo)0x0) {
    BuildColumnNameIndex(this);
  }
  uVar5 = (uint)*(ushort *)(this + 0xb4);
  local_24[0] = param_1;
  if (*(ushort *)(this + 0xb4) != 0xffff) {
    iVar3 = *(int *)(this + 0xa8);
    do {
      while( true ) {
        iVar4 = uVar5 * 0x10;
        cVar2 = (**(code **)(this + 0xa4))(local_24,iVar3 + 8 + iVar4);
        if (cVar2 != '\0') break;
        cVar2 = (**(code **)(this + 0xa4))(*(int *)(this + 0xa8) + iVar4 + 8,local_24);
        if (cVar2 == '\0') {
          *param_2 = uVar5;
          return uVar5 != 0xffff;
        }
        if (CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
            ::Links(unsigned_short)::s_Sentinel == '\0') {
          iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                       ::Links(unsigned_short)::s_Sentinel);
          if (iVar3 != 0) {
            CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
            ::Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_000d28da = 0xffff;
            DAT_000d28dc = 0xffff;
            __cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                 ::Links(unsigned_short)::s_Sentinel);
          }
        }
        iVar3 = *(int *)(this + 0xa8);
        uVar1 = *(ushort *)(iVar3 + 2 + iVar4);
        uVar5 = (uint)uVar1;
        if (uVar1 == 0xffff) goto LAB_0009401b;
      }
      if (CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Links(unsigned_short)::s_Sentinel == '\0') {
        iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                                     ::Links(unsigned_short)::s_Sentinel);
        if (iVar3 != 0) {
          DAT_000d28da = 0xffff;
          CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d28dc = 0xffff;
          __cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                               ::Links(unsigned_short)::s_Sentinel);
        }
      }
      iVar3 = *(int *)(this + 0xa8);
      uVar5 = (uint)*(ushort *)(iVar3 + iVar4);
    } while (*(ushort *)(iVar3 + iVar4) != 0xffff);
  }
LAB_0009401b:
  *param_2 = 0xffff;
  return false;
}

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)