GCSDK::CJobMgr::ProfileJobs
0x000608a0 · 940 bytes · __thiscall
_ZN5GCSDK7CJobMgr11ProfileJobsENS_17EJobProfileActionENS_20EJobProfileSortOrderE
Decompiled
undefined (3 params)
/* GCSDK::CJobMgr::ProfileJobs(GCSDK::EJobProfileAction, GCSDK::EJobProfileSortOrder) */
void __thiscall GCSDK::CJobMgr::ProfileJobs(CJobMgr *this,int param_2,undefined4 param_3)
{
uint uVar1;
int iVar2;
int iVar3;
int *piVar4;
int iVar5;
int iVar6;
byte bVar7;
int *local_30;
undefined4 local_2c;
undefined4 local_28;
int local_24;
int *local_20;
*(undefined4 *)(this + 0xf4) = param_3;
if (param_2 == 0) {
if (*(int *)(this + 0xf0) == 0) {
return;
}
*(undefined4 *)(this + 0xf0) = 0;
bVar7 = (byte)this[0xec] ^ 1;
}
else {
if (param_2 == 1) {
this[0xec] = (CJobMgr)0x1;
return;
}
bVar7 = param_2 == 4;
if (param_2 == 2) {
this[0xec] = (CJobMgr)0x0;
return;
}
}
local_30 = (int *)0x0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_20 = (int *)0x0;
/* try { // try from 00060925 to 00060929 has its CatchHandler @ 00060c77 */
CUtlVector<int,CUtlMemory<int,int>>::EnsureCount
((CUtlVector<int,CUtlMemory<int,int>> *)&local_30,*(int *)(this + 0x10c));
iVar6 = 0;
iVar3 = 0;
if (0 < *(int *)(this + 0x100)) {
iVar5 = 0;
do {
if (iVar6 <= *(int *)(this + 0x114)) {
if ((CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel), iVar2 != 0)) {
CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel = 0xffffffff;
DAT_000d2844 = 0xffffffff;
DAT_000d2848 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
}
if (*(int *)(*(int *)(this + 0xfc) + iVar5) != iVar6) {
local_30[iVar3] = iVar6;
iVar3 = iVar3 + 1;
}
}
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0xec;
} while (iVar6 < *(int *)(this + 0x100));
}
if (0 < local_24) {
piVar4 = local_30;
do {
iVar3 = *(int *)(this + 0xfc);
if (bVar7 != 0) {
iVar6 = *piVar4 * 0xec;
*(undefined4 *)(iVar3 + 0x54 + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x58 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x74 + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x78 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x7c + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x80 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0xbc + iVar6) = 0;
*(undefined4 *)(iVar3 + 0xc0 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x5c + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x60 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x84 + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x88 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0xa4 + iVar6) = 0;
*(undefined4 *)(iVar3 + 0xa8 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0xac + iVar6) = 0;
*(undefined4 *)(iVar3 + 0xb0 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0xb4 + iVar6) = 0;
*(undefined4 *)(iVar3 + 0xb8 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x8c + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x90 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x94 + iVar6) = 0;
*(undefined4 *)(iVar3 + 0x98 + iVar6) = 0;
iVar3 = *(int *)(this + 0xfc);
*(undefined4 *)(iVar3 + 0x9c + iVar6) = 0;
*(undefined4 *)(iVar3 + 0xa0 + iVar6) = 0;
}
piVar4 = piVar4 + 1;
} while (piVar4 != local_30 + local_24);
}
if (*(short *)(this + 0x12e) != 0) {
uVar1 = *(uint *)(this + 0x124);
iVar3 = 0;
if ((short)uVar1 != 0) {
do {
while ((((int)uVar1 <= iVar3 || (*(ushort *)(this + 0x132) < (ushort)iVar3)) ||
(CUtlRBTree<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel != '\0'))) {
iVar3 = iVar3 + 1;
if ((int)(uVar1 & 0xffff) <= iVar3) goto LAB_00060b88;
}
iVar6 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
CUtlRBTree<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2852 = 0xffff;
DAT_000d2854 = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
uVar1 = *(uint *)(this + 0x124);
iVar3 = iVar3 + 1;
} while (iVar3 < (int)(uVar1 & 0xffff));
}
LAB_00060b88:
CUtlRBTree<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x11c));
}
local_24 = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&local_30);
local_20 = local_30;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&local_30);
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.