//
// SetupTriggerPopup::createPlusButton from 0x10023b370 to 0x10023b51e (430 bytes)
//
// 8 xrefs:
// > SetupPickupTriggerPopup::init @ 0x100058e0b
// > SetupObjectOptions2Popup::init @ 0x10031b4f6
// > SetupSFXPopup::init @ 0x1004b92d0
// > SetupSFXPopup::init @ 0x1004b9767
// > SetupSFXPopup::init @ 0x1004b97d4
// > SetupInteractObjectPopup::init @ 0x10050e515
// > SetupGradientPopup::init @ 0x1005f24e8
// > SetupRotateGameplayPopup::init @ 0x100798123
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
CCMenuItemSpriteExtra *__fastcall SetupTriggerPopup::createPlusButton(
__int64 a1,
__int64 a2,
__int64 a3,
std::string *a4,
unsigned int a5,
int a6,
float a7)
{
__int64 i; // rdi
__int64 v12; // r13
__int64 v13; // rsi
__int64 v14; // r13
__int64 j; // rdi
__int64 v16; // r12
__int64 v17; // r12
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v18; // al
const char *data; // r14
cocos2d::CCSprite *v20; // r14
CCMenuItemSpriteExtra *v21; // r14
char v23; // [rsp+0h] [rbp-40h] BYREF
__int64 v24; // [rsp+8h] [rbp-38h]
unsigned int v25; // [rsp+10h] [rbp-30h]
float v26; // [rsp+14h] [rbp-2Ch]
double v27; // 0:xmm0_8.8
v26 = a7;
v24 = a3;
v25 = a2;
for ( i = *(_QWORD *)(a1 + 856); (unsigned int)sub_100720070(i) <= a5; i = *(_QWORD *)(a1 + 856) )
{
v12 = *(_QWORD *)(a1 + 856);
a2 = sub_10071F9E0(i, a2);
sub_10071FCD0(v12, a2);
}
v13 = a5;
v14 = sub_1007200C0(*(_QWORD *)(a1 + 856), a5);
for ( j = *(_QWORD *)(a1 + 872); (unsigned int)sub_100720070(j) <= a6; j = *(_QWORD *)(a1 + 872) )
{
v16 = *(_QWORD *)(a1 + 872);
v13 = sub_10071F9E0(j, v13);
sub_10071FCD0(v16, v13);
}
v17 = sub_1007200C0(*(_QWORD *)(a1 + 872), (unsigned int)a6);
v18 = a4->__r_.__value_.__s.0;
if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) != 0 )
{
if ( !a4->__r_.__value_.__l.__size_ )
goto LABEL_11;
}
else if ( !(*(unsigned __int8 *)&v18 >> 1) )
{
LABEL_11:
std::string::assign(a4, "GJ_plus2Btn_001.png");
if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_12;
LABEL_10:
data = a4->__r_.__value_.__s.__data_;
goto LABEL_13;
}
if ( (*(_BYTE *)&v18 & 1) == 0 )
goto LABEL_10;
LABEL_12:
data = a4->__r_.__value_.__l.__data_;
LABEL_13:
v20 = cocos2d::CCSprite::createWithSpriteFrameName(data);
((void (__fastcall *)(cocos2d::CCSprite *, float))v20->setScale)(v20, v26);
v21 = CCMenuItemSpriteExtra::create(v20, nullptr, (cocos2d::CCObject *)a1, (cocos2d::SEL_MenuHandler)0x569uLL);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v21->setTag)(v21, v25);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(a1 + 544) + 440LL))(
*(_QWORD *)(a1 + 544),
v21);
*(cocos2d::CCPoint *)&v27 = cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)&v23,
*(const cocos2d::CCPoint **)(a1 + 544));
((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v21->setPosition)(v21, &v23, v27);
sub_10071FCD0(v14, v21);
if ( a6 > 0 )
sub_10071FCD0(v17, v21);
return v21;
}