//
// CustomizeObjectLayer::onHSV from 0x5810b0 to 0x581248 (408 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:53 +0000
//
int __fastcall CustomizeObjectLayer::onHSV(CustomizeObjectLayer *this, cocos2d::CCObject *a2)
{
char *v4; // r10
unsigned int v5; // r1
char *v6; // r3
size_t v7; // r3
int v8; // r0
int v9; // r7
int v10; // r7
int *v11; // r0
int v12; // r0
int v13; // r7
void (__fastcall *v14)(int, int); // r4
int v15; // r0
int v17; // [sp+0h] [bp-50h]
int v18; // [sp+14h] [bp-3Ch] BYREF
size_t v19; // [sp+18h] [bp-38h]
char *v20; // [sp+1Ch] [bp-34h]
int v21; // [sp+20h] [bp-30h] BYREF
size_t v22; // [sp+24h] [bp-2Ch]
char *v23; // [sp+28h] [bp-28h]
_DWORD v24[4]; // [sp+2Ch] [bp-24h] BYREF
_DWORD v25[4]; // [sp+3Ch] [bp-14h] BYREF
v4 = (char *)this + 520;
if ( (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2) != 1 )
{
CustomizeObjectLayer::getHSV((CustomizeObjectLayer *)v25, (int)this);
v12 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 160) + 472))(*((_DWORD *)this + 160));
v21 = 0;
v22 = 0;
v23 = nullptr;
v13 = v12;
std::string::__init(&v21, "Detail HSV", 0xAu);
LOWORD(v17) = *(_WORD *)v13;
BYTE2(v17) = *(_BYTE *)(v13 + 2);
v10 = HSVWidgetPopup::create(v25[0], v25[1], v25[2], v25[3], v17, v4, &v21);
v11 = &v21;
goto LABEL_19;
}
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "Base HSV", 8u);
if ( !*((_BYTE *)this + 568) )
{
if ( (v18 & 1) == 0 )
{
v6 = (char *)&v18 + 1;
goto LABEL_7;
}
v5 = (v18 & 0xFFFFFFFE) - 1;
if ( v5 > 9 )
{
v6 = v20;
LABEL_7:
strcpy(v6, "Detail HSV");
if ( (v18 & 1) != 0 )
v7 = 10;
else
v7 = 20;
if ( (v18 & 1) != 0 )
v19 = v7;
else
LOBYTE(v18) = v7;
goto LABEL_14;
}
std::string::__grow_by_and_replace(
(int)&v18,
v5,
11 - (v18 & 0xFFFFFFFE),
v19,
*((unsigned __int8 *)this + 568),
v19,
0xAu,
"Detail HSV");
}
LABEL_14:
CustomizeObjectLayer::getHSV((CustomizeObjectLayer *)v24, (int)this);
v8 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 160) + 472))(*((_DWORD *)this + 160));
v21 = 0;
v22 = 0;
v9 = v8;
v23 = nullptr;
if ( (v18 & 1) != 0 )
{
std::string::__init(&v21, v20, v19);
}
else
{
v21 = v18;
v22 = v19;
v23 = v20;
}
LOWORD(v17) = *(_WORD *)v9;
BYTE2(v17) = *(_BYTE *)(v9 + 2);
v10 = HSVWidgetPopup::create(v24[0], v24[1], v24[2], v24[3], v17, v4, &v21);
std::string::~string((int)&v21);
v11 = &v18;
LABEL_19:
std::string::~string((int)v11);
v14 = *(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 36);
v15 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v14(v10, v15);
return (*(int (__fastcall **)(int))(*(_DWORD *)v10 + 656))(v10);
}