L L4D2node

V_binarytohex

0x0025e340 · 139 bytes · __cdecl

_Z13V_binarytohexPKhiPci

Decompiled

undefined (4 params)

/* V_binarytohex(unsigned char const*, int, char*, int) */

void V_binarytohex(uchar *param_1,int param_2,char *param_3,int param_4)

{
  byte *pbVar1;
  byte bVar2;
  int in_GS_OFFSET;
  char local_2a [10];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pbVar1 = param_1 + param_2;
  *param_3 = '\0';
  if (0 < param_2) {
    do {
      bVar2 = *param_1;
      param_1 = param_1 + 1;
      V_snprintf(local_2a,10,"%02x",(uint)bVar2);
      V_strncat(param_3,local_2a,param_4,-1);
    } while (param_1 != pbVar1);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* 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)