L L4D2node

variant_t::Set

0x0063dc50 · 167 bytes · __thiscall

_ZN9variant_t3SetE11_fieldtypesPv

Decompiled

undefined (3 params)

/* variant_t::Set(_fieldtypes, void*) */

void __thiscall variant_t::Set(variant_t *this,undefined4 param_2,variant_t *param_3)

{
  int *piVar1;
  undefined4 *puVar2;
  
  *(undefined4 *)(this + 0x10) = param_2;
  switch(param_2) {
  default:
    *(undefined4 *)this = 0;
    *(undefined4 *)(this + 0x10) = 0;
    break;
  case 1:
    *(int *)this = *(int *)param_3;
    break;
  case 2:
  case 5:
  case 9:
    *(int *)this = *(int *)param_3;
    break;
  case 3:
  case 0xf:
    *(int *)this = *(int *)param_3;
    *(int *)(this + 4) = *(int *)(param_3 + 4);
    *(int *)(this + 8) = *(int *)(param_3 + 8);
    break;
  case 6:
    *this = *param_3;
    break;
  case 7:
    *(int *)this = (int)*(short *)param_3;
    break;
  case 8:
    *(int *)this = (int)(char)*param_3;
    break;
  case 0xc:
    piVar1 = *(int **)param_3;
    if (piVar1 == (int *)0x0) {
      *(undefined4 *)(this + 0xc) = 0xffffffff;
    }
    else {
      puVar2 = (undefined4 *)(**(code **)(*piVar1 + 0xc))(piVar1);
      *(undefined4 *)(this + 0xc) = *puVar2;
    }
    break;
  case 0xd:
    *(int *)(this + 0xc) = *(int *)param_3;
  }
  return;
}

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)