L L4D2node

ZipAdd

0x000ef3c0 · 364 bytes · __cdecl

_Z6ZipAddP6HZIP__PKcPvjj

Decompiled

undefined (5 params)

/* ZipAdd(HZIP__*, char const*, void*, unsigned int, unsigned int) */

undefined4 ZipAdd(HZIP__ *param_1,char *param_2,void *param_3,uint param_4,uint param_5)

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  int in_GS_OFFSET;
  void *in_stack_fffffdcc;
  void *pvVar5;
  uint uVar6;
  uint in_stack_fffffdd4;
  char local_228 [520];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == (HZIP__ *)0x0) {
    uVar3 = 0x10000;
    puVar1 = (undefined4 *)___tls_get_addr();
    *puVar1 = 0x10000;
  }
  else if (*(int *)param_1 == 2) {
    uVar6 = *(uint *)(param_1 + 4);
    if (param_5 == 2) {
      uVar3 = 0x40000;
      pcVar4 = local_228;
      for (iVar2 = 0x82; iVar2 != 0; iVar2 = iVar2 + -1) {
        pcVar4[0] = '\0';
        pcVar4[1] = '\0';
        pcVar4[2] = '\0';
        pcVar4[3] = '\0';
        pcVar4 = pcVar4 + 4;
      }
      pvVar5 = (void *)0x208;
      V_strncpy(local_228,param_2,0x208);
      if ((*(int *)(uVar6 + 0xc) == 0) && (uVar3 = 0x50000, *(char *)(uVar6 + 0x24) == '\0')) {
        uVar3 = TZip::Add((TZip *)param_4,(char *)0x2,pvVar5,uVar6,in_stack_fffffdd4);
      }
    }
    else {
      uVar3 = 0x40000;
      if ((*(int *)(uVar6 + 0xc) == 0) && (uVar3 = 0x50000, *(char *)(uVar6 + 0x24) == '\0')) {
        uVar3 = TZip::Add((TZip *)param_4,(char *)param_5,in_stack_fffffdcc,uVar6,in_stack_fffffdd4)
        ;
      }
    }
    puVar1 = (undefined4 *)___tls_get_addr();
    *puVar1 = uVar3;
  }
  else {
    uVar3 = 0x80000;
    puVar1 = (undefined4 *)___tls_get_addr();
    *puVar1 = 0x80000;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* 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)