//
// cocos2d::CCScheduler::scheduleUpdateForTarget from 0x5aef94 to 0x5af086 (242 bytes)
//
// 5 xrefs:
// > cocos2d::extension::AssetsManager::Helper::Helper @ 0x59fe80
// > cocos2d::extension::WsThreadHelper::WsThreadHelper @ 0x5acd8a
// > cocos2d::CCNode::scheduleUpdateWithPriority @ 0x5be24e
// > cocos2d::CCNode::scheduleUpdateWithPriorityLua @ 0x5be2a8
// > cocos2d::CCDirector::init @ 0x5c2d3c
//
// 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::scheduleUpdateForTarget(cocos2d::CCScheduler *a1, cocos2d::CCObject *a2, int a3, bool a4)
{
cocos2d::_hashUpdateEntry *m_pHashForUpdates; // r3
_DWORD *v8; // r8
int v9; // r0
unsigned int v10; // r1
unsigned int v11; // r2
int v12; // r0
unsigned int v13; // r1
unsigned int v14; // r2
int v15; // r0
int v16; // r7
int v17; // r3
cocos2d::_listEntry **p_m_pUpdatesPosList; // r1
int v19; // r3
cocos2d::CCObject *v20; // [sp+Ch] [bp-8h] BYREF
m_pHashForUpdates = a1->m_pHashForUpdates;
v20 = a2;
if ( m_pHashForUpdates )
{
v8 = *((_DWORD **)m_pHashForUpdates + 3);
v9 = ((unsigned __int8)v20 + 17973517 + (HIBYTE(v20) << 24) + (BYTE2(v20) << 16) + (BYTE1(v20) << 8)) ^ 0x7F76D;
v10 = (-1622558010 - v9) ^ (v9 << 8);
v11 = (-17973517 - v9 - v10) ^ (v10 >> 13);
v12 = (v9 - v10 - v11) ^ (v11 >> 12);
v13 = (v10 - v11 - v12) ^ (v12 << 16);
v14 = (v11 - v12 - v13) ^ (v13 >> 5);
v15 = (v12 - v13 - v14) ^ (v14 >> 3);
v16 = *(_DWORD *)(*v8
+ 12
* (((v14 - v15 - ((v13 - v14 - v15) ^ (v15 << 10)))
^ (((v13 - v14 - v15) ^ (v15 << 10)) >> 15))
& (v8[1] - 1)));
if ( v16 )
v16 -= v8[5];
while ( v16 )
{
if ( *(_DWORD *)(v16 + 36) == 4 && !memcmp(*(const void **)(v16 + 32), &v20, 4u) )
{
v19 = *(_DWORD *)(v16 + 4);
*(_BYTE *)(v19 + 16) = a4;
*(_BYTE *)(v19 + 17) = 0;
return;
}
v17 = *(_DWORD *)(v16 + 28);
if ( !v17 )
break;
v16 = v17 - v8[5];
}
}
if ( a3 )
{
if ( a3 >= 0 )
p_m_pUpdatesPosList = &a1->m_pUpdatesPosList;
else
p_m_pUpdatesPosList = &a1->m_pUpdatesNegList;
cocos2d::CCScheduler::priorityIn(a1, p_m_pUpdatesPosList, v20, a3, a4);
}
else
{
cocos2d::CCScheduler::appendIn(a1, &a1->m_pUpdates0List, v20, a4);
}
}