//
// cocos2d::CCScheduler::scheduleUpdateForTarget from 0x100442d80 to 0x100442ec1 (321 bytes)
//
// 7 xrefs:
// > cocos2d::CCNode::scheduleUpdate @ 0x1002740db
// > cocos2d::CCNode::scheduleUpdateWithPriority @ 0x1002740fb
// > cocos2d::CCNode::scheduleUpdateWithPriorityLua @ 0x100274168
// > cocos2d::CCDirector::init @ 0x100482702
// > sub_10056D310 @ 0x10056d593
// > sub_10056D6C0 @ 0x10056d71c
// > sub_10056EB70 @ 0x10056ebcc
//
// 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::scheduleUpdateForTarget(
cocos2d::CCScheduler *a1,
cocos2d::CCObject *a2,
int a3,
bool a4)
{
cocos2d::_hashUpdateEntry *m_pHashForUpdates; // rsi
int v7; // r11d
unsigned int v8; // r8d
unsigned int v9; // r9d
int v10; // r10d
unsigned int v11; // r11d
unsigned int v12; // r8d
int v13; // r9d
unsigned int v14; // r10d
__int64 v15; // r9
__int64 v16; // rsi
__int64 v17; // rax
int v18; // [rsp+0h] [rbp-8h]
v18 = (int)a2;
m_pHashForUpdates = a1->m_pHashForUpdates;
if ( !m_pHashForUpdates )
goto LABEL_8;
v7 = ((_DWORD)a2 + 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 = (v12 - (((v11 - v12 - v13) ^ (v13 << 10)) + v13)) ^ (((v11 - v12 - v13) ^ (v13 << 10)) >> 15);
v15 = *((_QWORD *)m_pHashForUpdates + 3);
v16 = *(_QWORD *)(*(_QWORD *)v15 + 16LL * (v14 & (*(_DWORD *)(v15 + 8) - 1)));
if ( v16 )
{
while ( *(_DWORD *)(v16 - *(_QWORD *)(v15 + 32) + 72) != 4 || **(_DWORD **)(v16 - *(_QWORD *)(v15 + 32) + 64) != v18 )
{
v16 = *(_QWORD *)(v16 - *(_QWORD *)(v15 + 32) + 56);
if ( !v16 )
goto LABEL_8;
}
v17 = *(_QWORD *)(v16 - *(_QWORD *)(v15 + 32) + 8);
*(_BYTE *)(v17 + 28) = a4;
*(_BYTE *)(v17 + 29) = 0;
}
else
{
LABEL_8:
if ( a3 )
{
if ( a3 < 0 )
cocos2d::CCScheduler::priorityIn(a1, &a1->m_pUpdatesNegList, a2, a3, a4);
else
cocos2d::CCScheduler::priorityIn(a1, &a1->m_pUpdatesPosList, a2, a3, a4);
}
else
{
cocos2d::CCScheduler::appendIn(a1, &a1->m_pUpdates0List, a2, a4);
}
}
}