//
// SetupTriggerPopup::addCustomButton from 0x100132658 to 0x100132744 (236 bytes)
//
// 2 xrefs:
// > GJRateLevelLayer::init @ 0x1001b1364
// > GJRateLevelLayer::init @ 0x1001b13c8
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall SetupTriggerPopup::addCustomButton(
SetupTriggerPopup *a1,
int a2,
ButtonSprite *a3,
cocos2d::CCPoint a4,
int a5,
int a6)
{
int v6; // w5
int v7; // w19
const cocos2d::CCPoint *v8; // x22
__int64 v10; // x23
cocos2d::CCArray *PageContainer; // x25
cocos2d::CCArray *GroupContainer; // x20
CCMenuItemSpriteExtra *v14; // x21
_BYTE v15[8]; // [xsp+8h] [xbp-48h] BYREF
cocos2d::CCPoint v16; // 0:kr00_8.8
cocos2d::SEL_MenuHandler v17; // 0:x3.16
v7 = v6;
v8 = *(const cocos2d::CCPoint **)&a5;
v10 = *(_QWORD *)&a2;
PageContainer = SetupTriggerPopup::getPageContainer(a1, a6);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, v7);
v17.ptr = (void (__cdecl *)(cocos2d::CCObject *))1392;
v17.adj = 1;
v14 = CCMenuItemSpriteExtra::create(a3, nullptr, a1, v17);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v14->setTag)(v14, v10);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v14);
v16 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, v8);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, float, float))v14->setPosition)(v14, v15, v16.x, v16.y);
sub_10024A2D0(PageContainer, v14);
if ( v7 >= 1 )
sub_10024A2D0(GroupContainer, v14);
}