CServerRemoteAccess::RequestValue
0x0020f660 · 678 bytes · __thiscall
_ZN19CServerRemoteAccess12RequestValueEjiPKc
Decompiled
undefined (4 params)
/* CServerRemoteAccess::RequestValue(unsigned int, int, char const*) */
void __thiscall
CServerRemoteAccess::RequestValue(CServerRemoteAccess *this,uint param_1,int param_2,char *param_3)
{
char cVar1;
int iVar2;
CUtlBuffer *this_00;
void *pvVar3;
undefined1 local_68;
undefined1 uStack_67;
undefined1 uStack_66;
undefined1 uStack_65;
undefined1 local_64;
undefined1 local_63;
undefined1 local_62;
undefined1 local_61;
undefined1 local_60;
undefined1 local_5f;
undefined1 local_5e;
undefined1 local_5d;
undefined4 local_5c;
undefined1 local_58;
undefined1 local_57;
undefined1 local_56;
undefined1 local_55;
void *local_54 [4];
int local_44;
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_54,0,0x100,1);
/* try { // try from 0020f69d to 0020f91e has its CatchHandler @ 0020f924 */
LookupValue(this,param_3,(CUtlBuffer *)local_54);
iVar2 = 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);
*(uint *)(*(int *)(this + 4) + 0x38 + iVar2 * 0x44) = param_1;
this_00 = (CUtlBuffer *)(iVar2 * 0x44 + *(int *)(this + 4));
if (((byte)this_00[0x15] & 1) == 0) {
cVar1 = CUtlBuffer::CheckPut(this_00,4);
if (cVar1 != '\0') {
if (((byte)this_00[0x34] & 1) == 0) {
*(int *)(*(int *)this_00 + (*(int *)(this_00 + 0x10) - *(int *)(this_00 + 0x20))) = param_2;
iVar2 = *(int *)(this_00 + 0x10);
}
else {
iVar2 = *(int *)(this_00 + 0x10);
pvVar3 = (void *)((iVar2 - *(int *)(this_00 + 0x20)) + *(int *)this_00);
if (pvVar3 != (void *)0x0) {
uStack_65 = (undefined1)((uint)param_2 >> 0x18);
local_64 = uStack_65;
uStack_66 = (undefined1)((uint)param_2 >> 0x10);
local_63 = uStack_66;
uStack_67 = (undefined1)((uint)param_2 >> 8);
local_62 = uStack_67;
local_68 = (undefined1)param_2;
local_61 = local_68;
_V_memcpy(pvVar3,&local_64,4);
iVar2 = *(int *)(this_00 + 0x10);
}
}
*(int *)(this_00 + 0x10) = iVar2 + 4;
CUtlBuffer::AddNullTermination(this_00);
}
}
else {
CUtlBuffer::Printf(this_00,"%d",param_2);
}
if (((byte)this_00[0x15] & 1) == 0) {
cVar1 = CUtlBuffer::CheckPut(this_00,4);
if (cVar1 != '\0') {
if (((byte)this_00[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)this_00 + (*(int *)(this_00 + 0x10) - *(int *)(this_00 + 0x20))) = 0
;
iVar2 = *(int *)(this_00 + 0x10);
}
else {
iVar2 = *(int *)(this_00 + 0x10);
pvVar3 = (void *)((iVar2 - *(int *)(this_00 + 0x20)) + *(int *)this_00);
if (pvVar3 != (void *)0x0) {
local_60 = 0;
local_5f = 0;
local_5e = 0;
local_5d = 0;
_V_memcpy(pvVar3,&local_60,4);
iVar2 = *(int *)(this_00 + 0x10);
}
}
*(int *)(this_00 + 0x10) = iVar2 + 4;
CUtlBuffer::AddNullTermination(this_00);
}
}
else {
CUtlBuffer::Printf(this_00,"%d",0);
}
CUtlBuffer::PutString(this_00,param_3);
iVar2 = local_44;
if (((byte)this_00[0x15] & 1) == 0) {
local_5c = local_44;
cVar1 = CUtlBuffer::CheckPut(this_00,4);
if (cVar1 != '\0') {
if (((byte)this_00[0x34] & 1) == 0) {
*(int *)(*(int *)this_00 + (*(int *)(this_00 + 0x10) - *(int *)(this_00 + 0x20))) = iVar2;
iVar2 = *(int *)(this_00 + 0x10);
}
else {
iVar2 = *(int *)(this_00 + 0x10);
pvVar3 = (void *)((iVar2 - *(int *)(this_00 + 0x20)) + *(int *)this_00);
if (pvVar3 != (void *)0x0) {
local_58 = local_5c._3_1_;
local_57 = local_5c._2_1_;
local_56 = local_5c._1_1_;
local_55 = (undefined1)local_5c;
_V_memcpy(pvVar3,&local_58,4);
iVar2 = *(int *)(this_00 + 0x10);
}
}
*(int *)(this_00 + 0x10) = iVar2 + 4;
CUtlBuffer::AddNullTermination(this_00);
}
}
else {
CUtlBuffer::Printf(this_00,"%d",local_44);
}
if (local_44 != 0) {
CUtlBuffer::Put(this_00,local_54[0],local_44);
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_54);
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.