L L4D2node

EngineBitBufErrorHandler

0x001131b0 · 286 bytes · __cdecl

_Z24EngineBitBufErrorHandler15BitBufErrorTypePKc

Decompiled

undefined (2 params)

/* EngineBitBufErrorHandler(BitBufErrorType, char const*) */

void EngineBitBufErrorHandler(int param_1,char *param_2)

{
  int iVar1;
  char *pcVar2;
  char local_3c [30];
  short local_1e [7];
  
  if (param_2 == (char *)0x0) {
    param_2 = "(unknown)";
  }
  if (EngineBitBufErrorHandler(BitBufErrorType,char_const*)::errorNames == '\0') {
    iVar1 = __cxa_guard_acquire(&EngineBitBufErrorHandler(BitBufErrorType,char_const*)::errorNames);
    if (iVar1 != 0) {
                    /* try { // try from 00113205 to 00113209 has its CatchHandler @ 001132da */
      CUtlSymbolTable::CUtlSymbolTable
                ((CUtlSymbolTable *)
                 EngineBitBufErrorHandler(BitBufErrorType,char_const*)::errorNames,0,0x10,false);
                    /* try { // try from 00113229 to 0011322d has its CatchHandler @ 00113306 */
      CUtlSymbolTable::CUtlSymbolTable
                ((CUtlSymbolTable *)
                 (EngineBitBufErrorHandler(BitBufErrorType,char_const*)::errorNames + 0x38),0,0x10,
                 false);
      __cxa_guard_release(&EngineBitBufErrorHandler(BitBufErrorType,char_const*)::errorNames);
      __cxa_atexit(__tcf_0,0,&__dso_handle);
    }
  }
  CUtlSymbolTable::Find((char *)local_1e);
  if (local_1e[0] == -1) {
    pcVar2 = param_2;
    CUtlSymbolTable::AddString(local_3c);
    if (param_1 == 0) {
      Warning("Error in bitbuf [%s]: out of range value. Debug in bitbuf_errorhandler.cpp\n",param_2
              ,pcVar2);
    }
    else if (param_1 == 1) {
      Warning("Error in bitbuf [%s]: buffer overrun. Debug in bitbuf_errorhandler.cpp\n",param_2,
              pcVar2);
    }
  }
  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)