//
// cocos2d::CCScheduler::unscheduleAllForTarget from 0xd24610 to 0xd247e0 (464 bytes)
//
// 6 xrefs:
// > cocos2d::extension::AssetsManager::Helper::~Helper @ 0xd09744
// > cocos2d::extension::WsThreadHelper::~WsThreadHelper @ 0xd1f610
// > cocos2d::extension::WebSocket::close @ 0xd1fb48
// > cocos2d::CCScheduler::unscheduleAllWithMinPriority @ 0xd2480c
// > cocos2d::CCNode::unscheduleAllSelectors @ 0xd3f114
// > ??> @ 0xe73e8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:13 +0000
//
__int64 __fastcall cocos2d::CCScheduler::unscheduleAllForTarget(__int64 this, cocos2d::CCObject *a2)
{
__int64 v2; // x4
__int64 v3; // x20
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
_QWORD *v14; // x19
__int64 v15; // x19
cocos2d::CCObject *v16; // [xsp+48h] [xbp+48h] BYREF
v16 = a2;
if ( a2 )
{
v2 = *(_QWORD *)(this + 96);
v3 = this;
if ( !v2 )
return cocos2d::CCScheduler::unscheduleUpdateForTarget(v3, a2);
v5 = ((unsigned __int8)v16 + 17973517 + (BYTE3(v16) << 24) + (BYTE2(v16) << 16) + (BYTE1(v16) << 8)) ^ 0x7F76D;
v6 = (-1622558010 - v5) ^ (v5 << 8);
v7 = (-17973517 - v5 - v6) ^ (v6 >> 13);
v8 = *(_QWORD *)(v2 + 40);
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 ? (_QWORD *)(v13 - *(_QWORD *)(v8 + 32)) : nullptr;
if ( v14 )
{
while ( *((_DWORD *)v14 + 22) != 4 || memcmp((const void *)v14[10], &v16, 4u) )
{
v15 = v14[9];
if ( v15 )
{
v14 = (_QWORD *)(v15 - *(_QWORD *)(v8 + 32));
if ( v14 )
continue;
}
return cocos2d::CCScheduler::unscheduleUpdateForTarget(v3, a2);
}
if ( (unsigned __int8)cocos2d::ccArrayContainsObject(*v14, v14[3]) && !*((_BYTE *)v14 + 32) )
{
cocos2d::CCObject::retain((cocos2d::CCObject *)v14[3]);
*((_BYTE *)v14 + 32) = 1;
}
cocos2d::ccArrayRemoveAllObjects(*v14);
if ( v14 == *(_QWORD **)(v3 + 104) )
*(_BYTE *)(v3 + 112) = 1;
else
cocos2d::CCScheduler::removeHashElement(v3, v14);
return cocos2d::CCScheduler::unscheduleUpdateForTarget(v3, a2);
}
else
{
return cocos2d::CCScheduler::unscheduleUpdateForTarget(v3, a2);
}
}
return this;
}