//
// cocos2d::CCParticleBatchNode::getCurrentIndex from 0x1003b27f0 to 0x1003b28f3 (259 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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 12:29:27 +0000
//
unsigned int *__fastcall cocos2d::CCParticleBatchNode::getCurrentIndex(
__int64 a1,
unsigned int *a2,
unsigned int *a3,
__int64 a4,
int a5)
{
unsigned int v5; // r13d
unsigned int v6; // r14d
char v7; // r12
__int64 v8; // r15
int v9; // eax
char v14; // [rsp+20h] [rbp-30h]
int v15; // [rsp+24h] [rbp-2Ch]
v5 = sub_1007FEF90(*(_QWORD *)(a1 + 208));
if ( v5 )
{
v14 = 0;
v6 = 0;
v7 = 0;
v15 = 0;
do
{
while ( 1 )
{
v8 = sub_1007FEFE0(*(_QWORD *)(a1 + 208), v6);
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)v8 + 104LL))(v8) > a5 && (v7 & 1) == 0 )
{
*a3 = v6;
v7 = 1;
if ( (v14 & 1) != 0 )
{
v5 = v6;
goto LABEL_14;
}
}
if ( v8 == a4 )
break;
if ( v5 == ++v6 )
goto LABEL_11;
}
*a2 = v6;
if ( (v7 & 1) != 0 )
break;
v14 = 1;
v15 = -1;
++v6;
}
while ( v5 != v6 );
LABEL_11:
if ( (v7 & 1) != 0 )
v5 = *a3;
LABEL_14:
v9 = v15;
}
else
{
v9 = 0;
}
*a3 = v9 + v5;
return a3;
}