rr2::CResponseQuery::Sort
0x00bd9300 · 270 bytes · __thiscall
_ZN3rr214CResponseQuery4SortEv
Decompiled
undefined (1 param)
/* rr2::CResponseQuery::Sort() */
void __thiscall rr2::CResponseQuery::Sort(CResponseQuery *this)
{
undefined4 uVar1;
ushort uVar2;
size_t __nmemb;
undefined4 uVar3;
undefined4 uVar4;
ushort *puVar5;
int iVar6;
ushort *puVar7;
int iVar8;
int local_28;
__nmemb = *(size_t *)(this + 0xc);
if (1 < (int)__nmemb) {
if (*(void **)this == (void *)0x0) {
local_28 = __nmemb - 1;
do {
if (0 < local_28) {
iVar8 = 1;
iVar6 = 0;
do {
while( true ) {
puVar5 = (ushort *)(iVar8 * 0x10 + *(int *)this);
puVar7 = (ushort *)(*(int *)this + iVar6);
uVar2 = *puVar7;
if (-1 < (int)((uint)uVar2 - (uint)*puVar5)) break;
uVar3 = *(undefined4 *)(puVar7 + 4);
iVar8 = iVar8 + 1;
iVar6 = iVar6 + 0x10;
uVar1 = *(undefined4 *)(puVar7 + 2);
uVar4 = *(undefined4 *)(puVar7 + 6);
*puVar7 = *puVar5;
*(undefined4 *)(puVar7 + 2) = *(undefined4 *)(puVar5 + 2);
*(undefined4 *)(puVar7 + 4) = *(undefined4 *)(puVar5 + 4);
*(undefined4 *)(puVar7 + 6) = *(undefined4 *)(puVar5 + 6);
*(undefined4 *)(puVar5 + 2) = uVar1;
*(undefined4 *)(puVar5 + 4) = uVar3;
*puVar5 = uVar2;
*(undefined4 *)(puVar5 + 6) = uVar4;
if (local_28 + 1 == iVar8) goto LAB_00bd93f3;
}
iVar8 = iVar8 + 1;
iVar6 = iVar6 + 0x10;
} while (local_28 + 1 != iVar8);
}
LAB_00bd93f3:
local_28 = local_28 + -1;
if (local_28 == -1) {
this[0x18] = (CResponseQuery)0x1;
return;
}
} while( true );
}
qsort(*(void **)this,__nmemb,0x10,
ComparatorBySymbol<rr2::CResponseQuery::CFact,&rr2::CResponseQuery::CFact::key>::
qsortcompare);
}
this[0x18] = (CResponseQuery)0x1;
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.