L L4D2node

SV_WriteVoiceCodec

0x001fcac0 · 286 bytes · __cdecl

_Z18SV_WriteVoiceCodecR8bf_write

Decompiled

undefined (1 param)

/* SV_WriteVoiceCodec(bf_write&) */

void SV_WriteVoiceCodec(bf_write *param_1)

{
  int in_GS_OFFSET;
  undefined **local_168;
  undefined1 local_164;
  undefined4 local_160;
  undefined4 local_15c;
  undefined4 local_158;
  undefined8 local_154;
  undefined4 local_14c;
  undefined4 local_148;
  undefined8 local_144;
  undefined4 local_13c;
  undefined4 local_138;
  undefined1 local_134;
  undefined8 local_130;
  undefined4 local_128;
  undefined4 local_124;
  char *local_11c;
  undefined4 local_118;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (DAT_003b8064 < 2) {
    local_11c = "";
  }
  else {
    local_11c = "FCVAR_NEVER_AS_STRING";
    if ((sv_voicecodec[0x15] & 0x10) == 0) {
      local_11c = "";
      if (*(char **)(sv_voicecodec._28_4_ + 0x24) != (char *)0x0) {
        local_11c = *(char **)(sv_voicecodec._28_4_ + 0x24);
      }
    }
  }
  local_15c = 0;
  local_158 = 0;
  local_154 = 0;
  local_14c = 0;
  local_148 = 0;
  local_144 = 0;
  local_13c = 0;
  local_138 = 0;
  local_134 = 0;
  local_130 = 0;
  local_128 = 0;
  local_124 = 0;
  local_164 = 1;
  local_160 = 0;
  local_168 = &PTR__SVC_VoiceInit_002a1a68;
  local_118 = 5;
  SVC_VoiceInit::WriteToBuffer((SVC_VoiceInit *)&local_168,param_1);
  if (local_10 != *(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)