CServerRemoteAccess::ReadDataResponse
0x0020e980 · 222 bytes · __thiscall
_ZN19CServerRemoteAccess16ReadDataResponseEjPvi
Decompiled
undefined (4 params)
/* CServerRemoteAccess::ReadDataResponse(unsigned int, void*, int) */
size_t __thiscall
CServerRemoteAccess::ReadDataResponse
(CServerRemoteAccess *this,uint param_1,void *param_2,int param_3)
{
undefined4 *puVar1;
uint uVar2;
size_t __n;
int iVar3;
CUtlMemory<unsigned_char,int> *this_00;
iVar3 = *(int *)(this + 0x10);
if (((iVar3 < 0) || (*(int *)(this + 8) <= iVar3)) || (*(int *)(this + 0x24) < iVar3)) {
return 0;
}
while( true ) {
puVar1 = (undefined4 *)(*(int *)(this + 4) + iVar3 * 0x44);
if (iVar3 == puVar1[0xf]) {
if (iVar3 != puVar1[0x10]) {
return 0;
}
uVar2 = puVar1[0xe];
}
else {
uVar2 = puVar1[0xe];
}
if (uVar2 == param_1) {
__n = puVar1[4];
if (param_3 < (int)__n) {
__n = 0;
}
else {
memcpy(param_2,(void *)*puVar1,__n);
}
*(size_t *)(this + 0x58) = *(int *)(this + 0x58) + __n;
CUtlLinkedList<CServerRemoteAccess::DataResponse_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<CServerRemoteAccess::DataResponse_t,int>,int>>
::Unlink((CUtlLinkedList<CServerRemoteAccess::DataResponse_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<CServerRemoteAccess::DataResponse_t,int>,int>>
*)(this + 4),iVar3);
this_00 = (CUtlMemory<unsigned_char,int> *)(iVar3 * 0x44 + *(int *)(this + 4));
CUtlMemory<unsigned_char,int>::Purge(this_00);
*(undefined4 *)(this_00 + 0x40) = *(undefined4 *)(this + 0x18);
*(int *)(this + 0x18) = iVar3;
return __n;
}
iVar3 = puVar1[0x10];
if (iVar3 < 0) {
return 0;
}
if (*(int *)(this + 8) <= iVar3) break;
if (*(int *)(this + 0x24) < iVar3) {
return 0;
}
}
return 0;
}
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.