//
// cocos2d::CCScheduler::unscheduleAllForTarget from 0x5af450 to 0x5af546 (246 bytes)
//
// 5 xrefs:
// > cocos2d::extension::AssetsManager::Helper::~Helper @ 0x59fcc6
// > cocos2d::extension::WebSocket::close @ 0x5ad1e8
// > cocos2d::extension::WsThreadHelper::~WsThreadHelper @ 0x5ad2b2
// > cocos2d::CCScheduler::unscheduleAllWithMinPriority @ 0x5af568
// > cocos2d::CCNode::unscheduleAllSelectors @ 0x5be364
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void cocos2d::CCScheduler::unscheduleAllForTarget(cocos2d::CCScheduler *a1, cocos2d::CCObject *a2)
{
cocos2d::_hashSelectorEntry *m_pHashForTimers; // r1
_DWORD *v5; // r7
int v6; // r0
unsigned int v7; // r2
unsigned int v8; // r3
int v9; // r0
unsigned int v10; // r2
unsigned int v11; // r3
int v12; // r0
int v13; // r6
cocos2d::CCObject *v14; // r2
int v15; // r3
cocos2d::_ccArray *v16; // r1
cocos2d::CCObject *v17; // [sp+4h] [bp-4h] BYREF
v17 = a2;
if ( a2 )
{
m_pHashForTimers = a1->m_pHashForTimers;
if ( m_pHashForTimers )
{
v5 = *((_DWORD **)m_pHashForTimers + 5);
v6 = ((unsigned __int8)v17 + 17973517 + (HIBYTE(v17) << 24) + (BYTE2(v17) << 16) + (BYTE1(v17) << 8)) ^ 0x7F76D;
v7 = (-1622558010 - v6) ^ (v6 << 8);
v8 = (-17973517 - v6 - v7) ^ (v7 >> 13);
v9 = (v6 - v7 - v8) ^ (v8 >> 12);
v10 = (v7 - v8 - v9) ^ (v9 << 16);
v11 = (v8 - v9 - v10) ^ (v10 >> 5);
v12 = (v9 - v10 - v11) ^ (v11 >> 3);
v13 = *(_DWORD *)(*v5
+ 12
* (((v11 - v12 - ((v10 - v11 - v12) ^ (v12 << 10)))
^ (((v10 - v11 - v12) ^ (v12 << 10)) >> 15))
& (v5[1] - 1)));
if ( v13 )
v13 -= v5[5];
while ( v13 )
{
if ( *(_DWORD *)(v13 + 44) == 4 && !memcmp(*(const void **)(v13 + 40), &v17, 4u) )
{
if ( cocos2d::ccArrayContainsObject(*(cocos2d **)v13, *(cocos2d::_ccArray **)(v13 + 12), v14)
&& !*(_BYTE *)(v13 + 16) )
{
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(v13 + 12));
*(_BYTE *)(v13 + 16) = 1;
}
cocos2d::ccArrayRemoveAllObjects(*(cocos2d **)v13, v16);
if ( a1->m_pCurrentTarget == (cocos2d::_hashSelectorEntry *)v13 )
a1->m_bCurrentTargetSalvaged = 1;
else
cocos2d::CCScheduler::removeHashElement(a1, (cocos2d::_hashSelectorEntry *)v13);
break;
}
v15 = *(_DWORD *)(v13 + 36);
if ( !v15 )
break;
v13 = v15 - v5[5];
}
}
cocos2d::CCScheduler::unscheduleUpdateForTarget(a1, a2);
}
}