//
// cocos2d::CCScheduler::unscheduleSelector from 0x1001a9ffc to 0x1001aa21c (544 bytes)
//
// 4 xrefs:
// > cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x100113d84
// > cocos2d::CCTimer::update @ 0x1001a9ff8
// > cocos2d::CCNode::unschedule @ 0x10023c620
// > cocos2d::extension::CCHttpClient::dCCHttpClient @ 0x100240ee4
//
// 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 __fastcall cocos2d::CCScheduler::unscheduleSelector(
cocos2d::CCScheduler *a1,
cocos2d::SEL_SCHEDULE a2,
cocos2d::CCObject *a3)
{
bool v4; // zf
bool v5; // w8
cocos2d::_hashSelectorEntry *m_pHashForTimers; // x8
int v7; // w9
unsigned int v8; // w10
unsigned int v9; // w11
int v10; // w9
unsigned int v11; // w10
unsigned int v12; // w11
int v13; // w9
__int64 v14; // x8
unsigned int *v15; // x9
__int64 v16; // x8
unsigned int **v17; // x20
unsigned int *v18; // x0
__int64 v19; // x8
__int64 v20; // x21
__int64 v21; // x10
__int64 v22; // x11
__int64 v23; // x11
bool v24; // zf
bool v25; // w11
unsigned int v26; // w8
if ( a3 )
{
v4 = !a2.adj || (a2.adj & 1 | (__int64)a2.ptr) == 0;
v5 = v4;
if ( a2.ptr || !v5 )
{
m_pHashForTimers = a1->m_pHashForTimers;
if ( m_pHashForTimers )
{
v7 = ((_DWORD)a3 + 17973517) ^ 0x7F76D;
v8 = (-1622558010 - v7) ^ (v7 << 8);
v9 = (-17973517 - v7 - v8) ^ (v8 >> 13);
v10 = (v7 - v8 - v9) ^ (v9 >> 12);
v11 = (v8 - v9 - v10) ^ (v10 << 16);
v12 = (v9 - v10 - v11) ^ (v11 >> 5);
v13 = (v10 - v11 - v12) ^ (v12 >> 3);
v14 = *((_QWORD *)m_pHashForTimers + 5);
v15 = *(unsigned int **)(*(_QWORD *)v14
+ 16LL
* (((v12 - v13 - ((v11 - v12 - v13) ^ (v13 << 10)))
^ (((v11 - v12 - v13) ^ (v13 << 10)) >> 15))
& (*(_DWORD *)(v14 + 8) - 1)));
if ( v15 )
{
v16 = -*(_QWORD *)(v14 + 32);
while ( 1 )
{
v17 = (unsigned int **)((char *)v15 + v16);
if ( *(unsigned int *)((char *)v15 + v16 + 88) == 4 && *v17[10] == (_DWORD)a3 )
break;
v15 = v17[9];
if ( !v15 )
return;
}
v18 = *v17;
v19 = **v17;
if ( (_DWORD)v19 )
{
v20 = 0;
while ( 1 )
{
v21 = *(_QWORD *)(*((_QWORD *)v18 + 2) + 8 * v20);
v22 = *(_QWORD *)(v21 + 96);
v4 = a2.adj == v22;
v23 = ((unsigned __int8)v22 | LOBYTE(a2.adj)) & 1 | (__int64)a2.ptr;
v24 = v4 || v23 == 0;
v25 = !v24;
if ( a2.ptr == *(void (__cdecl **)(float))(v21 + 88) && !v25 )
break;
if ( v19 == ++v20 )
return;
}
if ( (unsigned int *)v21 == v17[3] && ((_BYTE)v17[4] & 1) == 0 )
{
cocos2d::CCObject::retain((cocos2d::CCObject *)v17[3]);
*((_BYTE *)v17 + 32) = 1;
v18 = *v17;
}
sub_100353940(v18, v20, 1);
v26 = *((_DWORD *)v17 + 4);
if ( v26 >= (unsigned int)v20 )
*((_DWORD *)v17 + 4) = v26 - 1;
if ( !**v17 )
{
if ( (unsigned int **)a1->m_pCurrentTarget == v17 )
a1->m_bCurrentTargetSalvaged = 1;
else
cocos2d::CCScheduler::removeHashElement(a1, (cocos2d::_hashSelectorEntry *)v17);
}
}
}
}
}
}
}