L L4D2node

CSpeechScriptBridge::Term

0x0080a060 · 187 bytes · __thiscall

_ZN19CSpeechScriptBridge4TermEv.part.78

Decompiled

undefined (1 param)

/* CSpeechScriptBridge::Term() [clone .part.78] */

void __thiscall CSpeechScriptBridge::Term(CSpeechScriptBridge *this)

{
  int iVar1;
  int *piVar2;
  undefined1 *in_EAX;
  int *__ptr;
  int iVar3;
  
  *in_EAX = 0;
  piVar2 = g_pScriptVM;
  if (*(int *)(in_EAX + 4) != -1) {
    __ptr = *(int **)(in_EAX + 0xc);
    if ((g_pScriptVM != (int *)0x0) && (0 < *__ptr)) {
      iVar3 = 0;
      do {
        (**(code **)(*piVar2 + 0x4c))(piVar2,*(undefined4 *)__ptr[iVar3 + 1]);
        iVar1 = iVar3 * 4;
        iVar3 = iVar3 + 1;
        **(undefined4 **)(*(int *)(in_EAX + 0xc) + 4 + iVar1) = 0xffffffff;
        __ptr = *(int **)(in_EAX + 0xc);
      } while (iVar3 < *__ptr);
    }
    if (__ptr != &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
                  StaticData()::staticData) {
      free(__ptr);
      *(undefined4 **)(in_EAX + 0xc) =
           &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
            StaticData()::staticData;
    }
    if (((*(int *)(in_EAX + 4) != 0) && (piVar2 != (int *)0x0)) && ((in_EAX[8] & 1) == 0)) {
      (**(code **)(*piVar2 + 0x44))(piVar2,*(int *)(in_EAX + 4));
    }
    *(undefined4 *)(in_EAX + 4) = 0xffffffff;
  }
  piVar2 = *(int **)(in_EAX + 0x10);
  *(undefined4 *)(in_EAX + 8) = 0;
  if (piVar2 != (int *)0x0) {
    (**(code **)(*piVar2 + 4))(piVar2);
  }
  *(undefined4 *)(in_EAX + 0x10) = 0;
  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)