L L4D2node

Filter_StringToUserID

0x001efba0 · 369 bytes · __cdecl

_Z21Filter_StringToUserIDPKc

Decompiled

undefined (1 param)

/* Filter_StringToUserID(char const*) */

undefined1 * Filter_StringToUserID(char *param_1)

{
  int iVar1;
  long lVar2;
  char *pcVar3;
  int in_GS_OFFSET;
  char local_598 [127];
  undefined1 local_519;
  int local_518 [258];
  char *local_110;
  char *local_108;
  char *local_100;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  _V_memset(Filter_StringToUserID(char_const*)::id,0,0x10);
  if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
    iVar1 = V_strnicmp(param_1,"STEAM_",6);
    if (iVar1 == 0) {
      iVar1 = _V_strlen("STEAM_");
      V_strncpy(local_598,param_1 + iVar1,0x7f);
      Filter_StringToUserID(char_const*)::id._0_4_ = 1;
    }
    local_519 = 0;
    CCommand::CCommand((CCommand *)local_518);
    CCommand::Tokenize((CCommand *)local_518,local_598,(characterset_t *)0x0);
    if (4 < local_518[0]) {
      lVar2 = strtol(local_110,(char **)0x0,10);
      Filter_StringToUserID(char_const*)::id._4_2_ = (undefined2)lVar2;
      pcVar3 = "";
      if (2 < local_518[0]) {
        pcVar3 = local_108;
      }
      Filter_StringToUserID(char_const*)::id._12_4_ = strtol(pcVar3,(char **)0x0,10);
      pcVar3 = "";
      if (4 < local_518[0]) {
        pcVar3 = local_100;
      }
      Filter_StringToUserID(char_const*)::id._8_4_ = strtol(pcVar3,(char **)0x0,10);
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return Filter_StringToUserID(char_const*)::id;
  }
                    /* 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)