L L4D2node

read_encoded_value_with_base

0x000ae1c0 · 255 bytes · unknown

Decompiled

undefined (0 params)

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Type propagation algorithm not settling */

ushort * read_encoded_value_with_base(ushort *param_1,undefined4 *param_2)

{
  byte bVar1;
  ushort uVar2;
  byte in_AL;
  ushort *puVar3;
  byte bVar4;
  ushort *in_EDX;
  ushort *puVar5;
  undefined4 *puVar6;
  byte *local_20;
  
  if (in_AL != 0x50) {
    switch(in_AL & 0xf) {
    case 0:
    case 3:
    case 0xb:
      local_20 = *(byte **)param_1;
      puVar3 = param_1 + 2;
      break;
    case 1:
      bVar4 = 0;
      local_20 = (byte *)0x0;
      puVar5 = param_1;
      do {
        puVar3 = (ushort *)((int)puVar5 + 1);
        uVar2 = *puVar5;
        bVar1 = bVar4 & 0x1f;
        bVar4 = bVar4 + 7;
        local_20 = (byte *)((uint)local_20 | ((byte)uVar2 & 0x7f) << bVar1);
        puVar5 = puVar3;
      } while ((char)(byte)uVar2 < '\0');
      break;
    case 2:
      local_20 = (byte *)(uint)*param_1;
      puVar3 = param_1 + 1;
      break;
    case 4:
    case 0xc:
      local_20 = *(byte **)param_1;
      puVar3 = param_1 + 4;
      break;
    default:
                    /* WARNING: Subroutine does not return */
      abort();
    case 9:
      puVar3 = (ushort *)read_sleb128();
      break;
    case 10:
      local_20 = (byte *)(int)(short)*param_1;
      puVar3 = param_1 + 1;
    }
    if (local_20 != (byte *)0x0) {
      if ((in_AL & 0x70) == 0x10) {
        in_EDX = param_1;
      }
      local_20 = local_20 + (int)in_EDX;
      if ((char)in_AL < '\0') {
        local_20 = *(byte **)local_20;
      }
    }
    *param_2 = local_20;
    return puVar3;
  }
  puVar6 = (undefined4 *)((uint)((int)param_1 + 3U) & 0xfffffffc);
  *param_2 = *puVar6;
  return (ushort *)(puVar6 + 1);
}

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)