//
// SetGroupIDLayer::onZLayer from 0x140593480 to 0x140593540 (192 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::init @ 0x14058f814
// > ??> @ 0x14092ce7c
//
// 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:32 +0000
//
__int64 __fastcall SetGroupIDLayer::onZLayer(__int64 a1, __int64 a2)
{
int v3; // eax
__int64 v4; // rcx
unsigned int i; // edi
struct cocos2d::CCObject *v7; // rax
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = *(_QWORD *)(a1 + 672);
*(_DWORD *)(a1 + 788) = v3;
if ( v4 )
{
if ( !*(_BYTE *)(v4 + 1128) )
*(_DWORD *)(v4 + 1132) = v3;
*(_BYTE *)(*(_QWORD *)(a1 + 672) + 1156LL) = 1;
return SetGroupIDLayer::updateZLayerButtons(a1);
}
else
{
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680)); ++i )
{
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 680), i);
if ( !*((_BYTE *)v7 + 1128) )
*((_DWORD *)v7 + 283) = *(_DWORD *)(a1 + 788);
*((_BYTE *)v7 + 1156) = 1;
}
return SetGroupIDLayer::updateZLayerButtons(a1);
}
}