L L4D2node

CopyMemory3D

0x0004b7a0 · 243 bytes · __cdecl

_Z12CopyMemory3DPvPKviiiiiii

Decompiled

undefined (9 params)

/* CopyMemory3D(void*, void const*, int, int, int, int, int, int, int) */

void CopyMemory3D(void *param_1,void *param_2,int param_3,int param_4,int param_5,int param_6,
                 int param_7,int param_8,int param_9)

{
  int iVar1;
  int local_34;
  void *local_30;
  void *local_2c;
  
  local_2c = param_1;
  local_30 = param_2;
  local_34 = param_5;
  if (((param_5 != 0) && (param_4 != 0)) && (param_3 != 0)) {
    iVar1 = param_4;
    if ((param_3 == param_8) && (param_3 == param_6)) {
      if (param_7 == param_9) {
        memcpy(param_1,param_2,param_3 * param_4 * param_5);
        return;
      }
      do {
        param_5 = param_5 + -1;
        memcpy(param_1,param_2,param_3 * param_4);
        param_1 = (void *)((int)param_1 + param_9);
        param_2 = (void *)((int)param_2 + param_7);
      } while (param_5 != -1);
    }
    else {
      do {
        do {
          memcpy(param_1,param_2,param_3);
          param_1 = (void *)((int)param_1 + param_8);
          param_2 = (void *)((int)param_2 + param_6);
          iVar1 = iVar1 + -1;
        } while (iVar1 != 0);
        local_34 = local_34 + -1;
        param_2 = (void *)((int)local_30 + param_7);
        param_1 = (void *)((int)local_2c + param_9);
        iVar1 = param_4;
        local_2c = param_1;
        local_30 = param_2;
      } while (local_34 != -1);
    }
  }
  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)