L L4D2node

CResponseSystem::ComputeMatcher

0x005b7fd0 · 646 bytes · __thiscall

_ZN15CResponseSystem14ComputeMatcherEP8CriteriaR7Matcher

Decompiled

undefined (3 params)

/* CResponseSystem::ComputeMatcher(Criteria*, Matcher&) */

void __thiscall
CResponseSystem::ComputeMatcher(CResponseSystem *this,Criteria *param_1,Matcher *param_2)

{
  char cVar1;
  char *pcVar2;
  bool bVar3;
  bool bVar4;
  byte bVar5;
  int iVar6;
  char *pcVar7;
  int in_GS_OFFSET;
  double dVar8;
  char local_136;
  char local_135;
  undefined2 local_122;
  char local_120 [128];
  char local_a0 [128];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(char **)(param_1 + 2) == (char *)0x0) {
    param_2[8] = (Matcher)((byte)param_2[8] & 0xfe);
  }
  else {
    local_120[0] = '\0';
    bVar3 = false;
    local_a0[0] = '\0';
    iVar6 = 0;
    local_136 = '\0';
    local_135 = '\0';
    bVar4 = false;
    pcVar2 = *(char **)(param_1 + 2);
LAB_005b8063:
    while( true ) {
      pcVar7 = pcVar2 + 1;
      cVar1 = *pcVar2;
      if (cVar1 == ',') break;
      if (cVar1 < '-') {
        if (cVar1 == '\0') break;
        if (cVar1 == '!') {
          local_136 = '\x01';
          pcVar2 = pcVar7;
        }
        else {
LAB_005b8050:
          local_a0[iVar6] = cVar1;
          iVar6 = iVar6 + 1;
          pcVar2 = pcVar7;
        }
      }
      else if (cVar1 == '=') {
        local_135 = '\x01';
        pcVar2 = pcVar7;
      }
      else if (cVar1 == '>') {
        bVar3 = true;
        pcVar2 = pcVar7;
      }
      else {
        if (cVar1 != '<') goto LAB_005b8050;
        bVar4 = true;
        pcVar2 = pcVar7;
      }
    }
    local_a0[iVar6] = '\0';
    ResolveToken(this,param_2,local_120,0x80,local_a0);
    if (bVar3) {
      param_2[8] = (Matcher)((byte)param_2[8] & 0xef | 8 | local_135 << 4);
      dVar8 = strtod(local_120,(char **)0x0);
      param_2[8] = (Matcher)((byte)param_2[8] | 2);
      *(float *)(param_2 + 4) = (float)dVar8;
    }
    else if (bVar4) {
      param_2[8] = (Matcher)((byte)param_2[8] & 0xbf | 0x20 | local_135 << 6);
      dVar8 = strtod(local_120,(char **)0x0);
      param_2[8] = (Matcher)((byte)param_2[8] | 2);
      *(float *)param_2 = (float)dVar8;
    }
    else {
      param_2[8] = (Matcher)((byte)param_2[8] & 0xfb | local_136 << 2);
      bVar5 = AppearsToBeANumber(local_120);
      param_2[8] = (Matcher)((byte)param_2[8] & 0xfd | (bVar5 & 1) * '\x02');
    }
    if (*pcVar2 != '\0') {
      local_136 = '\0';
      bVar3 = false;
      iVar6 = 0;
      local_135 = '\0';
      bVar4 = false;
      pcVar2 = pcVar7;
      goto LAB_005b8063;
    }
    CUtlSymbolTable::AddString((char *)&local_122);
    *(undefined2 *)(param_2 + 9) = local_122;
    CUtlSymbolTable::AddString((char *)&local_122);
    param_2[8] = (Matcher)((byte)param_2[8] | 1);
    *(undefined2 *)(param_2 + 0xb) = local_122;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)