//
// cocos2d::CCScheduler::unscheduleAllForTarget from 0xab2b08 to 0xab2cd8 (464 bytes)
//
// 6 xrefs:
// > cocos2d::extension::AssetsManager::Helper::~Helper @ 0xa97380
// > cocos2d::extension::WsThreadHelper::~WsThreadHelper @ 0xaad5e8
// > cocos2d::extension::WebSocket::close @ 0xaae4d0
// > cocos2d::CCScheduler::unscheduleAllWithMinPriority @ 0xab2d04
// > cocos2d::CCNode::unscheduleAllSelectors @ 0xacd1a4
// > ??> @ 0xb0bb0
//
// 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; // x4
int v5; // w19
unsigned int v6; // w1
unsigned int v7; // w0
__int64 v8; // x22
int v9; // w19
unsigned int v10; // w1
unsigned int v11; // w0
int v12; // w19
__int64 v13; // x19
__int64 v14; // x19
__int64 v15; // x19
cocos2d::CCObject *v16; // x2
cocos2d::_ccArray *v17; // x1
cocos2d::CCObject *v18; // [xsp+48h] [xbp+48h] BYREF
v18 = a2;
if ( a2 )
{
m_pHashForTimers = a1->m_pHashForTimers;
if ( !m_pHashForTimers )
goto LABEL_9;
v5 = ((unsigned __int8)v18 + 17973517 + (BYTE3(v18) << 24) + (BYTE2(v18) << 16) + (BYTE1(v18) << 8)) ^ 0x7F76D;
v6 = (-1622558010 - v5) ^ (v5 << 8);
v7 = (-17973517 - v5 - v6) ^ (v6 >> 13);
v8 = *((_QWORD *)m_pHashForTimers + 5);
v9 = (v5 - v6 - v7) ^ (v7 >> 12);
v10 = (v6 - v7 - v9) ^ (v9 << 16);
v11 = (v7 - v9 - v10) ^ (v10 >> 5);
v12 = (v9 - v10 - v11) ^ (v11 >> 3);
v13 = *(_QWORD *)(*(_QWORD *)v8
+ 16LL
* (((v11 - v12 - ((v10 - v11 - v12) ^ (v12 << 10)))
^ (((v10 - v11 - v12) ^ (v12 << 10)) >> 15))
& (*(_DWORD *)(v8 + 8) - 1)));
v14 = v13 ? v13 - *(_QWORD *)(v8 + 32) : 0LL;
if ( v14 )
{
while ( *(_DWORD *)(v14 + 88) != 4 || memcmp(*(const void **)(v14 + 80), &v18, 4u) )
{
v15 = *(_QWORD *)(v14 + 72);
if ( v15 )
{
v14 = v15 - *(_QWORD *)(v8 + 32);
if ( v14 )
continue;
}
goto LABEL_9;
}
if ( (unsigned __int8)cocos2d::ccArrayContainsObject(*(cocos2d **)v14, *(cocos2d::_ccArray **)(v14 + 24), v16)
&& !*(_BYTE *)(v14 + 32) )
{
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(v14 + 24));
*(_BYTE *)(v14 + 32) = 1;
}
cocos2d::ccArrayRemoveAllObjects(*(cocos2d **)v14, v17);
if ( (cocos2d::_hashSelectorEntry *)v14 == a1->m_pCurrentTarget )
a1->m_bCurrentTargetSalvaged = 1;
else
cocos2d::CCScheduler::removeHashElement(a1, (cocos2d::_hashSelectorEntry *)v14);
cocos2d::CCScheduler::unscheduleUpdateForTarget(a1, a2);
}
else
{
LABEL_9:
cocos2d::CCScheduler::unscheduleUpdateForTarget(a1, a2);
}
}
}