L L4D2node

COM_BlockSequenceCRCByte

0x00114cd0 · 223 bytes · __cdecl

_Z24COM_BlockSequenceCRCBytePhii

Decompiled

undefined (3 params)

/* COM_BlockSequenceCRCByte(unsigned char*, int, int) */

undefined1 COM_BlockSequenceCRCByte(uchar *param_1,int param_2,int param_3)

{
  size_t __n;
  int in_GS_OFFSET;
  undefined1 local_68 [4];
  undefined4 local_64;
  undefined1 local_60 [64];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 < 0) {
    Sys_Error("sequence < 0, in COM_BlockSequenceCRCByte\n");
  }
  local_64 = CRC32_GetTableEntry((param_3 + 1U) % 0x3fc);
  __n = 0x3c;
  if (param_2 < 0x3d) {
    __n = param_2;
  }
  memcpy(local_60,param_1,__n);
  local_60[__n] = (undefined1)local_64;
  local_60[__n + 1] = local_64._1_1_;
  local_60[__n + 2] = local_64._2_1_;
  local_60[__n + 3] = local_64._3_1_;
  CRC32_Init((ulong *)local_68);
  CRC32_ProcessBuffer((ulong *)local_68,local_60,__n + 4);
  CRC32_Final((ulong *)local_68);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_68[0];
  }
                    /* 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)