L L4D2node

CExpressionEvaluator::Evaluate

0x002672a0 · 327 bytes · __thiscall

_ZN20CExpressionEvaluator8EvaluateERbPKcPFbS2_EPFvS2_E

Decompiled

undefined (5 params)

/* CExpressionEvaluator::Evaluate(bool&, char const*, bool (*)(char const*), void (*)(char const*))
    */

undefined4 __thiscall
CExpressionEvaluator::Evaluate
          (CExpressionEvaluator *this,bool *param_1,char *param_2,_func_bool_char_ptr *param_3,
          _func_void_char_ptr *param_4)

{
  bool bVar1;
  code *pcVar2;
  undefined4 uVar3;
  int iVar4;
  char *pcVar5;
  int in_GS_OFFSET;
  char acStack_222 [514];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_2 == (char *)0x0) {
LAB_0026738b:
    uVar3 = 0;
  }
  else {
    if (*param_2 == '[') {
      iVar4 = _V_strlen(param_2);
      if (0x200 < iVar4 + 1U) goto LAB_0026738b;
      pcVar5 = param_2 + 1;
      param_2 = acStack_222 + 2;
      V_strncpy(param_2,pcVar5,iVar4);
      if (acStack_222[iVar4] == ']') {
        acStack_222[iVar4] = '\0';
      }
    }
    pcVar2 = DefaultConditionalSymbolProc;
    *(char **)(this + 8) = param_2;
    if (param_3 != (_func_bool_char_ptr *)0x0) {
      pcVar2 = param_3;
    }
    *(undefined4 *)this = 0;
    *(undefined4 *)(this + 0xc) = 0;
    *(code **)(this + 0x90) = pcVar2;
    pcVar2 = DefaultConditionalErrorProc;
    if (param_4 != (_func_void_char_ptr *)0x0) {
      pcVar2 = param_4;
    }
    this[4] = (CExpressionEvaluator)0x0;
    *(code **)(this + 0x94) = pcVar2;
    uVar3 = BuildExpression(this);
    if ((char)uVar3 != '\0') {
      bVar1 = (bool)SimplifyNode(this,(ExprNode **)this);
      *param_1 = bVar1;
    }
    FreeTree(this,(ExprNode **)this);
    *(undefined4 *)this = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* 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)