CStudioHdr::CActivityToSequenceMapping::ReleaseMapping
0x0059f350 · 633 bytes · __cdecl
_ZN10CStudioHdr26CActivityToSequenceMapping14ReleaseMappingEPS0_
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CStudioHdr::CActivityToSequenceMapping::ReleaseMapping(CStudioHdr::CActivityToSequenceMapping*)
*/
void CStudioHdr::CActivityToSequenceMapping::ReleaseMapping(CActivityToSequenceMapping *param_1)
{
int *piVar1;
int iVar2;
uint uVar3;
char cVar4;
ushort uVar5;
int iVar6;
uint uVar7;
int in_GS_OFFSET;
bool bVar8;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
int local_64;
undefined4 local_60 [20];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if ((param_1 == (CActivityToSequenceMapping *)0x0) ||
(param_1 == (CActivityToSequenceMapping *)emptyMapping)) goto LAB_0059f510;
local_74 = 0;
local_70 = 0;
if (___atan2f_finite == 0) {
local_64 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_74,0,0,0,0,"/data/src/game/server/../../public/studio.cpp",
0x895,&ReleaseMapping(CStudioHdr::CActivityToSequenceMapping*)::tm_fmt,"(%s)%s",
"Unaccounted","CStudioHdr::CActivityToSequenceMapping::ReleaseMapping");
local_64 = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_6c = local_74;
local_68 = local_70;
/* try { // try from 0059f423 to 0059f427 has its CatchHandler @ 0059f5e3 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
if ((char *)*_DAT_0105d15c != "CStudioHdr::CActivityToSequenceMapping::ReleaseMapping") {
/* try { // try from 0059f5c0 to 0059f5d1 has its CatchHandler @ 0059f5e3 */
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc56820,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0059f430 to 0059f465 has its CatchHandler @ 0059f5f8 */
uVar7 = ThreadGetCurrentId();
if (uVar7 == g_StudioHdrToActivityMapsLock) {
LAB_0059f470:
DAT_00fb7524 = DAT_00fb7524 + 1;
}
else {
LOCK();
bVar8 = g_StudioHdrToActivityMapsLock == 0;
uVar3 = uVar7;
if (!bVar8) {
uVar3 = g_StudioHdrToActivityMapsLock;
}
g_StudioHdrToActivityMapsLock = uVar3;
UNLOCK();
if (bVar8) goto LAB_0059f470;
CThreadFastMutex::Lock(0xfb7520,uVar7);
}
local_60[0] = *(undefined4 *)(param_1 + 0x24);
/* try { // try from 0059f491 to 0059f495 has its CatchHandler @ 0059f608 */
uVar5 = CUtlRBTree<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)g_StudioHdrToActivityMaps,(Node_t *)local_60);
if (uVar5 != 0xffff) {
piVar1 = (int *)((uint)uVar5 * 0x58 + g_StudioHdrToActivityMaps._4_4_ + 0x50);
*piVar1 = *piVar1 + -1;
}
iVar2 = _DAT_0105db00;
DAT_00fb7524 = DAT_00fb7524 + -1;
if (DAT_00fb7524 == 0) {
LOCK();
UNLOCK();
g_StudioHdrToActivityMapsLock = 0;
}
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_64 != 0) {
(**(code **)(local_64 + 0x54))(local_64,local_6c,local_68,0,0,0);
}
LAB_0059f510:
if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.