//
// SetupGradientPopup::onBlending from 0x1405b7500 to 0x1405b75c0 (192 bytes)
//
// 3 xrefs:
// > SetupGradientPopup::init @ 0x1405b6c8e
// > ??> @ 0x14092dd4c
// > ??> @ 0x14092dd58
//
// 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
//
__int64 __fastcall SetupGradientPopup::onBlending(__int64 a1, __int64 a2)
{
int v3; // eax
int v4; // ecx
unsigned int v5; // edi
int v6; // edx
__int64 v7; // rax
struct cocos2d::CCObject *v9; // rax
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = 1;
if ( v3 != 1 )
v4 = -1;
v5 = 0;
v6 = v4 + *(_DWORD *)(a1 + 1008);
if ( v6 >= 0 )
{
if ( v6 > 3 )
v6 = 3;
}
else
{
v6 = 0;
}
v7 = *(_QWORD *)(a1 + 680);
*(_DWORD *)(a1 + 1008) = v6;
if ( v7 )
{
*(_DWORD *)(v7 + 1860) = v6;
return SetupGradientPopup::updateBlendingLabel(a1);
}
else
{
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 688)) )
{
do
{
v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 688), v5++);
*((_DWORD *)v9 + 465) = *(_DWORD *)(a1 + 1008);
}
while ( v5 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 688)) );
}
return SetupGradientPopup::updateBlendingLabel(a1);
}
}