L L4D2node

CExpressionEvaluator::MakeFactor

0x00266f30 · 333 bytes · __thiscall

_ZN20CExpressionEvaluator10MakeFactorERP8ExprNode

Decompiled

undefined (2 params)

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

undefined4 __thiscall
CExpressionEvaluator::MakeFactor(CExpressionEvaluator *this,ExprNode **param_1)

{
  CExpressionEvaluator CVar1;
  code *pcVar2;
  int iVar3;
  CExpressionEvaluator *pCVar4;
  char cVar5;
  undefined4 uVar6;
  CExpressionEvaluator *pCVar7;
  int iVar8;
  int in_GS_OFFSET;
  CFmtStrN<256> local_12c [5];
  undefined1 local_127 [263];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (this[4] == (CExpressionEvaluator)0x28) {
    iVar3 = *(int *)(this + 8);
    iVar8 = *(int *)(this + 0xc);
    pCVar7 = (CExpressionEvaluator *)(iVar3 + iVar8);
    if (*pCVar7 == (CExpressionEvaluator)0x20) {
      pCVar4 = (CExpressionEvaluator *)(iVar3 + 1 + iVar8);
      do {
        pCVar7 = pCVar4;
        iVar8 = (int)pCVar7 - iVar3;
        *(int *)(this + 0xc) = iVar8;
        pCVar4 = pCVar7 + 1;
      } while (*pCVar7 == (CExpressionEvaluator)0x20);
    }
    *(int *)(this + 0xc) = iVar8 + 1;
    this[4] = *pCVar7;
    cVar5 = MakeExpression(this,param_1);
joined_r0x0026700c:
    if (cVar5 != '\0') {
      iVar3 = *(int *)(this + 8);
      iVar8 = *(int *)(this + 0xc);
      CVar1 = *(CExpressionEvaluator *)(iVar3 + iVar8);
      pCVar7 = (CExpressionEvaluator *)(iVar3 + iVar8);
      pCVar4 = (CExpressionEvaluator *)(iVar3 + 1 + iVar8);
      while (CVar1 == (CExpressionEvaluator)0x20) {
        iVar8 = (int)pCVar4 - iVar3;
        *(int *)(this + 0xc) = iVar8;
        CVar1 = *pCVar4;
        pCVar7 = pCVar4;
        pCVar4 = pCVar4 + 1;
      }
      *(int *)(this + 0xc) = iVar8 + 1;
      this[4] = *pCVar7;
      uVar6 = 1;
      goto LAB_00266fa8;
    }
  }
  else {
    cVar5 = IsIdentifierOrConstant(this,(char)this[4]);
    if (cVar5 != '\0') {
      cVar5 = MakeExprNode(this,param_1,(int)(char)this[4],2,0,0);
      goto joined_r0x0026700c;
    }
    uVar6 = 1;
    if (this[4] == (CExpressionEvaluator)0x21) goto LAB_00266fa8;
    pcVar2 = *(code **)(this + 0x94);
    if (pcVar2 != (code *)0x0) {
      CFmtStrN<256>::CFmtStrN(local_12c,"Bad expression token: %c",(int)(char)this[4]);
      (*pcVar2)(local_127);
    }
  }
  uVar6 = 0;
LAB_00266fa8:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar6;
}

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)