//
// SetupGradientPopup::onZLayer from 0x1006c5d00 to 0x1006c5e06 (262 bytes)
//
// 1 xrefs:
// > sub_1006C4830 @ 0x1006c5758
//
// 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:35:33 +0000
//
__int64 __fastcall SetupGradientPopup::onZLayer(__int64 a1, __int64 a2)
{
int v2; // eax
__int64 v3; // rcx
unsigned int v4; // r14d
__int64 result; // rax
unsigned int v6; // r14d
__int64 v7; // r15
const char *v8; // rsi
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(a1 + 1040) = v2;
v3 = *(_QWORD *)(a1 + 680);
if ( v3 )
{
*(_DWORD *)(v3 + 1840) = v2;
}
else if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) )
{
v4 = 0;
do
*(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 688), v4++) + 1840) = *(_DWORD *)(a1 + 1040);
while ( v4 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) );
}
result = sub_1007FEF90(*(_QWORD *)(a1 + 1032));
if ( (_DWORD)result )
{
v6 = 0;
do
{
v7 = sub_1007FEFE0(*(_QWORD *)(a1 + 1032), v6);
v8 = "GJ_button_02.png";
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v7 + 64LL))(v7) != *(_DWORD *)(a1 + 1040) )
v8 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v7, (__int64)v8);
++v6;
result = sub_1007FEF90(*(_QWORD *)(a1 + 1032));
}
while ( v6 < (unsigned int)result );
}
return result;
}