//
// TabbedPopupLayer::createTabButtons from 0x72dae8 to 0x72ddce (742 bytes)
//
// 1 xrefs:
// > TabbedPopupLayer::createTabButtons @ 0x72de4e
//
// 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:58:17 +0000
//
int __fastcall TabbedPopupLayer::createTabButtons(
TabbedPopupLayer *this,
float a2,
float a3,
float a4,
float a5,
float a6,
float a7)
{
unsigned int v10; // r7
cocos2d::CCArray *WinSize; // r0
cocos2d::CCArray *i; // r9
int v14; // r2
int v15; // r5
int v16; // r0
ButtonSprite *v17; // r0
ButtonSprite *v18; // r0
float *v19; // r6
int v20; // r2
int v21; // r3
int v22; // r3
const cocos2d::CCSize *v23; // r0
const char *v24; // r1
int v25; // r0
cocos2d::CCSprite *v26; // r0
int v27; // r8
int v28; // r0
unsigned int v29; // r1
cocos2d::CCObject *v30; // r6
const cocos2d::CCPoint *v31; // r6
float v32; // s17
float v33; // s18
const char *v34; // r1
int v35; // r0
int v36; // r0
float v37; // s17
const cocos2d::CCPoint *v38; // r11
void (__fastcall *v39)(char *, _DWORD *); // r10
const char *v40; // r1
cocos2d::CCSprite *v41; // r8
int v42; // r0
int v43; // r5
const cocos2d::CCPoint *v44; // r8
int (__fastcall *v45)(int, _BYTE *); // r6
float v47; // [sp+10h] [bp-54h]
char *v48; // [sp+18h] [bp-4Ch]
void (__fastcall *v49)(int, _DWORD *); // [sp+24h] [bp-40h]
float v50[2]; // [sp+2Ch] [bp-38h] BYREF
_BYTE v51[8]; // [sp+34h] [bp-30h] BYREF
_BYTE v52[8]; // [sp+3Ch] [bp-28h] BYREF
int (__fastcall *v53)(TabbedPopupLayer *, cocos2d::CCObject *); // [sp+44h] [bp-20h]
int v54; // [sp+48h] [bp-1Ch]
float v55; // [sp+4Ch] [bp-18h] BYREF
float v56; // [sp+50h] [bp-14h]
_DWORD v57[2]; // [sp+54h] [bp-10h] BYREF
v10 = 0;
cocos2d::CCDirector::sharedDirector(this);
WinSize = (cocos2d::CCArray *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v50);
for ( i = (cocos2d::CCArray *)cocos2d::CCArray::create(WinSize); ; cocos2d::CCArray::addObject(i, v30) )
{
v14 = *((_DWORD *)this + 178);
if ( v10 >= -1171354717 * ((*((_DWORD *)this + 179) - v14) >> 2) )
break;
v15 = 44 * v10;
v16 = v14 + 44 * v10;
if ( (*(_BYTE *)v16 & 1) != 0 )
v17 = *(ButtonSprite **)(v16 + 8);
else
v17 = (ButtonSprite *)(v16 + 1);
v18 = ButtonSprite::create(
v17,
(const char *)(int)a3,
0,
a5,
0,
"bigFont.fnt",
"GJ_button_05.png",
(const char *)0x41C80000,
v47);
*((_DWORD *)v18 + 132) = 1066611507;
v19 = (float *)v18;
*((_DWORD *)v18 + 138) = 1050253722;
v20 = *((_DWORD *)this + 178) + v15;
v21 = *(unsigned __int8 *)(v20 + 12);
if ( (v21 & 1) != 0 )
v22 = *(_DWORD *)(v20 + 16);
else
v22 = v21 >> 1;
if ( v22 )
{
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)v18 + 134) + 172))(*((_DWORD *)v18 + 134), 0);
v23 = (const cocos2d::CCSize *)(*(int (__fastcall **)(float *))(*(_DWORD *)v19 + 164))(v19);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v55, v23);
v25 = *((_DWORD *)this + 178) + v15;
if ( (*(_BYTE *)(v25 + 12) & 1) != 0 )
v26 = *(cocos2d::CCSprite **)(v25 + 20);
else
v26 = (cocos2d::CCSprite *)(v25 + 13);
v27 = cocos2d::CCSprite::createWithSpriteFrameName(v26, v24);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1060320051);
v49 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, v55 * 0.5, (float)(v19[139] + (float)(v56 * 0.5)) - 1.0);
v49(v27, v57);
(*(void (__fastcall **)(float *, int, int))(*(_DWORD *)v19 + 232))(v19, v27, 1);
}
v53 = TabbedPopupLayer::onTab;
v54 = 0;
v28 = CCMenuItemSpriteExtra::create((int)v19, 0, (int)this, (int)TabbedPopupLayer::onTab, 0);
v29 = v10++;
v30 = (cocos2d::CCObject *)v28;
(*(void (__fastcall **)(int, unsigned int))(*(_DWORD *)v28 + 36))(v28, v29);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v30);
*(_DWORD *)(v15 + *((_DWORD *)this + 178) + 40) = v30;
}
v31 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v55, v50[0] * 0.5, a2);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v57, v31);
GameToolbox::alignItemsHorisontally(*(float *)&i, a4, (int)v57, 0);
v32 = v50[1];
v33 = a6 + (float)(*((float *)this + 139) * 0.5);
v35 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v34);
v55 = COERCE_FLOAT(TabbedPopupLayer::onTabPage);
v56 = 0.0;
v36 = CCMenuItemSpriteExtra::create(v35, 0, (int)this, (int)TabbedPopupLayer::onTabPage, 0);
v37 = v32 * 0.5;
*((_DWORD *)this + 186) = v36;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v36 + 36))(v36, -1);
CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 186), a7);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 186));
v38 = *((const cocos2d::CCPoint **)this + 111);
v48 = *((char **)this + 186);
v39 = *(void (__fastcall **)(char *, _DWORD *))(*(_DWORD *)v48 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v52, (float)(v50[0] * 0.5) - v33, v37);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v57, v38);
v39(v48, v57);
v41 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v40);
cocos2d::CCSprite::setFlipX(v41, 1);
v57[0] = TabbedPopupLayer::onTabPage;
v57[1] = 0;
v42 = CCMenuItemSpriteExtra::create((int)v41, 0, (int)this, (int)TabbedPopupLayer::onTabPage, 0);
*((_DWORD *)this + 187) = v42;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 36))(v42, 1);
CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 187), a7);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 187));
v43 = *((_DWORD *)this + 187);
v44 = *((const cocos2d::CCPoint **)this + 111);
v45 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v43 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v51, v33 + (float)(v50[0] * 0.5), v37);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v52, v44);
return v45(v43, v52);
}