L L4D2node

CExpressionEvaluator::SimplifyNode

0x00b84c10 · 123 bytes · __thiscall

_ZN20CExpressionEvaluator12SimplifyNodeERP8ExprNode

Decompiled

undefined (2 params)

/* CExpressionEvaluator::SimplifyNode(ExprNode*&) */

ExprNode __thiscall
CExpressionEvaluator::SimplifyNode(CExpressionEvaluator *this,ExprNode **param_1)

{
  byte bVar1;
  byte bVar2;
  ExprNode EVar3;
  ExprNode *pEVar4;
  
  EVar3 = (ExprNode)0x0;
  if (*param_1 != (ExprNode *)0x0) {
    bVar1 = SimplifyNode(this,(ExprNode **)*param_1);
    bVar2 = SimplifyNode(this,(ExprNode **)(*param_1 + 4));
    pEVar4 = *param_1;
    if (*(int *)(pEVar4 + 8) == 0) {
      if (pEVar4[0xc] == (ExprNode)0x26) {
        pEVar4[0xc] = (ExprNode)(bVar2 & bVar1);
        pEVar4 = *param_1;
      }
      else {
        pEVar4[0xc] = (ExprNode)(bVar2 | bVar1);
        pEVar4 = *param_1;
      }
    }
    else if (*(int *)(pEVar4 + 8) == 1) {
      pEVar4[0xc] = (ExprNode)(bVar2 ^ 1);
      pEVar4 = *param_1;
    }
    *(undefined4 *)(pEVar4 + 8) = 2;
    EVar3 = (*param_1)[0xc];
  }
  return EVar3;
}

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)