CServerRemoteAccess::SendResponseToClient
0x0020e6f0 · 591 bytes · __thiscall
_ZN19CServerRemoteAccess20SendResponseToClientEj24ServerDataResponseType_tPvi
Decompiled
undefined (5 params)
/* CServerRemoteAccess::SendResponseToClient(unsigned int, ServerDataResponseType_t, void*, int) */
void __thiscall
CServerRemoteAccess::SendResponseToClient
(CServerRemoteAccess *this,undefined4 param_1,undefined4 param_3,void *param_4,int param_5
)
{
CUtlBuffer CVar1;
char cVar2;
int iVar3;
CUtlBuffer *this_00;
void *pvVar4;
undefined1 local_28;
undefined1 uStack_27;
undefined1 uStack_26;
undefined1 uStack_25;
undefined1 local_24;
undefined1 uStack_23;
undefined1 uStack_22;
undefined1 uStack_21;
undefined1 local_20;
undefined1 local_1f;
undefined1 local_1e;
undefined1 local_1d;
iVar3 = CUtlLinkedList<CServerRemoteAccess::DataResponse_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<CServerRemoteAccess::DataResponse_t,int>,int>>
::InsertBefore((CUtlLinkedList<CServerRemoteAccess::DataResponse_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<CServerRemoteAccess::DataResponse_t,int>,int>>
*)(this + 4),-1);
*(undefined4 *)(*(int *)(this + 4) + 0x38 + iVar3 * 0x44) = param_1;
this_00 = (CUtlBuffer *)(iVar3 * 0x44 + *(int *)(this + 4));
if (((byte)this_00[0x15] & 1) == 0) {
cVar2 = CUtlBuffer::CheckPut(this_00,4);
if (cVar2 == '\0') goto LAB_0020e74a;
if (((byte)this_00[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)this_00 + (*(int *)(this_00 + 0x10) - *(int *)(this_00 + 0x20))) = 0;
iVar3 = *(int *)(this_00 + 0x10);
}
else {
iVar3 = *(int *)(this_00 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(this_00 + 0x20)) + *(int *)this_00);
if (pvVar4 != (void *)0x0) {
local_20 = 0;
local_1f = 0;
local_1e = 0;
local_1d = 0;
_V_memcpy(pvVar4,&local_20,4);
iVar3 = *(int *)(this_00 + 0x10);
}
}
*(int *)(this_00 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(this_00);
if (((byte)this_00[0x15] & 1) != 0) goto LAB_0020e754;
LAB_0020e7f0:
cVar2 = CUtlBuffer::CheckPut(this_00,4);
if (cVar2 != '\0') {
if (((byte)this_00[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)this_00 + (*(int *)(this_00 + 0x10) - *(int *)(this_00 + 0x20))) =
param_3;
iVar3 = *(int *)(this_00 + 0x10);
}
else {
iVar3 = *(int *)(this_00 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(this_00 + 0x20)) + *(int *)this_00);
if (pvVar4 != (void *)0x0) {
uStack_25 = (undefined1)((uint)param_3 >> 0x18);
local_20 = uStack_25;
uStack_26 = (undefined1)((uint)param_3 >> 0x10);
local_1f = uStack_26;
uStack_27 = (undefined1)((uint)param_3 >> 8);
local_1e = uStack_27;
local_28 = (undefined1)param_3;
local_1d = local_28;
_V_memcpy(pvVar4,&local_20,4);
iVar3 = *(int *)(this_00 + 0x10);
}
}
*(int *)(this_00 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(this_00);
CVar1 = this_00[0x15];
goto joined_r0x0020e831;
}
}
else {
CUtlBuffer::Printf(this_00,"%d",0);
LAB_0020e74a:
if (((byte)this_00[0x15] & 1) == 0) goto LAB_0020e7f0;
LAB_0020e754:
CUtlBuffer::Printf(this_00,"%d",param_3);
}
CVar1 = this_00[0x15];
joined_r0x0020e831:
if (((byte)CVar1 & 1) == 0) {
cVar2 = CUtlBuffer::CheckPut(this_00,4);
if (cVar2 != '\0') {
if (((byte)this_00[0x34] & 1) == 0) {
*(int *)(*(int *)this_00 + (*(int *)(this_00 + 0x10) - *(int *)(this_00 + 0x20))) = param_5;
iVar3 = *(int *)(this_00 + 0x10);
}
else {
iVar3 = *(int *)(this_00 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(this_00 + 0x20)) + *(int *)this_00);
if (pvVar4 != (void *)0x0) {
uStack_21 = (undefined1)((uint)param_5 >> 0x18);
local_20 = uStack_21;
uStack_22 = (undefined1)((uint)param_5 >> 0x10);
local_1f = uStack_22;
uStack_23 = (undefined1)((uint)param_5 >> 8);
local_1e = uStack_23;
local_24 = (undefined1)param_5;
local_1d = local_24;
_V_memcpy(pvVar4,&local_20,4);
iVar3 = *(int *)(this_00 + 0x10);
}
}
*(int *)(this_00 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(this_00);
}
}
else {
CUtlBuffer::Printf(this_00,"%d",param_5);
}
CUtlBuffer::Put(this_00,param_4,param_5);
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.