L L4D2node

COM_CopyFileChunk

0x00126c30 · 316 bytes · __cdecl

_Z17COM_CopyFileChunkPvS_i

Decompiled

undefined (3 params)

/* COM_CopyFileChunk(void*, void*, int) */

void COM_CopyFileChunk(void *param_1,void *param_2,int param_3)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_420 [1024];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (0x400 < param_3) {
    iVar1 = param_3;
    do {
      iVar1 = iVar1 + -0x400;
      (*(code *)**(undefined4 **)(g_pFileSystem + 4))(g_pFileSystem + 4,local_420,0x400,param_2);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))(g_pFileSystem + 4,local_420,0x400,param_1);
    } while (0x400 < iVar1);
    param_3 = (param_3 + -0x400) - (param_3 - 0x401U & 0xfffffc00);
  }
  (*(code *)**(undefined4 **)(g_pFileSystem + 4))(g_pFileSystem + 4,local_420,param_3,param_2);
  (**(code **)(*(int *)(g_pFileSystem + 4) + 4))(g_pFileSystem + 4,local_420,param_3,param_1);
  (**(code **)(*(int *)(g_pFileSystem + 4) + 0x20))(g_pFileSystem + 4,param_2);
  (**(code **)(*(int *)(g_pFileSystem + 4) + 0x20))(g_pFileSystem + 4,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)