CRuleScriptBridge::Binding_FindBestMatch
0x0080d660 · 206 bytes · __thiscall
_ZN17CRuleScriptBridge21Binding_FindBestMatchEP9HSCRIPT__
Decompiled
undefined (2 params)
/* CRuleScriptBridge::Binding_FindBestMatch(HSCRIPT__*) */
undefined4 __thiscall
CRuleScriptBridge::Binding_FindBestMatch(CRuleScriptBridge *this,HSCRIPT__ *param_1)
{
int **ppiVar1;
char cVar2;
int **ppiVar3;
undefined4 uVar4;
int *local_50;
float local_34;
int local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
undefined4 local_1c;
undefined4 local_18;
undefined4 local_14;
undefined1 local_10;
local_28 = 0;
local_24 = 0;
local_20 = 0;
local_1c = 0;
local_18 = 0;
local_14 = *(undefined4 *)this;
local_10 = 0;
/* try { // try from 0080d6a4 to 0080d730 has its CatchHandler @ 0080d735 */
local_50 = (int *)0x80d6a9;
cVar2 = ScriptToResponseQuery((CResponseQuery *)&local_28,param_1);
if (cVar2 == '\0') {
local_50 = (int *)0x80d6b9;
Warning();
ppiVar1 = (int **)&stack0xffffffb4;
}
else {
local_50 = (int *)0x80d705;
(**(code **)(**(int **)this + 8))();
ppiVar3 = &local_50;
ppiVar1 = &local_50;
if ((local_34 != -2.1474836e+09) && (ppiVar1 = &local_50, local_2c != 0)) {
local_50 = g_pScriptVM;
uVar4 = (**(code **)(*g_pScriptVM + 0x40))();
goto LAB_0080d6bb;
}
}
ppiVar3 = ppiVar1;
uVar4 = 0;
LAB_0080d6bb:
*ppiVar3 = (int *)&local_28;
local_1c = 0;
ppiVar3[-1] = (int *)0x80d6ca;
CUtlMemory<rr2::CResponseQuery::CFact,int>::Purge
((CUtlMemory<rr2::CResponseQuery::CFact,int> *)*ppiVar3);
*ppiVar3 = (int *)&local_28;
local_18 = local_28;
ppiVar3[-1] = (int *)0x80d6d8;
CUtlMemory<rr2::CResponseQuery::CFact,int>::Purge
((CUtlMemory<rr2::CResponseQuery::CFact,int> *)*ppiVar3);
return uVar4;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.