//
// cocos2d::CCParticleBatchNode::getCurrentIndex from 0xd72778 to 0xd72898 (288 bytes)
//
// 2 xrefs:
// > cocos2d::CCParticleBatchNode::reorderChild @ 0xd72bbc
// > ??> @ 0x97270
//
// 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:08:01 +0000
//
__int64 __fastcall cocos2d::CCParticleBatchNode::getCurrentIndex(
cocos2d::CCArray **this,
unsigned int *a2,
unsigned int *a3,
cocos2d::CCNode *a4,
int a5)
{
__int64 result; // x0
unsigned int v11; // w21
unsigned int v12; // w19
int v13; // w22
int v14; // w25
cocos2d::CCNode *v15; // x27
int v16; // w27
unsigned int v17; // w23
int v18; // [xsp+6Ch] [xbp+6Ch]
result = cocos2d::CCArray::count(*(this + 26));
v11 = result;
if ( (_DWORD)result )
{
v12 = 0;
v18 = 0;
v13 = 0;
v14 = 0;
while ( 1 )
{
v15 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(*(this + 26), v12);
result = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v15 + 104LL))(v15);
if ( (int)result <= a5 || v13 )
{
if ( a4 != v15 )
goto LABEL_6;
*a2 = v12;
v14 = 1;
if ( v13 )
goto LABEL_15;
++v12;
result = 0xFFFFFFFFLL;
v18 = -1;
if ( v12 == v11 )
{
LABEL_11:
v16 = v18;
if ( !v13 )
goto LABEL_12;
v17 = *a3;
goto LABEL_13;
}
}
else
{
*a3 = v12;
v13 = 1;
if ( v14 )
{
v17 = v12;
v16 = v18;
goto LABEL_13;
}
if ( a4 == v15 )
{
*a2 = v12;
LABEL_15:
v17 = *a3;
v16 = v18;
goto LABEL_13;
}
LABEL_6:
if ( ++v12 == v11 )
goto LABEL_11;
}
}
}
v16 = 0;
LABEL_12:
v17 = v11;
LABEL_13:
*a3 = v16 + v17;
return result;
}