CWorkshop::AddSubscribedFile
0x0023d310 · 317 bytes · __cdecl
_ZN9CWorkshop17AddSubscribedFileEyj
Decompiled
undefined (2 params)
/* CWorkshop::AddSubscribedFile(unsigned long long, unsigned int) */
void CWorkshop::AddSubscribedFile(ulonglong param_1,uint param_2)
{
undefined4 *puVar1;
int *piVar2;
undefined4 *puVar3;
KeyValues *this;
undefined4 in_stack_00000010;
undefined4 *puVar4;
char *pcVar5;
int iVar6;
uint uVar7;
int local_24;
uint local_20;
local_24 = param_1._4_4_;
local_20 = param_2;
puVar1 = operator_new(0x10);
*puVar1 = &PTR_OnError_002cac60;
puVar1[1] = local_24;
puVar1[2] = local_20;
puVar1[3] = in_stack_00000010;
piVar2 = (int *)(**(code **)(*(int *)param_1 + 0x14))((int *)param_1);
(**(code **)(*piVar2 + 8))(piVar2,puVar1,1);
puVar4 = (undefined4 *)((int *)param_1)[0x33];
if (0 < (int)puVar4) {
piVar2 = (int *)((int *)param_1)[0x30];
if (piVar2[1] == local_20 && *piVar2 == local_24) goto LAB_0023d3d9;
puVar3 = (undefined4 *)0x0;
do {
puVar3 = (undefined4 *)((int)puVar3 + 1);
if (puVar3 == puVar4) goto LAB_0023d3bb;
} while (piVar2[(int)puVar3 * 2 + 1] != local_20 || piVar2[(int)puVar3 * 2] != local_24);
if (puVar3 != (undefined4 *)&DAT_ffffffff) goto LAB_0023d3d9;
}
LAB_0023d3bb:
CUtlVector<unsigned_long_long,CUtlMemory<unsigned_long_long,int>>::InsertBefore
((CUtlVector<unsigned_long_long,CUtlMemory<unsigned_long_long,int>> *)
((int *)param_1 + 0x30),(int)puVar4,(ulonglong *)&local_24);
puVar1 = puVar4;
LAB_0023d3d9:
this = KeyValues::operator_new((KeyValues *)0x2c,(uint)puVar1);
/* try { // try from 0023d402 to 0023d406 has its CatchHandler @ 0023d45a */
KeyValues::KeyValues(this,"SubscribedFileListener_Added",(IKeyValuesSystem *)0x0,false);
pcVar5 = "publishedFileID";
iVar6 = local_24;
uVar7 = local_20;
KeyValues::SetUint64((char *)this,CONCAT44(local_24,"publishedFileID"));
piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x1c))(g_pMatchFramework,pcVar5,iVar6,uVar7);
(**(code **)(*piVar2 + 8))(piVar2,this);
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.