//
// MyStuffPopup::init from 0xa55c40 to 0xa56248 (1544 bytes)
//
// 2 xrefs:
// > MyStuffPopup::create @ 0xa5639c
// > ??> @ 0x99df0
//
// 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 13:00:07 +0000
//
__int64 __fastcall MyStuffPopup::init(MyStuffPopup *this, GJUserScore *a2)
{
cocos2d::CCDirector *v4; // x0
cocos2d::CCDirector *v5; // x0
float v6; // s8
float v7; // s9
__int64 v8; // x20
void (__fastcall *v9)(__int64, _BYTE *); // x23
__int64 (__fastcall *v10)(__int64, _BYTE *); // x23
cocos2d::CCMenu *v11; // x0
__int64 v12; // x0
const char *v13; // x2
__int64 v14; // x20
void (__fastcall *v15)(__int64, _BYTE *); // x23
const char *v16; // x1
__int64 v17; // x20
__int64 v18; // x20
cocos2d::CCNode *v19; // x25
void (__fastcall *v20)(__int64, __int64 *); // x23
__int64 v21; // x0
__int64 v22; // x1
__int64 v23; // x23
int v24; // w20
__int64 v25; // x0
__int64 v26; // x1
__int64 v27; // x23
__int64 v28; // x0
__int64 v29; // x1
__int64 v30; // x23
__int64 v31; // x0
__int64 v32; // x1
__int64 v33; // x23
__int64 v34; // x0
__int64 v35; // x1
cocos2d::CCArray *v36; // x0
__int64 v37; // x23
const char *v38; // x1
cocos2d::CCArray *v39; // x25
__int64 v40; // x28
unsigned int v41; // w24
char *v42; // x0
__int64 v43; // x0
cocos2d::CCObject *v44; // x27
cocos2d::CCNode *v45; // x19
__int64 v47; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v48; // [xsp+B0h] [xbp+B0h] BYREF
_BYTE v49[16]; // [xsp+B8h] [xbp+B8h] BYREF
_DWORD v50[6]; // [xsp+C8h] [xbp+C8h]
__int64 v51; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v52; // [xsp+E8h] [xbp+E8h]
void *v53; // [xsp+F0h] [xbp+F0h]
if ( (a2 == nullptr) < (unsigned int)(unsigned __int8)FLAlertLayer::init(this, 75) )
{
*((_QWORD *)this + 83) = a2;
v4 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(a2);
v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize(&v47, v5);
v6 = *(float *)&v47 * 0.5;
v7 = *((float *)&v47 + 1) * 0.5;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v49, 0.0, 0.0, 80.0, 80.0);
v8 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v49);
v9 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v49, 240.0, 100.0);
v9(v8, v49);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v8,
0xFFFFFFFFLL);
v10 = *(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v49, v6, v7);
v11 = (cocos2d::CCMenu *)v10(v8, v49);
v12 = cocos2d::CCMenu::create(v11);
*((_QWORD *)this + 69) = v12;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v12,
10);
v14 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"My Socials", "goldFont.fnt", v13);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v14 + 160LL))(v14, 0.7);
v15 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v14 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v49, v6, (float)(v7 + 50.0) - 22.0);
v15(v14, v49);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v14,
5);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v16);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 160LL))(v17, 0.8);
v18 = CCMenuItemSpriteExtra::create(v17, 0, (__int64)this, (__int64)MyStuffPopup::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v18, 1.6);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v18);
v19 = *((cocos2d::CCNode **)this + 69);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v49, (float)(v6 - 120.0) + 4.0, (float)(v7 + 50.0) - 4.0);
cocos2d::CCNode::convertToNodeSpace(&v48, v19, (const cocos2d::CCPoint *)v49);
v20(v18, &v48);
v51 = 0;
v21 = *((_QWORD *)this + 83);
v52 = 0;
v53 = nullptr;
if ( (*(_BYTE *)(v21 + 464) & 1) != 0 )
{
std::string::__init(&v51, *(void **)(v21 + 480), *(_QWORD *)(v21 + 472));
}
else
{
v22 = *(_QWORD *)(v21 + 472);
v51 = *(_QWORD *)(v21 + 464);
v52 = v22;
v53 = *(void **)(v21 + 480);
}
v23 = (unsigned __int8)v51 >> 1;
if ( (v51 & 1) != 0 )
{
v23 = v52;
operator delete(v53);
}
v24 = 0;
if ( v23 )
{
v50[0] = 0;
v24 = 1;
}
v25 = *((_QWORD *)this + 83);
v51 = 0;
v52 = 0;
v53 = nullptr;
if ( (*(_BYTE *)(v25 + 488) & 1) != 0 )
{
std::string::__init(&v51, *(void **)(v25 + 504), *(_QWORD *)(v25 + 496));
}
else
{
v26 = *(_QWORD *)(v25 + 496);
v51 = *(_QWORD *)(v25 + 488);
v52 = v26;
v53 = *(void **)(v25 + 504);
}
v27 = (unsigned __int8)v51 >> 1;
if ( (v51 & 1) != 0 )
{
v27 = v52;
operator delete(v53);
}
if ( v27 )
v50[v24++] = 1;
v28 = *((_QWORD *)this + 83);
v51 = 0;
v52 = 0;
v53 = nullptr;
if ( (*(_BYTE *)(v28 + 512) & 1) != 0 )
{
std::string::__init(&v51, *(void **)(v28 + 528), *(_QWORD *)(v28 + 520));
}
else
{
v29 = *(_QWORD *)(v28 + 520);
v51 = *(_QWORD *)(v28 + 512);
v52 = v29;
v53 = *(void **)(v28 + 528);
}
v30 = (unsigned __int8)v51 >> 1;
if ( (v51 & 1) != 0 )
{
v30 = v52;
operator delete(v53);
}
if ( v30 )
v50[v24++] = 2;
v31 = *((_QWORD *)this + 83);
v51 = 0;
v52 = 0;
v53 = nullptr;
if ( (*(_BYTE *)(v31 + 584) & 1) != 0 )
{
std::string::__init(&v51, *(void **)(v31 + 600), *(_QWORD *)(v31 + 592));
}
else
{
v32 = *(_QWORD *)(v31 + 592);
v51 = *(_QWORD *)(v31 + 584);
v52 = v32;
v53 = *(void **)(v31 + 600);
}
v33 = (unsigned __int8)v51 >> 1;
if ( (v51 & 1) != 0 )
{
v33 = v52;
operator delete(v53);
}
if ( v33 )
v50[v24++] = 4;
v34 = *((_QWORD *)this + 83);
v51 = 0;
v52 = 0;
v53 = nullptr;
if ( (*(_BYTE *)(v34 + 560) & 1) != 0 )
{
std::string::__init(&v51, *(void **)(v34 + 576), *(_QWORD *)(v34 + 568));
}
else
{
v35 = *(_QWORD *)(v34 + 568);
v51 = *(_QWORD *)(v34 + 560);
v52 = v35;
v53 = *(void **)(v34 + 576);
}
v36 = (cocos2d::CCArray *)(unsigned __int8)v51;
v37 = (unsigned __int8)v51 >> 1;
if ( (v51 & 1) != 0 )
{
v37 = v52;
operator delete(v53);
}
if ( v37 )
{
v50[v24++] = (unsigned int)&dword_0 + 3;
v39 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)((char *)&dword_0 + 3));
}
else
{
v39 = (cocos2d::CCArray *)cocos2d::CCArray::create(v36);
if ( !v24 )
{
LABEL_36:
v45 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v49, v6, v7 - 10.0);
cocos2d::CCNode::convertToNodeSpace(&v48, v45, (const cocos2d::CCPoint *)v49);
GameToolbox::alignItemsHorisontally((__int64)v39, (__int64)&v48, 0, 9.0);
return 1;
}
}
v40 = 0;
do
{
v41 = v50[v40];
switch ( v41 )
{
case 1u:
v42 = "gj_twIcon_001.png";
break;
case 2u:
v42 = "gj_twitchIcon_001.png";
break;
case 3u:
v42 = "gj_instaIcon_001.png";
break;
case 4u:
v42 = "gj_tiktokIcon_001.png";
break;
default:
v42 = "gj_ytIcon_001.png";
break;
}
v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v42, v38);
++v40;
v44 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v43,
0,
(__int64)this,
(__int64)MyStuffPopup::onSocialPage,
0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v44 + 72LL))(v44, v41);
CCMenuItemSpriteExtra::setSizeMult((__int64)v44, 1.2);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
v44);
cocos2d::CCArray::addObject(v39, v44);
}
while ( v24 > (int)v40 );
goto LABEL_36;
}
return 0;
}