CResponseSystem::CopyCriteriaFrom
0x005bd3e0 · 1532 bytes · __thiscall
_ZN15CResponseSystem16CopyCriteriaFromEP4RuleS1_PS_
Decompiled
undefined (4 params)
/* CResponseSystem::CopyCriteriaFrom(Rule*, Rule*, CResponseSystem*) */
void __thiscall
CResponseSystem::CopyCriteriaFrom
(CResponseSystem *this,Rule *param_1,Rule *param_2,CResponseSystem *param_3)
{
undefined4 uVar1;
undefined4 uVar2;
byte bVar3;
undefined1 uVar4;
byte bVar5;
undefined2 uVar6;
undefined2 uVar7;
int iVar8;
int iVar9;
ushort uVar10;
short sVar11;
undefined2 uVar12;
undefined2 uVar13;
int iVar14;
char *pcVar15;
byte *pbVar16;
CResponseDict<Criteria,unsigned_short> *this_00;
int iVar17;
int iVar18;
uint __size;
int iVar19;
int local_b8;
int local_a0;
byte *local_9c;
undefined2 local_96;
undefined4 local_94;
undefined2 local_90;
undefined1 local_8e;
undefined4 local_8d;
undefined4 local_89;
byte local_85;
undefined2 local_84;
undefined2 local_82;
void *local_80;
undefined4 local_7c;
int local_78;
undefined4 local_74;
undefined4 local_70;
undefined2 local_6a;
int local_48;
undefined2 local_44;
undefined4 local_42;
undefined2 local_3e;
undefined1 local_3c;
undefined4 local_3b;
undefined4 local_37;
byte local_33;
undefined2 local_32;
undefined2 local_30;
void *local_2e;
uint local_2a;
undefined4 local_26;
void *local_22;
iVar8 = *(int *)(param_1 + 8);
if (0 < iVar8) {
local_b8 = 0;
do {
iVar14 = (uint)*(ushort *)(*(int *)param_1 + local_b8) * 0x34;
iVar19 = *(int *)(this + 0x48) + iVar14;
if (iVar19 != -0xc) {
local_48 = *(undefined4 *)(iVar19 + 8);
uVar10 = CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x60),(Node_t *)&local_48);
if (uVar10 == 0xffff) {
pcVar15 = "";
}
else {
pcVar15 = *(char **)((uint)uVar10 * 0x10 + *(int *)(this + 100) + 0xc);
}
this_00 = (CResponseDict<Criteria,unsigned_short> *)(param_3 + 0x44);
sVar11 = CResponseDict<Criteria,unsigned_short>::Find(this_00,pcVar15);
if (sVar11 == -1) {
local_85 = local_85 & 0x80;
local_84 = 0xffff;
local_82 = 0xffff;
local_8d = 0;
local_89 = 0;
local_80 = (void *)0x0;
local_7c = 0;
local_78 = 0;
local_74 = 0;
local_94 = 0;
uVar12 = float16::ConvertFloatTo16bits(1.0);
local_8e = 0;
local_96 = *(undefined2 *)(iVar19 + 0xc);
local_90 = uVar12;
/* try { // try from 005bd55b to 005bd78c has its CatchHandler @ 005bd9e6 */
local_94 = ResponseCopyString(*(char **)(iVar19 + 0xe));
local_90 = *(undefined2 *)(iVar19 + 0x12);
local_8d = *(undefined4 *)(iVar19 + 0x15);
local_8e = *(undefined1 *)(iVar19 + 0x14);
local_89 = *(undefined4 *)(iVar19 + 0x19);
bVar3 = *(byte *)(iVar19 + 0x1d);
local_85 = local_85 & 0x80 | bVar3 & 1 | bVar3 & 2 | bVar3 & 4 | bVar3 & 8 | bVar3 & 0x10
| bVar3 & 0x20 | bVar3 & 0x40;
local_84 = *(undefined2 *)(iVar19 + 0x1e);
local_82 = *(undefined2 *)(iVar19 + 0x20);
if (0 < *(int *)(iVar19 + 0x2a)) {
iVar9 = *(int *)(iVar19 + 0x2a) * 2;
iVar17 = 0;
do {
while( true ) {
iVar18 = (uint)*(ushort *)(*(int *)(iVar19 + 0x22) + iVar17) * 0x34 +
*(int *)(this + 0x48);
sVar11 = CResponseDict<Criteria,unsigned_short>::Find
(this_00,*(char **)(iVar18 + 0xe));
if (sVar11 != -1) break;
uVar13 = *(undefined2 *)(iVar18 + 0xc);
pcVar15 = (char *)ResponseCopyString(*(char **)(iVar18 + 0xe));
local_6a = *(undefined2 *)(iVar18 + 0x12);
uVar4 = *(undefined1 *)(iVar18 + 0x14);
uVar1 = *(undefined4 *)(iVar18 + 0x15);
uVar2 = *(undefined4 *)(iVar18 + 0x19);
bVar3 = *(byte *)(iVar18 + 0x1d);
uVar6 = *(undefined2 *)(iVar18 + 0x1e);
uVar7 = *(undefined2 *)(iVar18 + 0x20);
local_9c = (byte *)ResponseCopyString(*(char **)(iVar18 + 0xe));
bVar5 = *local_9c;
if (bVar5 == 0) {
iVar18 = -0x55555556;
}
else {
iVar18 = -0x55555556;
pbVar16 = local_9c;
do {
pbVar16 = pbVar16 + 1;
iVar18 = (uint)bVar5 + iVar18 * 0x21;
bVar5 = *pbVar16;
} while (bVar5 != 0);
}
local_a0 = iVar18;
CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert((CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(param_3 + 0x60),(Node_t *)&local_a0);
local_3c = 0;
local_33 = local_33 & 0x80;
local_32 = 0xffff;
local_30 = 0xffff;
local_3b = 0;
local_37 = 0;
local_2e = (void *)0x0;
local_2a = 0;
local_26 = 0;
local_22 = (void *)0x0;
local_42 = 0;
local_48 = iVar18;
local_44 = uVar13;
local_3e = uVar12;
/* try { // try from 005bd7f7 to 005bd8e5 has its CatchHandler @ 005bda02 */
local_42 = ResponseCopyString(pcVar15);
local_3e = local_6a;
__size = local_2a & 0xfffffffe;
local_33 = local_33 & 0x80 | bVar3 & 1 | (bVar3 >> 1 & 1) * '\x02' |
(bVar3 >> 2 & 1) << 2 | (bVar3 >> 3 & 1) << 3 | (bVar3 >> 4 & 1) << 4 |
(bVar3 >> 5 & 1) << 5 | (bVar3 >> 6 & 1) << 6;
local_3c = uVar4;
local_3b = uVar1;
local_37 = uVar2;
local_32 = uVar6;
local_30 = uVar7;
local_2e = realloc(local_2e,__size);
local_2a = __size;
local_22 = local_2e;
uVar13 = CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert((CUtlRBTree<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Criteria,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Criteria,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)this_00,(Node_t *)&local_48);
local_26 = 0;
free(local_2e);
local_48 = CONCAT22(local_48._2_2_,uVar13);
/* try { // try from 005bd912 to 005bd9a8 has its CatchHandler @ 005bd9e6 */
CUtlVector<unsigned_short,CUtlMemoryConservative<unsigned_short>>::InsertBefore
((CUtlVector<unsigned_short,CUtlMemoryConservative<unsigned_short>> *)
&local_80,local_78,(ushort *)&local_48);
iVar17 = iVar17 + 2;
if (iVar17 == iVar9) goto LAB_005bd930;
}
iVar17 = iVar17 + 2;
} while (iVar17 != iVar9);
}
LAB_005bd930:
local_70 = *(undefined4 *)(*(int *)(this + 0x48) + 8 + iVar14);
uVar10 = CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x60),(Node_t *)&local_70);
if (uVar10 == 0xffff) {
pcVar15 = "";
}
else {
pcVar15 = *(char **)((uint)uVar10 * 0x10 + *(int *)(this + 100) + 0xc);
}
uVar12 = CResponseDict<Criteria,unsigned_short>::Insert
(this_00,pcVar15,(Criteria *)&local_96);
local_48 = CONCAT22(local_48._2_2_,uVar12);
CUtlVector<unsigned_short,CUtlMemoryConservative<unsigned_short>>::InsertBefore
((CUtlVector<unsigned_short,CUtlMemoryConservative<unsigned_short>> *)param_2,
*(int *)(param_2 + 8),(ushort *)&local_48);
local_78 = 0;
free(local_80);
}
else {
local_48 = CONCAT22(local_48._2_2_,sVar11);
CUtlVector<unsigned_short,CUtlMemoryConservative<unsigned_short>>::InsertBefore
((CUtlVector<unsigned_short,CUtlMemoryConservative<unsigned_short>> *)param_2,
*(int *)(param_2 + 8),(ushort *)&local_48);
}
}
local_b8 = local_b8 + 2;
} while (local_b8 != iVar8 * 2);
}
return;
}
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.