//
// SetupGradientPopup::updateZLayerButtons from 0x1405b7470 to 0x1405b7500 (144 bytes)
//
// 7 xrefs:
// > SetupGradientPopup::init @ 0x1405b6ff4
// > SetupGradientPopup::onZLayer @ 0x1405b7412
// > SetupGradientPopup::onZLayer @ 0x1405b746b
// > ??> @ 0x1408dfbd0
// > ??> @ 0x1408dfbe0
// > ??> @ 0x14092dd28
// > ??> @ 0x14092dd34
//
// 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:44 +0000
//
unsigned int __fastcall SetupGradientPopup::updateZLayerButtons(__int64 a1)
{
unsigned int v2; // esi
unsigned int result; // eax
struct cocos2d::CCObject *v4; // rbx
int v5; // eax
const char *v6; // rdx
v2 = 0;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1016));
if ( result )
{
do
{
v4 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1016), v2);
v5 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v4 + 56LL))(v4);
v6 = "GJ_button_02.png";
if ( v5 != *(_DWORD *)(a1 + 1024) )
v6 = "GJ_button_04.png";
ButtonSprite::updateBGImage((__int64)v4, v6);
++v2;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1016));
}
while ( v2 < result );
}
return result;
}