CVProfExport::CalculateBudgetGroupTimes_Recursive
0x002310d0 · 2226 bytes · __thiscall
_ZN12CVProfExport35CalculateBudgetGroupTimes_RecursiveEP10CVProfNode
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CVProfExport::CalculateBudgetGroupTimes_Recursive(CVProfNode*) */
void __thiscall
CVProfExport::CalculateBudgetGroupTimes_Recursive(CVProfExport *this,CVProfNode *param_1)
{
float *pfVar1;
uint uVar2;
undefined *puVar3;
float fVar4;
char cVar5;
int iVar6;
CVProfNode *pCVar7;
undefined *puVar8;
undefined *puVar9;
int iVar10;
double dVar11;
pCVar7 = param_1;
if (param_1 != (CVProfNode *)(g_pVProfileForDisplay + 0x1018)) {
do {
iVar10 = *(int *)(pCVar7 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_0023111b;
pCVar7 = *(CVProfNode **)(pCVar7 + 100);
} while (pCVar7 != (CVProfNode *)(g_pVProfileForDisplay + 0x1018));
}
iVar10 = *(int *)(pCVar7 + 0x70);
LAB_0023111b:
dVar11 = (double)*(longlong *)(param_1 + 0x48);
if (*(int *)(param_1 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(param_1 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
puVar3 = *(undefined **)(param_1 + 0x6c);
if (puVar3 != (undefined *)0x0) {
if (puVar3 == g_pVProfileForDisplay + 0x1018) {
iVar10 = *(int *)(puVar3 + 0x70);
}
else {
puVar9 = puVar3;
do {
iVar10 = *(int *)(puVar9 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_002311fb;
puVar9 = *(undefined **)(puVar9 + 100);
} while (puVar9 != g_pVProfileForDisplay + 0x1018);
iVar10 = *(int *)(puVar9 + 0x70);
}
LAB_002311fb:
dVar11 = (double)*(longlong *)(puVar3 + 0x48);
if (*(int *)(puVar3 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(puVar3 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
puVar9 = *(undefined **)(puVar3 + 0x6c);
if (puVar9 != (undefined *)0x0) {
if (puVar9 == g_pVProfileForDisplay + 0x1018) {
iVar10 = *(int *)(puVar9 + 0x70);
}
else {
puVar8 = puVar9;
do {
iVar10 = *(int *)(puVar8 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_0023177e;
puVar8 = *(undefined **)(puVar8 + 100);
} while (puVar8 != g_pVProfileForDisplay + 0x1018);
iVar10 = *(int *)(puVar8 + 0x70);
}
LAB_0023177e:
dVar11 = (double)*(longlong *)(puVar9 + 0x48);
if (*(int *)(puVar9 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(puVar9 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
if (*(CVProfNode **)(puVar9 + 0x6c) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x6c));
}
if (*(CVProfNode **)(puVar9 + 0x68) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x68));
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(puVar9 + 0x48) = 0;
*(undefined4 *)(puVar9 + 0x4c) = 0;
}
}
puVar9 = *(undefined **)(puVar3 + 0x68);
if (puVar9 != (undefined *)0x0) {
if (puVar9 == g_pVProfileForDisplay + 0x1018) {
iVar10 = *(int *)(puVar9 + 0x70);
}
else {
puVar8 = puVar9;
do {
iVar10 = *(int *)(puVar8 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_002318b6;
puVar8 = *(undefined **)(puVar8 + 100);
} while (puVar8 != g_pVProfileForDisplay + 0x1018);
iVar10 = *(int *)(puVar8 + 0x70);
}
LAB_002318b6:
dVar11 = (double)*(longlong *)(puVar9 + 0x48);
if (*(int *)(puVar9 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(puVar9 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
if (*(CVProfNode **)(puVar9 + 0x6c) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x6c));
}
if (*(CVProfNode **)(puVar9 + 0x68) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x68));
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(puVar9 + 0x48) = 0;
*(undefined4 *)(puVar9 + 0x4c) = 0;
}
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(puVar3 + 0x48) = 0;
*(undefined4 *)(puVar3 + 0x4c) = 0;
}
}
puVar3 = *(undefined **)(param_1 + 0x68);
if (puVar3 != (undefined *)0x0) {
puVar9 = puVar3;
if (puVar3 != g_pVProfileForDisplay + 0x1018) {
do {
iVar10 = *(int *)(puVar9 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_00231363;
puVar9 = *(undefined **)(puVar9 + 100);
} while (puVar9 != g_pVProfileForDisplay + 0x1018);
}
iVar10 = *(int *)(puVar9 + 0x70);
LAB_00231363:
dVar11 = (double)*(longlong *)(puVar3 + 0x48);
if (*(int *)(puVar3 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(puVar3 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
puVar9 = *(undefined **)(puVar3 + 0x6c);
if (puVar9 != (undefined *)0x0) {
if (puVar9 == g_pVProfileForDisplay + 0x1018) {
iVar10 = *(int *)(puVar9 + 0x70);
}
else {
puVar8 = puVar9;
do {
iVar10 = *(int *)(puVar8 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_0023153e;
puVar8 = *(undefined **)(puVar8 + 100);
} while (puVar8 != g_pVProfileForDisplay + 0x1018);
iVar10 = *(int *)(puVar8 + 0x70);
}
LAB_0023153e:
dVar11 = (double)*(longlong *)(puVar9 + 0x48);
if (*(int *)(puVar9 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(puVar9 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
if (*(CVProfNode **)(puVar9 + 0x6c) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x6c));
}
if (*(CVProfNode **)(puVar9 + 0x68) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x68));
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(puVar9 + 0x48) = 0;
*(undefined4 *)(puVar9 + 0x4c) = 0;
}
}
puVar9 = *(undefined **)(puVar3 + 0x68);
if (puVar9 != (undefined *)0x0) {
if (puVar9 == g_pVProfileForDisplay + 0x1018) {
iVar10 = *(int *)(puVar9 + 0x70);
}
else {
puVar8 = puVar9;
do {
iVar10 = *(int *)(puVar8 + 0x70);
uVar2 = *(uint *)(*(int *)(g_pVProfileForDisplay + 0x10a0) + 4 + iVar10 * 8);
if (((*(uint *)(this + 0x1c) & uVar2) != 0) && ((uVar2 & 0x8000) == 0)) goto LAB_00231676;
puVar8 = *(undefined **)(puVar8 + 100);
} while (puVar8 != g_pVProfileForDisplay + 0x1018);
iVar10 = *(int *)(puVar8 + 0x70);
}
LAB_00231676:
dVar11 = (double)*(longlong *)(puVar9 + 0x48);
if (*(int *)(puVar9 + 0x4c) < 0) {
dVar11 = dVar11 + 1.8446744073709552e+19;
}
dVar11 = dVar11 * _g_ClockSpeedMillisecondsMultiplier;
for (iVar6 = *(int *)(puVar9 + 0x68); iVar6 != 0; iVar6 = *(int *)(iVar6 + 0x6c)) {
fVar4 = (float)*(longlong *)(iVar6 + 0x48);
if (*(int *)(iVar6 + 0x4c) < 0) {
fVar4 = fVar4 + 1.8446744e+19;
}
dVar11 = dVar11 - (double)fVar4 * _g_ClockSpeedMillisecondsMultiplier;
}
if (-1 < iVar10) {
iVar6 = 0x200;
if (*(int *)(this + 0x10) < 0x200) {
iVar6 = *(int *)(this + 0x10);
}
if (iVar10 < iVar6) {
pfVar1 = (float *)(*(int *)(this + 4) + iVar10 * 4);
*pfVar1 = (float)((double)*pfVar1 + dVar11);
}
}
if (*(CVProfNode **)(puVar9 + 0x6c) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x6c));
}
if (*(CVProfNode **)(puVar9 + 0x68) != (CVProfNode *)0x0) {
CalculateBudgetGroupTimes_Recursive(this,*(CVProfNode **)(puVar9 + 0x68));
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(puVar9 + 0x48) = 0;
*(undefined4 *)(puVar9 + 0x4c) = 0;
}
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(puVar3 + 0x48) = 0;
*(undefined4 *)(puVar3 + 0x4c) = 0;
}
}
cVar5 = VProfRecord_IsPlayingBack();
if (cVar5 == '\0') {
*(undefined4 *)(param_1 + 0x48) = 0;
*(undefined4 *)(param_1 + 0x4c) = 0;
}
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.