L L4D2node

BZ2_bzWriteOpen

0x0028f930 · 320 bytes · unknown

Decompiled

undefined (0 params)

undefined4 * BZ2_bzWriteOpen(int *param_1,FILE *param_2,int param_3,uint param_4,uint param_5)

{
  int iVar1;
  undefined4 *__ptr;
  uint uVar2;
  
  if (param_1 != (int *)0x0) {
    *param_1 = 0;
  }
  if ((((param_2 == (FILE *)0x0) || (8 < param_3 - 1U)) || (0xfa < param_5)) || (4 < param_4)) {
    if (param_1 != (int *)0x0) {
      *param_1 = -2;
    }
  }
  else {
    iVar1 = ferror(param_2);
    if (iVar1 == 0) {
      __ptr = malloc(0x13cc);
      if (__ptr == (undefined4 *)0x0) {
        if (param_1 != (int *)0x0) {
          *param_1 = -3;
        }
      }
      else {
        if (param_1 != (int *)0x0) {
          *param_1 = 0;
        }
        *(undefined1 *)(__ptr + 0x4f2) = 0;
        __ptr[0x4f1] = 0;
        __ptr[0x4e3] = 0;
        *__ptr = param_2;
        *(undefined1 *)(__ptr + 0x4e4) = 1;
        uVar2 = 0x1e;
        if (param_5 != 0) {
          uVar2 = param_5;
        }
        __ptr[0x4ee] = 0;
        __ptr[0x4ef] = 0;
        __ptr[0x4f0] = 0;
        iVar1 = BZ2_bzCompressInit(__ptr + 0x4e5,param_3,param_4,uVar2);
        if (iVar1 == 0) {
          __ptr[0x4e6] = 0;
          *(undefined1 *)(__ptr + 0x4f2) = 1;
          return __ptr;
        }
        if (param_1 != (int *)0x0) {
          *param_1 = iVar1;
        }
        __ptr[0x4f1] = iVar1;
        free(__ptr);
      }
    }
    else if (param_1 != (int *)0x0) {
      *param_1 = -6;
      return (undefined4 *)0x0;
    }
  }
  return (undefined4 *)0x0;
}

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)