Host_EndThreadedSound
0x00177f40 · 546 bytes · unknown
_Z21Host_EndThreadedSoundv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Host_EndThreadedSound() */
void Host_EndThreadedSound(void)
{
uint *puVar1;
int *piVar2;
int iVar3;
char cVar4;
int iVar5;
int *local_28;
undefined4 local_24;
undefined4 local_20;
undefined4 local_18;
undefined4 local_14;
int local_10;
if (g_pSoundJob != (int *)0x0) {
local_24 = 0;
local_20 = 0;
if (_Plat_SetBenchmarkMode == 0) {
local_10 = 0;
}
else {
(**(code **)(_Plat_SetBenchmarkMode + 0x50))
(_Plat_SetBenchmarkMode,&local_24,0,0,0,0,"/data/src/engine/./host.cpp",0xc4e,
&Host_EndThreadedSound()::tm_fmt,"(%s)%s","Sound","_Host_RunFrame_Sound");
local_10 = _Plat_SetBenchmarkMode;
}
iVar3 = _DAT_0040b9d4;
local_18 = local_24;
local_14 = local_20;
/* try { // try from 00177ffb to 00177fff has its CatchHandler @ 00178199 */
if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
(iVar5 = ThreadGetCurrentId(), iVar3 == iVar5)) {
if ((char *)*_DAT_0040b030 != "_Host_RunFrame_Sound") {
/* try { // try from 00178148 to 0017816b has its CatchHandler @ 00178199 */
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2b27bb,(char *)0x0,0x2b27ca);
}
puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
piVar2 = g_pSoundJob;
if (g_pSoundJob != (int *)0x0) {
if ((g_pSoundJob[3] - 1U < 2) || (g_pSoundJob[3] == 4)) {
local_28 = g_pSoundJob;
/* try { // try from 0017810c to 0017810e has its CatchHandler @ 00178178 */
(**(code **)(*_g_pThreadPool + 0x30))(_g_pThreadPool,&local_28,1,1,0xffffffff);
}
/* try { // try from 0017802f to 00178031 has its CatchHandler @ 00178178 */
(**(code **)(*piVar2 + 4))(piVar2);
}
iVar3 = _DAT_0040b9d4;
g_pSoundJob = (int *)0x0;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar5 = ThreadGetCurrentId(), iVar3 == iVar5)) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_10 != 0) {
(**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,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.