L L4D2node

GetValueToAutoRef

0x0080a8e0 · 139 bytes · __regparm3

_ZL17GetValueToAutoRefR14CScriptAutoRefP9HSCRIPT__PKc

Decompiled

undefined (3 params)

/* GetValueToAutoRef(CScriptAutoRef&, HSCRIPT__*, char const*) */

undefined4 __regparm3 GetValueToAutoRef(CScriptAutoRef *param_1,HSCRIPT__ *param_2,char *param_3)

{
  void *pvVar1;
  undefined4 uVar2;
  void *local_28 [2];
  short local_20;
  ushort local_1e;
  
  local_20 = 0;
  local_1e = 0;
  local_28[0] = (void *)0x0;
                    /* try { // try from 0080a917 to 0080a96c has its CatchHandler @ 0080a974 */
  uVar2 = (**(code **)(*g_pScriptVM + 0x90))(g_pScriptVM,param_2,param_3,local_28);
  pvVar1 = local_28[0];
  if ((char)uVar2 != '\0') {
    if (local_20 == 0x20) {
      if (*(int *)param_1 != 0) {
        (**(code **)(*g_pScriptVM + 0x30))(g_pScriptVM,*(int *)param_1);
      }
      *(void **)param_1 = pvVar1;
    }
    else {
      uVar2 = 0;
    }
  }
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  return uVar2;
}

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)