L L4D2node

GCSDK::CSchema::AddFullTextIndex

0x0008e4d0 · 892 bytes · __thiscall

_ZN5GCSDK7CSchema16AddFullTextIndexEPNS_11CSchemaFullEPKcS4_

Decompiled

undefined (4 params)

/* GCSDK::CSchema::AddFullTextIndex(GCSDK::CSchemaFull*, char const*, char const*) */

void __thiscall
GCSDK::CSchema::AddFullTextIndex(CSchema *this,CSchemaFull *param_1,char *param_2,char *param_3)

{
  char cVar1;
  int iVar2;
  char *__ptr;
  char *pcVar3;
  int iVar4;
  char *pcVar5;
  char *__s;
  int in_GS_OFFSET;
  int local_124;
  CDbgFmtMsg local_120 [256];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = _V_strlen(param_3);
  __ptr = malloc(iVar2 + 1U);
  V_strncpy(__ptr,param_3,iVar2 + 1U);
  __s = __ptr;
  if (__ptr == (char *)0x0) {
    iVar2 = LoggingSystem_LogAssert
                      ("%s (%d) : %s\n","/data/src/gcsdk/sqlaccess/schema.cpp",0x3a9,
                       "Assertion Failed: false");
    if (iVar2 == 1) {
      cVar1 = ShouldUseNewAssertDialog();
      if ((cVar1 == '\0') ||
         (cVar1 = DoNewAssertDialog("/data/src/gcsdk/sqlaccess/schema.cpp",0x3a9,
                                    "Assertion Failed: false"), cVar1 != '\0')) {
        raise(5);
      }
      _ExitOnFatalAssert("/data/src/gcsdk/sqlaccess/schema.cpp",0x3a9);
    }
    goto LAB_0008e68c;
  }
  do {
    pcVar3 = strchr(__s,0x2c);
    if (pcVar3 == (char *)0x0) {
      pcVar5 = (char *)0x0;
    }
    else {
      pcVar5 = pcVar3 + 1;
      *pcVar3 = '\0';
    }
    for (; ((cVar1 = *__s, cVar1 == ' ' || ((byte)(cVar1 - 9U) < 2)) || (cVar1 == '\r'));
        __s = __s + 1) {
    }
    local_124 = FindIField(this,__s);
    if (local_124 == -1) {
      CDbgFmtMsg::CDbgFmtMsg
                (local_120,"Could not find index column \"%s\" on table \"%s\"",__s,this + 8);
      iVar2 = LoggingSystem_LogAssert
                        ("%s (%d) : %s\n","/data/src/gcsdk/sqlaccess/schema.cpp",0x3bd,local_120);
      if (iVar2 == 1) {
        cVar1 = ShouldUseNewAssertDialog();
        if (cVar1 == '\0') {
LAB_0008e620:
          raise(5);
        }
        else {
          CDbgFmtMsg::CDbgFmtMsg
                    (local_120,"Could not find index column \"%s\" on table \"%s\"",__s,this + 8);
                    /* try { // try from 0008e6e4 to 0008e6e8 has its CatchHandler @ 0008e83d */
          cVar1 = DoNewAssertDialog("/data/src/gcsdk/sqlaccess/schema.cpp",0x3bd,local_120);
          if (cVar1 != '\0') goto LAB_0008e620;
        }
        _ExitOnFatalAssert("/data/src/gcsdk/sqlaccess/schema.cpp",0x3bd);
      }
    }
    CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
              ((CUtlVector<int,CUtlMemory<int,int>> *)(this + 200),*(int *)(this + 0xd4),&local_124)
    ;
    __s = pcVar5;
  } while (pcVar5 != (char *)0x0);
  free(__ptr);
  iVar2 = CSchemaFull::GetFTSCatalogByName(param_1,*(undefined4 *)(this + 0xfc),param_2);
  if (iVar2 == -1) {
    CDbgFmtMsg::CDbgFmtMsg
              (local_120,"Could not find fulltext catalog \"%s\" on table \"%s\"",param_2,this + 8);
    iVar4 = LoggingSystem_LogAssert
                      ("%s (%d) : %s\n","/data/src/gcsdk/sqlaccess/schema.cpp",0x3cb,local_120);
    if (iVar4 == 1) {
      cVar1 = ShouldUseNewAssertDialog();
      if (cVar1 == '\0') {
LAB_0008e766:
        raise(5);
      }
      else {
        CDbgFmtMsg::CDbgFmtMsg
                  (local_120,"Could not find fulltext catalog \"%s\" on table \"%s\"",param_2,
                   this + 8);
                    /* try { // try from 0008e81e to 0008e822 has its CatchHandler @ 0008e835 */
        cVar1 = DoNewAssertDialog("/data/src/gcsdk/sqlaccess/schema.cpp",0x3cb,local_120);
        if (cVar1 != '\0') goto LAB_0008e766;
      }
      _ExitOnFatalAssert("/data/src/gcsdk/sqlaccess/schema.cpp",0x3cb);
    }
  }
  *(int *)(this + 0xdc) = iVar2;
LAB_0008e68c:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)