//
// GJGarageLayer::setupSpecialPage from 0x1003a1e68 to 0x1003a2370 (1288 bytes)
//
// 1 xrefs:
// > GJGarageLayer::setupPage @ 0x1003a1914
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:03:47 +0000
//
void *__fastcall GJGarageLayer::setupSpecialPage(_QWORD *a1)
{
__int64 v2; // x0
__n128 v3; // q0
__int64 v4; // x0
__int64 Items_1; // x20
_QWORD *v6; // x0
__int64 v7; // x0
__int64 v8; // x20
__int64 v9; // x21
__int64 v10; // x0
__n128 v11; // q0
__int64 v12; // x20
_QWORD *v13; // x20
__int64 v14; // x0
__int64 v15; // x20
__int64 v16; // x21
__int64 v17; // x0
__int64 v18; // x1
__int64 v19; // x2
__int64 v20; // x3
__int64 v21; // x4
__int64 v22; // x5
__int64 v23; // x6
__int64 v24; // x7
__int64 v25; // x20
void *result; // x0
void *v27; // x21
int v28; // w28
__int64 v29; // x22
__int64 v30; // x0
__int64 isIconUnlocked; // x0
int v32; // w24
__int64 v33; // x0
int ItemUnlockState; // w25
__int64 v35; // x26
__int64 v36; // x0
__int64 v37; // x0
_DWORD *v38; // x27
__int64 v39; // x0
float v40; // s9
__int64 v41; // x0
double v42; // d0
char v43; // [xsp+0h] [xbp-A0h]
float32x2_t v44; // [xsp+8h] [xbp-98h] BYREF
float32x2_t v45; // [xsp+10h] [xbp-90h] BYREF
float32x2_t v46; // [xsp+18h] [xbp-88h] BYREF
__int64 v47; // [xsp+20h] [xbp-80h] BYREF
__int64 v48; // [xsp+28h] [xbp-78h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
v3.n128_f64[0] = cocos2d::CCDirector::getWinSize(v2, &v48);
v4 = a1[71];
if ( v4 )
{
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)v4 + 536LL))(v4, v3.n128_f64[0]);
a1[71] = 0;
}
Items_1 = GJGarageLayer::getItems_1(a1, 99, v3);
sub_1000262BC((float *)&v47, *(float *)&v48 * 0.5, (float)((float)(*((float *)&v48 + 1) * 0.5) + -5.0) + -60.0);
v6 = ListButtonBar::create(Items_1, (double *)&v47, 12, 3, 1, 5.0, 5.0, 25.0, 220.0);
a1[71] = v6;
BoomScrollLayer::togglePageIndicators(v6[40], 0);
(*(void (__fastcall **)(_QWORD *, _QWORD, __int64))(*a1 + 464LL))(a1, a1[71], 100);
v7 = a1[70];
v8 = a1[68];
if ( v7 )
{
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 512LL))(v7);
v10 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[70] + 192LL))(a1[70]);
cocos2d::CCNode::convertToWorldSpace(v9, v10, &v47);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v8 + 184LL))(v8, &v47);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[68] + 344LL))(a1[68], 1);
}
else
{
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v8 + 344LL))(a1[68], 0);
}
v12 = GJGarageLayer::getItems_1(a1, 101, v11);
sub_1000262BC(
(float *)&v47,
*(float *)&v48 * 0.5,
(float)((float)((float)(*((float *)&v48 + 1) * 0.5) + -5.0) + -60.0) + -30.0);
v13 = ListButtonBar::create(v12, (double *)&v47, 12, 3, 1, 5.0, 5.0, 25.0, 220.0);
BoomScrollLayer::togglePageIndicators(v13[40], 0);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(*(_QWORD *)a1[71] + 464LL))(a1[71], v13, 100);
v14 = a1[70];
v15 = a1[69];
if ( v14 )
{
v16 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 512LL))(v14);
v17 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[70] + 192LL))(a1[70]);
cocos2d::CCNode::convertToWorldSpace(v16, v17, &v47);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 184LL))(v15, &v47);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[69] + 344LL))(a1[69], 1);
}
else
{
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v15 + 344LL))(a1[69], 0);
}
v25 = sub_100270434(0, v18, v19, v20, v21, v22, v23, v24, v43);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[71] + 464LL))(a1[71], v25, 1000);
sub_1000262BC(
(float *)&v47,
(float)((float)(*(float *)&v48 * 0.5) + -137.5) + -27.5,
(float)((float)((float)(*((float *)&v48 + 1) * 0.5) + -5.0) + -60.0) + -30.0);
cocos2d::CCNode::convertToWorldSpace(a1[71], (__int64)&v47, &v45);
cocos2d::CCNode::convertToNodeSpace(v25, (__int64)&v45, &v46);
result = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"playerSquare_001.png");
v27 = result;
v28 = 0;
v29 = 18;
do
{
v30 = GameManager::sharedState(result);
isIconUnlocked = GameManager::isIconUnlocked(v30, v29, 100);
v32 = isIconUnlocked;
v33 = GameStatsManager::sharedState(isIconUnlocked);
ItemUnlockState = GameStatsManager::getItemUnlockState(v33, v29, 12);
result = (void *)GJItemIcon::create(12, v29, 11513775, 0xFFFFFF, 0, 1, 1, 0xFFFFFF);
v35 = (__int64)result;
if ( v32 )
{
v36 = GameStatsManager::sharedState(result);
v37 = sub_1003D4738(v36, 12, v29);
result = (void *)sub_1003A2BE0(v35, v37);
}
if ( v35 )
{
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v35 + 160LL))(v35, 0.8);
v38 = CCMenuItemSpriteExtra::create(v35, 0, (__int64)a1, (__int64)sub_1003A2C94, 0);
v39 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v27 + 328LL))(v27);
(*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)v38 + 320LL))(v38, v39);
v40 = *(float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v38 + 328LL))(v38) * 0.5;
v41 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v38 + 328LL))(v38);
sub_1000262BC((float *)&v45, v40, *(float *)(v41 + 4) * 0.5);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v35 + 184LL))(v35, &v45);
(*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)v38 + 72LL))(v38, v29);
v38[124] = 100;
(*(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v25 + 456LL))(v25, v38);
sub_1000262BC((float *)&v44, (float)(30 * v28), 0.0);
*(float32x2_t *)&v42 = sub_100026318(&v46, &v44, &v45);
result = (void *)(*(__int64 (__fastcall **)(_DWORD *, float32x2_t *, double))(*(_QWORD *)v38 + 184LL))(
v38,
&v45,
v42);
++v28;
if ( (v32 & 1) == 0 )
{
if ( ItemUnlockState )
result = (void *)GJItemIcon::changeToLockedState(v35, 1.25);
else
result = (void *)GJItemIcon::darkenStoreItem(v35, 3289650);
}
}
v29 = (unsigned int)(v29 + 1);
}
while ( (_DWORD)v29 != 21 );
return result;
}