L L4D2node

CRuleScriptBridge::Binding_FindAllMatches

0x0080da60 · 536 bytes · __thiscall

_ZN17CRuleScriptBridge22Binding_FindAllMatchesEP9HSCRIPT__f

Decompiled

undefined (3 params)

/* CRuleScriptBridge::Binding_FindAllMatches(HSCRIPT__*, float) */

void * __thiscall
CRuleScriptBridge::Binding_FindAllMatches(CRuleScriptBridge *this,HSCRIPT__ *param_1,float param_2)

{
  float fVar1;
  char cVar2;
  int iVar3;
  float *pfVar4;
  char *pcVar5;
  void *pvVar6;
  int iVar7;
  int iVar8;
  void *local_64;
  undefined4 local_60;
  ushort local_5c;
  ushort local_5a;
  void *local_58 [2];
  undefined2 local_50;
  ushort local_4e;
  float *local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  float *local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined1 local_20;
  
  local_38 = 0;
  local_34 = 0;
  local_30 = 0;
  local_2c = 0;
  local_28 = 0;
  local_24 = *(undefined4 *)this;
  local_20 = 0;
                    /* try { // try from 0080daa5 to 0080dab9 has its CatchHandler @ 0080dcf3 */
  cVar2 = ScriptToResponseQuery((CResponseQuery *)&local_38,param_1);
  if (cVar2 == '\0') {
    Warning("Unable to parse script table to Decider query.\n");
    pvVar6 = (void *)0x0;
  }
  else {
    local_4c = (float *)0x0;
    local_48 = 0;
    local_44 = 0;
    local_40 = 0;
    local_3c = (float *)0x0;
                    /* try { // try from 0080db38 to 0080db3a has its CatchHandler @ 0080dcef */
    iVar3 = (**(code **)(**(int **)this + 0xc))(*(int **)this,&local_38,&local_4c,1,0);
    if (iVar3 < 1) {
      pvVar6 = (void *)0x0;
    }
    else {
      fVar1 = *local_4c;
      local_5a = 0;
      local_5c = 0;
      local_64 = (void *)0x0;
                    /* try { // try from 0080db6e to 0080db73 has its CatchHandler @ 0080dcf7 */
      (**(code **)(*g_pScriptVM + 0xa4))(g_pScriptVM,&local_64);
      iVar7 = 0;
      iVar8 = 0;
      do {
        pfVar4 = (float *)((int)local_4c + iVar8);
        if (*pfVar4 <= fVar1 - param_2 && fVar1 - param_2 != *pfVar4) break;
        if (pfVar4[2] != 0.0) {
          local_58[0] = *(void **)((int)pfVar4[2] + 8);
          local_50 = 0x20;
          local_4e = 0;
                    /* try { // try from 0080dbd6 to 0080dbd7 has its CatchHandler @ 0080dc89 */
          (**(code **)(*g_pScriptVM + 0xb0))(g_pScriptVM,local_64,local_58);
          if ((local_4e & 1) != 0) {
            free(local_58[0]);
          }
        }
        iVar7 = iVar7 + 1;
        iVar8 = iVar8 + 0xc;
      } while (iVar7 != iVar3);
      pvVar6 = local_64;
      if (local_5c != 0x20) {
        pcVar5 = "unknown_variant_type";
        if (local_5c < 0x29) {
          pcVar5 = *(char **)(CSWTCH_760 + (uint)local_5c * 4);
        }
                    /* try { // try from 0080dc16 to 0080dc1a has its CatchHandler @ 0080dcf7 */
        Warning("No free conversion of %s variant to HSCRIPT right now\n",pcVar5);
        pvVar6 = (void *)0x0;
      }
      if ((local_5a & 1) != 0) {
        free(local_64);
        local_5a = local_5a & 0xfffe;
      }
      local_64 = (void *)0x0;
      local_60 = 0;
      local_5c = 0;
    }
    local_40 = 0;
    CUtlMemory<rr2::MatchInfo_t,int>::Purge((CUtlMemory<rr2::MatchInfo_t,int> *)&local_4c);
    local_3c = local_4c;
    CUtlMemory<rr2::MatchInfo_t,int>::Purge((CUtlMemory<rr2::MatchInfo_t,int> *)&local_4c);
  }
  local_2c = 0;
  CUtlMemory<rr2::CResponseQuery::CFact,int>::Purge
            ((CUtlMemory<rr2::CResponseQuery::CFact,int> *)&local_38);
  local_28 = local_38;
  CUtlMemory<rr2::CResponseQuery::CFact,int>::Purge
            ((CUtlMemory<rr2::CResponseQuery::CFact,int> *)&local_38);
  return pvVar6;
}

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)