//
// HSVWidgetPopup::create from 0xa3c0d4 to 0xa3c328 (596 bytes)
//
// 5 xrefs:
// > CustomizeObjectLayer::onHSV @ 0x9873bc
// > CustomizeObjectLayer::onHSV @ 0x987504
// > SetupAreaTintTriggerPopup::onHSV @ 0xb3babc
// > SetupEnterEffectPopup::onHSV @ 0xb439f0
// > ??> @ 0xb0b18
//
// This function is hookable on this platform (idp: arm, 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:59:54 +0000
//
__int64 __fastcall HSVWidgetPopup::create(__int64 a1, __int64 a2, int a3, __int64 a4, char *a5)
{
__int64 v9; // x19
char v10; // w0
__int64 v11; // x0
__int64 v12; // x1
int v13; // w20
__int64 v14; // x1
__int64 v15; // x0
__int64 v18; // [xsp+50h] [xbp+50h] BYREF
__int64 v19; // [xsp+58h] [xbp+58h]
void *v20; // [xsp+60h] [xbp+60h]
v9 = operator new(0x2A8u);
cocos2d::CCLayerColor::CCLayerColor((cocos2d::CCLayerColor *)v9);
*(_QWORD *)(v9 + 552) = 0;
*(_QWORD *)v9 = &off_1419A40;
*(_QWORD *)(v9 + 320) = off_1419F90;
*(_QWORD *)(v9 + 328) = &off_141A000;
*(_QWORD *)(v9 + 336) = off_141A018;
*(_QWORD *)(v9 + 344) = off_141A038;
*(_QWORD *)(v9 + 352) = off_141A060;
*(_QWORD *)(v9 + 408) = &off_141A090;
*(_QWORD *)(v9 + 432) = &off_141A110;
*(_QWORD *)(v9 + 544) = off_141A130;
*(_QWORD *)(v9 + 560) = 0;
*(_QWORD *)(v9 + 568) = 0;
*(_BYTE *)(v9 + 576) = 0;
*(_QWORD *)(v9 + 584) = 0;
*(_DWORD *)(v9 + 592) = 0;
*(_BYTE *)(v9 + 596) = 0;
*(_BYTE *)(v9 + 597) = 0;
*(_BYTE *)(v9 + 598) = 0;
*(_BYTE *)(v9 + 599) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v9 + 600));
*(_DWORD *)(v9 + 632) = -1;
*(_DWORD *)(v9 + 640) = -1;
*(_QWORD *)(v9 + 608) = 0;
*(_QWORD *)(v9 + 616) = 0;
*(_QWORD *)(v9 + 624) = 0;
*(_BYTE *)(v9 + 636) = 0;
*(_BYTE *)(v9 + 637) = 0;
*(_BYTE *)(v9 + 644) = 0;
*(_BYTE *)(v9 + 656) = 0;
*(_DWORD *)(v9 + 648) = 0;
*(_DWORD *)(v9 + 652) = 0;
*(_QWORD *)v9 = &off_1485DF0;
*(_QWORD *)(v9 + 320) = off_1486340;
*(_QWORD *)(v9 + 328) = &off_14863B0;
*(_QWORD *)(v9 + 336) = off_14863C8;
*(_QWORD *)(v9 + 344) = off_14863E8;
*(_QWORD *)(v9 + 352) = off_1486410;
*(_QWORD *)(v9 + 408) = &off_1486440;
*(_QWORD *)(v9 + 432) = &off_14864C0;
*(_QWORD *)(v9 + 544) = off_14864E0;
v18 = 0;
v10 = *a5;
v19 = 0;
v20 = nullptr;
if ( (v10 & 1) != 0 )
{
std::string::__init(&v18, *((void **)a5 + 2), *((_QWORD *)a5 + 1));
}
else
{
v11 = *(_QWORD *)a5;
v12 = *((_QWORD *)a5 + 1);
v20 = *((void **)a5 + 2);
v18 = v11;
v19 = v12;
}
v13 = (unsigned __int8)HSVWidgetPopup::init(v9, a1, a2, a3, a4, &v18);
if ( (v18 & 1) != 0 )
operator delete(v20);
if ( v13 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v9);
}
else
{
v14 = *(_QWORD *)v9;
v15 = v9;
v9 = 0;
(*(void (__fastcall **)(__int64))(v14 + 16))(v15);
}
return v9;
}