//
// ListButtonPage::create from 0x14006b480 to 0x14006b746 (710 bytes)
//
// 2 xrefs:
// > ListButtonBar::init @ 0x14006b06e
// > ??> @ 0x1406c5fd0
//
// 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
//
// Hidden C++ exception states: #wind=1
ListButtonPage *ListButtonPage::create(
cocos2d::CCArray *a1,
cocos2d::CCPoint a2,
int a3,
int a4,
float a5,
float a6,
float a7)
{
ListButtonPage *v11; // r14
float *v12; // rbx
__int64 v13; // rcx
cocos2d::CCNode *v15; // r13
float v16; // xmm7_4
float v17; // xmm10_4
int v18; // edi
unsigned int i; // esi
int v20; // ebx
float v21; // xmm0_4
struct cocos2d::CCObject *v22; // r15
cocos2d::CCObject_vtbl *v23; // rbx
struct cocos2d::CCPoint v24; // rax
ListButtonPage *v25; // [rsp+20h] [rbp-C8h] BYREF
cocos2d::CCPoint v26; // [rsp+28h] [rbp-C0h] BYREF
struct cocos2d::CCPoint v27; // [rsp+30h] [rbp-B8h] BYREF
v11 = (ListButtonPage *)operator new(0x198u);
v25 = v11;
cocos2d::CCLayer::CCLayer(v11);
v11->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (ListButtonPage_vtbl *)&ListButtonPage::`vftable';
v11->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&ListButtonPage::`vftable';
v11->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&ListButtonPage::`vftable';
v11->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&ListButtonPage::`vftable';
v11->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&ListButtonPage::`vftable';
v11->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&ListButtonPage::`vftable';
v12 = (float *)cocos2d::CCPoint::CCPoint(&v26, *(const struct cocos2d::CCPoint **)&a2);
if ( cocos2d::CCLayer::init(v11) )
{
v15 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v13);
v11->addChild_1(v11, v15);
v16 = (float)((float)((float)(a4 - 1) * 0.5) * (float)(a6 + a7)) + v12[1];
v17 = (float)(*v12 - (float)((float)((float)a3 * 0.5) * a7)) - (float)((float)((float)(a3 - 1) * 0.5) * a5);
v18 = 0;
for ( i = 0; i < cocos2d::CCArray::count(a1); ++i )
{
v20 = v18 % a3;
v21 = floorf((float)v18 / (float)a3);
v22 = cocos2d::CCArray::objectAtIndex(a1, i);
if ( v22->getTag(v22) == -2 )
{
v18 += a3 - v20;
}
else
{
v15->addChild_1(v15, (cocos2d::CCNode *)v22);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v25,
(float)((float)(a5 + a7) * (float)v20) + (float)((float)(a7 * 0.5) + v17),
v16 - (float)((float)(int)v21 * (float)(a6 + a7)));
v23 = v22->__vftable;
v24 = cocos2d::CCNode::convertToNodeSpace(v15, &v27);
((void (__fastcall *)(struct cocos2d::CCObject *, struct cocos2d::CCPoint))v23[2].encodeWithCoder)(v22, v24);
++v18;
}
}
cocos2d::CCObject::autorelease(v11);
return v11;
}
else
{
((void (__fastcall *)(ListButtonPage *, __int64))v11->~ListButtonPage)(v11, 1);
return nullptr;
}
}