L L4D2node

BZ2_bzDecompressInit

0x0028e8e0 · 279 bytes · unknown

Decompiled

undefined (0 params)

undefined4 BZ2_bzDecompressInit(int param_1,uint param_2,uint param_3)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  code *pcVar4;
  
  if (((param_1 != 0) && (param_3 < 2)) && (param_2 < 5)) {
    pcVar4 = *(code **)(param_1 + 0x24);
    if (pcVar4 == (code *)0x0) {
      iVar1 = *(int *)(param_1 + 0x28);
      *(code **)(param_1 + 0x24) = default_bzalloc;
      pcVar4 = default_bzalloc;
    }
    else {
      iVar1 = *(int *)(param_1 + 0x28);
    }
    if (iVar1 == 0) {
      *(code **)(param_1 + 0x28) = default_bzfree;
    }
    piVar2 = (int *)(*pcVar4)(*(undefined4 *)(param_1 + 0x2c),0xfa74,1);
    if (piVar2 == (int *)0x0) {
      uVar3 = 0xfffffffd;
    }
    else {
      *piVar2 = param_1;
      *(int **)(param_1 + 0x20) = piVar2;
      piVar2[1] = 10;
      piVar2[8] = 0;
      piVar2[7] = 0;
      piVar2[0x319] = 0;
      *(undefined4 *)(param_1 + 8) = 0;
      *(undefined4 *)(param_1 + 0xc) = 0;
      *(undefined4 *)(param_1 + 0x18) = 0;
      *(undefined4 *)(param_1 + 0x1c) = 0;
      *(char *)(piVar2 + 10) = (char)param_3;
      piVar2[0x315] = 0;
      piVar2[0x314] = 0;
      piVar2[0x313] = 0;
      piVar2[0xb] = 0;
      piVar2[0xc] = param_2;
      uVar3 = 0;
    }
    return uVar3;
  }
  return 0xfffffffe;
}

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.



        
        

⚠ This function has no mangled symbol — it may be internal/static. The Linux gamedata field uses @-prefix symbol resolution which requires an exported mangled name. You'll need a Linux byte signature for this one (extract via extract_signature.java).


          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)