//
// SetGroupIDLayer::updateEditorOrder from 0x140594510 to 0x1405945d4 (196 bytes)
//
// 5 xrefs:
// > SetGroupIDLayer::onArrow @ 0x140591372
// > SetGroupIDLayer::textChanged @ 0x14059213f
// > ??> @ 0x1408ddc48
// > ??> @ 0x1408ddc7c
// > ??> @ 0x14092cfcc
//
// 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 11:34:33 +0000
//
unsigned int __fastcall SetGroupIDLayer::updateEditorOrder(__int64 a1)
{
__int64 v2; // rcx
unsigned int result; // eax
unsigned int v4; // edi
struct cocos2d::CCObject *v5; // rsi
*(_BYTE *)(a1 + 796) = 1;
v2 = *(_QWORD *)(a1 + 672);
if ( v2 )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 1544LL))(v2);
if ( (_BYTE)result )
{
result = *(_DWORD *)(a1 + 792);
*(_DWORD *)(*(_QWORD *)(a1 + 672) + 1788LL) = result;
}
}
else
{
v4 = 0;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680));
if ( result )
{
do
{
v5 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 680), v4);
if ( (*(unsigned __int8 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v5 + 1544LL))(v5) )
*((_DWORD *)v5 + 447) = *(_DWORD *)(a1 + 792);
++v4;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680));
}
while ( v4 < result );
}
}
return result;
}