L L4D2node

BlackBox_Record

0x00113580 · 221 bytes · __cdecl

_Z15BlackBox_RecordPKcS0_z

Decompiled

undefined (2 params)

/* BlackBox_Record(char const*, char const*, ...) */

void BlackBox_Record(char *param_1,char *param_2,...)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  char local_420 [1024];
  int local_20;
  
  iVar3 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(blackbox._28_4_ + 0x30) != 0) {
    while( true ) {
      iVar2 = (**(code **)(*(int *)gBlackBox + 0x18))(gBlackBox);
      if (iVar2 <= iVar3) break;
      pcVar1 = (char *)(**(code **)(*(int *)gBlackBox + 0x14))(gBlackBox,iVar3);
      iVar2 = V_strcasecmp(pcVar1,param_1);
      if (iVar2 == 0) break;
      iVar3 = iVar3 + 1;
    }
    iVar2 = (**(code **)(*(int *)gBlackBox + 0x18))(gBlackBox);
    if (iVar3 < iVar2) {
      V_vsnprintf(local_420,0x400,param_2,&stack0x0000000c);
      (*(code *)**(undefined4 **)gBlackBox)(gBlackBox,iVar3,local_420);
    }
    else {
      Msg("Invalid blackbox type: %s\n",param_1);
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)