//
// SetupTriggerPopup::createCustomButton from 0x67b0d8 to 0x67b2c6 (494 bytes)
//
// 4 xrefs:
// > SetupKeyframePopup::init @ 0x6ae9ce
// > SetupKeyframePopup::init @ 0x6aea4a
// > SetupKeyframePopup::init @ 0x6aeb24
// > SetupKeyframePopup::init @ 0x6aeb9e
//
// 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:55:58 +0000
//
int __fastcall SetupTriggerPopup::createCustomButton(
int a1,
int a2,
int a3,
int *a4,
int a5,
float a6,
int a7,
char a8,
unsigned int a9,
int a10)
{
cocos2d::CCArray *PageContainer; // r11
int GroupContainer; // r0
const char *v16; // r1
unsigned int v17; // r3
cocos2d::CCArray *v18; // r10
cocos2d::CCSprite *v19; // r0
int v20; // r5
cocos2d::CCObject *v21; // r7
float v22; // r1
float v23; // r2
const char *v24; // r2
cocos2d::CCLabelBMFont *v25; // r0
cocos2d::CCObject *v26; // r6
void (__fastcall *v27)(cocos2d::CCObject *, _BYTE *); // r8
void (__fastcall *v28)(cocos2d::CCObject *, _BYTE *); // r8
float *v29; // r0
float v30; // r2
float v31; // r1
float v32; // r10
int v33; // r0
void (__fastcall *v35)(cocos2d::CCObject *, _BYTE *); // [sp+14h] [bp-30h]
float v36; // [sp+1Ch] [bp-28h] BYREF
float v37; // [sp+20h] [bp-24h]
_BYTE v38[8]; // [sp+24h] [bp-20h] BYREF
_BYTE v39[8]; // [sp+2Ch] [bp-18h] BYREF
int v40; // [sp+34h] [bp-10h]
int v41; // [sp+38h] [bp-Ch]
PageContainer = (cocos2d::CCArray *)SetupTriggerPopup::getPageContainer((cocos2d::CCArray **)a1, a9);
GroupContainer = SetupTriggerPopup::getGroupContainer((cocos2d::CCArray **)a1, a10);
v17 = *(unsigned __int8 *)a4;
v18 = (cocos2d::CCArray *)GroupContainer;
if ( (v17 & 1) != 0 )
{
if ( a4[1] )
{
LABEL_3:
v19 = (cocos2d::CCSprite *)a4[2];
goto LABEL_7;
}
}
else if ( v17 >> 1 )
{
goto LABEL_6;
}
std::string::assign(a4, "GJ_plus2Btn_001.png");
if ( (*(_BYTE *)a4 & 1) != 0 )
goto LABEL_3;
LABEL_6:
v19 = (cocos2d::CCSprite *)((char *)a4 + 1);
LABEL_7:
v20 = cocos2d::CCSprite::createWithSpriteFrameName(v19, v16);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v20 + 80))(v20, LODWORD(a6));
v40 = 712;
v41 = 1;
v21 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v20, 0, a1, 712, 1);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v21 + 36))(v21, a2);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v21);
v35 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v21 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v39, *(const cocos2d::CCPoint **)(a1 + 444));
v35(v21, v39);
cocos2d::CCArray::addObject(PageContainer, v21);
if ( a10 > 0 )
cocos2d::CCArray::addObject(v18, v21);
if ( a8 )
{
v22 = 0.0;
v23 = 4.0;
}
else
{
v22 = 8.0;
v23 = 0.0;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v36, v22, v23);
if ( (*(_BYTE *)a3 & 1) != 0 )
v25 = *(cocos2d::CCLabelBMFont **)(a3 + 8);
else
v25 = (cocos2d::CCLabelBMFont *)(a3 + 1);
v26 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v25, "goldFont.fnt", v24);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v26);
cocos2d::CCArray::addObject(PageContainer, v26);
if ( a10 > 0 )
cocos2d::CCArray::addObject(v18, v26);
v27 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v26 + 148);
if ( a8 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 0.5, 0.0);
v27(v26, v39);
v32 = v36;
v28 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v26 + 92);
v33 = (*(int (__fastcall **)(int))(*(_DWORD *)v20 + 164))(v20);
v31 = v32;
v30 = v37 + (float)((float)(*(float *)(v33 + 4) * 0.5) * a6);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 0.0, 0.5);
v27(v26, v39);
v28 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v26 + 92);
v29 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v20 + 164))(v20);
v30 = v37;
v31 = v36 + (float)((float)(*v29 * 0.5) * a6);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v31, v30);
cocos2d::CCPoint::operator+(v39, a5, v38);
v28(v26, v39);
return (*(int (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v26 + 80))(v26, a7);
}