CMatchNetworkMsgControllerBase::PackageGameDetailsForQOS
0x00059900 · 595 bytes · __thiscall
_ZN30CMatchNetworkMsgControllerBase24PackageGameDetailsForQOSEP9KeyValuesR10CUtlBuffer
Decompiled
undefined (3 params)
/* CMatchNetworkMsgControllerBase::PackageGameDetailsForQOS(KeyValues*, CUtlBuffer&) */
void __thiscall
CMatchNetworkMsgControllerBase::PackageGameDetailsForQOS
(CMatchNetworkMsgControllerBase *this,KeyValues *param_1,CUtlBuffer *param_2)
{
char cVar1;
KeyValues *this_00;
undefined4 uVar2;
int iVar3;
void *pvVar4;
undefined1 local_2c;
undefined1 uStack_2b;
undefined1 uStack_2a;
undefined1 uStack_29;
undefined1 local_28;
undefined1 local_27;
undefined1 local_26;
undefined1 local_25;
undefined1 local_24;
undefined1 local_23;
undefined1 local_22;
undefined1 local_21;
undefined1 local_20;
undefined1 local_1f;
undefined1 local_1e;
undefined1 local_1d;
this_00 = (KeyValues *)GetLobbyDetailsTemplate("qos",param_1);
/* try { // try from 0005992c to 000599ac has its CatchHandler @ 00059b71 */
KeyValues::MergeFrom(this_00,param_1,3);
uVar2 = (**(code **)(**(int **)(g_pMatchExtensions + 0x54) + 0x14))
(*(int **)(g_pMatchExtensions + 0x54));
if (((byte)param_2[0x15] & 1) == 0) {
/* try { // try from 000599d6 to 00059b6b has its CatchHandler @ 00059b71 */
cVar1 = CUtlBuffer::CheckPut(param_2,4);
if (cVar1 != '\0') {
if (((byte)param_2[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) =
uVar2;
iVar3 = *(int *)(param_2 + 0x10);
}
else {
iVar3 = *(int *)(param_2 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar4 != (void *)0x0) {
uStack_29 = (undefined1)((uint)uVar2 >> 0x18);
local_28 = uStack_29;
uStack_2a = (undefined1)((uint)uVar2 >> 0x10);
local_27 = uStack_2a;
uStack_2b = (undefined1)((uint)uVar2 >> 8);
local_26 = uStack_2b;
local_2c = (undefined1)uVar2;
local_25 = local_2c;
_V_memcpy(pvVar4,&local_28,4);
iVar3 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(param_2);
}
}
else {
CUtlBuffer::Printf(param_2,"%d",uVar2);
}
if (((byte)param_2[0x15] & 1) == 0) {
cVar1 = CUtlBuffer::CheckPut(param_2,4);
if (cVar1 != '\0') {
if (((byte)param_2[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) = 0
;
iVar3 = *(int *)(param_2 + 0x10);
}
else {
iVar3 = *(int *)(param_2 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar4 != (void *)0x0) {
local_24 = 0;
local_23 = 0;
local_22 = 0;
local_21 = 0;
_V_memcpy(pvVar4,&local_24,4);
iVar3 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(param_2);
}
}
else {
CUtlBuffer::Printf(param_2,"%d",0);
}
KeyValues::WriteAsBinary(this_00,param_2);
if (((byte)param_2[0x15] & 1) == 0) {
cVar1 = CUtlBuffer::CheckPut(param_2,4);
if (cVar1 != '\0') {
if (((byte)param_2[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) = 0
;
iVar3 = *(int *)(param_2 + 0x10);
}
else {
iVar3 = *(int *)(param_2 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar4 != (void *)0x0) {
local_20 = 0;
local_1f = 0;
local_1e = 0;
local_1d = 0;
_V_memcpy(pvVar4,&local_20,4);
iVar3 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(param_2);
}
}
else {
CUtlBuffer::Printf(param_2,"%d",0);
}
if (this_00 != (KeyValues *)0x0) {
KeyValues::deleteThis();
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.