//
// MyStuffPopup::init from 0x1008a9790 to 0x1008a9e20 (1680 bytes)
//
// 1 xrefs:
// > MyStuffPopup::create @ 0x1008a67f9
//
// This function is hookable on this platform (idp: pc, 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 12:37:17 +0000
//
__int64 __fastcall MyStuffPopup::init(__int64 a1, __int64 a2)
{
unsigned int v2; // r14d
__int64 v3; // rax
void *v4; // r15
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
__int64 v9; // rax
void *v10; // r15
double v11; // xmm0_8
char *v12; // r15
void *v13; // r15
__int64 v14; // r12
__int128 v15; // xmm0
__int64 v16; // rsi
__int64 v17; // r12
__int64 v18; // rax
__int128 *v19; // rax
char v20; // al
__int64 v21; // rbx
unsigned int v22; // ebx
__int64 v23; // rax
__int128 *v24; // rax
char v25; // al
__int64 v26; // r14
__int64 v27; // rax
__int64 v28; // rax
__int128 *v29; // rax
char v30; // al
__int64 v31; // r14
__int64 v32; // rax
__int64 v33; // rax
__int128 *v34; // rax
char v35; // al
__int64 v36; // r14
__int64 v37; // rax
__int64 v38; // rax
__int128 *v39; // rax
char v40; // al
__int64 v41; // r14
__int64 v42; // rax
__int64 v43; // r14
__int64 v44; // r12
__int64 v45; // r15
char *v46; // rax
void *v47; // rbx
unsigned int v48; // r13d
const std::string::value_type *v49; // rdi
__int64 v50; // rbx
unsigned int v52; // [rsp+8h] [rbp-98h] BYREF
__int64 v53; // [rsp+10h] [rbp-90h] BYREF
void *v54; // [rsp+18h] [rbp-88h]
float v55; // [rsp+20h] [rbp-80h]
float v56; // [rsp+24h] [rbp-7Ch]
__int64 v57; // [rsp+28h] [rbp-78h]
__int128 v58; // [rsp+30h] [rbp-70h] BYREF
void *__p; // [rsp+40h] [rbp-60h]
unsigned __int8 v60; // [rsp+4Fh] [rbp-51h]
unsigned int v61[8]; // [rsp+50h] [rbp-50h] BYREF
LOBYTE(v2) = FLAlertLayer::init_1((_BYTE *)a1, 75) & (a2 != 0);
if ( (_BYTE)v2 == 1 )
{
*(_QWORD *)(a1 + 664) = a2;
cocos2d::CCObject::retain(a2);
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v53, v3);
v56 = *(float *)&v53 * 0.5;
v55 = 0.5 * *((float *)&v53 + 1);
sub_100278270((__int64)&v58, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v4 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"GJ_square01.png", (unsigned __int64 *)&v58);
v57 = a1;
sub_100278260((float *)&v58, 240.0, 100.0);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v4 + 320LL))(v4, &v58);
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(v57 + 584) + 464LL))(
*(_QWORD *)(v57 + 584),
v4,
0xFFFFFFFFLL);
sub_100278250((float *)&v58, v56, v55);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v4 + 184LL))(v4, &v58);
v9 = cocos2d::CCMenu::create((__int64)v4, (__int64)&v58, v5, v6, v7, v8);
*(_QWORD *)(v57 + 552) = v9;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v57 + 584) + 464LL))(
*(_QWORD *)(v57 + 584),
v9,
10);
v10 = cocos2d::CCLabelBMFont::create_3((__int64)"My Socials", (__int64)"goldFont.fnt");
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v10 + 160LL))(v10, 0.69999999);
*(float *)&v54 = v55 + 50.0;
sub_100278250((float *)&v58, v56, (float)(v55 + 50.0) + -22.0);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v10 + 184LL))(v10, &v58);
v11 = (*(double (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(v57 + 584) + 464LL))(
*(_QWORD *)(v57 + 584),
v10,
5);
v12 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_closeBtn_001.png", v11);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v12 + 160LL))(v12, 0.80000001);
v13 = CCMenuItemSpriteExtra::create((__int64)v12, 0, v57, (__int64)MyStuffPopup::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v13, 1.6);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v57 + 552) + 456LL))(*(_QWORD *)(v57 + 552), v13);
v14 = *(_QWORD *)(v57 + 552);
DWORD1(v15) = 0;
*(float *)&v15 = (float)(v56 + -120.0) + 4.0;
sub_100278250((float *)v61, *(float *)&v15, *(float *)&v54 + -4.0);
v16 = v14;
v17 = v57;
cocos2d::CCNode::convertToNodeSpace((double *)&v58, v16, v61);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v13 + 184LL))(v13, &v58);
v18 = *(_QWORD *)(v17 + 664);
if ( (*(_BYTE *)(v18 + 464) & 1) != 0 )
{
sub_10001AD30(&v58, *(const void **)(v18 + 480), *(_QWORD *)(v18 + 472));
v20 = v58;
if ( (v58 & 1) != 0 )
{
LABEL_4:
v21 = *((_QWORD *)&v58 + 1);
operator delete(__p);
if ( v21 )
goto LABEL_5;
goto LABEL_24;
}
}
else
{
v19 = (__int128 *)(v18 + 464);
__p = *((void **)v19 + 2);
v15 = *v19;
v58 = *v19;
v20 = v58;
if ( (v58 & 1) != 0 )
goto LABEL_4;
}
if ( v20 )
{
LABEL_5:
v61[0] = 0;
v22 = 1;
v23 = *(_QWORD *)(v17 + 664);
if ( (*(_BYTE *)(v23 + 488) & 1) == 0 )
goto LABEL_6;
goto LABEL_25;
}
LABEL_24:
v22 = 0;
v23 = *(_QWORD *)(v17 + 664);
if ( (*(_BYTE *)(v23 + 488) & 1) == 0 )
{
LABEL_6:
v24 = (__int128 *)(v23 + 488);
__p = *((void **)v24 + 2);
v15 = *v24;
v58 = *v24;
v25 = v58;
v60 = 1;
if ( (v58 & 1) != 0 )
goto LABEL_7;
goto LABEL_26;
}
LABEL_25:
sub_10001AD30(&v58, *(const void **)(v23 + 504), *(_QWORD *)(v23 + 496));
v25 = v58;
v60 = 1;
if ( (v58 & 1) != 0 )
{
LABEL_7:
v26 = *((_QWORD *)&v58 + 1);
operator delete(__p);
if ( !v26 )
goto LABEL_9;
goto LABEL_8;
}
LABEL_26:
if ( !v25 )
{
LABEL_9:
v28 = *(_QWORD *)(v17 + 664);
if ( (*(_BYTE *)(v28 + 512) & 1) != 0 )
{
sub_10001AD30(&v58, *(const void **)(v28 + 528), *(_QWORD *)(v28 + 520));
v30 = v58;
if ( (v58 & 1) != 0 )
{
LABEL_11:
v31 = *((_QWORD *)&v58 + 1);
operator delete(__p);
if ( !v31 )
goto LABEL_13;
goto LABEL_12;
}
}
else
{
v29 = (__int128 *)(v28 + 512);
__p = *((void **)v29 + 2);
v15 = *v29;
v58 = *v29;
v30 = v58;
if ( (v58 & 1) != 0 )
goto LABEL_11;
}
if ( !v30 )
{
LABEL_13:
v33 = *(_QWORD *)(v17 + 664);
if ( (*(_BYTE *)(v33 + 584) & 1) != 0 )
{
sub_10001AD30(&v58, *(const void **)(v33 + 600), *(_QWORD *)(v33 + 592));
v35 = v58;
if ( (v58 & 1) != 0 )
{
LABEL_15:
v36 = *((_QWORD *)&v58 + 1);
operator delete(__p);
if ( !v36 )
goto LABEL_17;
goto LABEL_16;
}
}
else
{
v34 = (__int128 *)(v33 + 584);
__p = *((void **)v34 + 2);
v15 = *v34;
v58 = *v34;
v35 = v58;
if ( (v58 & 1) != 0 )
goto LABEL_15;
}
if ( !v35 )
{
LABEL_17:
v38 = *(_QWORD *)(v17 + 664);
if ( (*(_BYTE *)(v38 + 560) & 1) != 0 )
{
sub_10001AD30(&v58, *(const void **)(v38 + 576), *(_QWORD *)(v38 + 568));
v40 = v58;
if ( (v58 & 1) != 0 )
{
LABEL_19:
v41 = *((_QWORD *)&v58 + 1);
operator delete(__p);
if ( !v41 )
goto LABEL_20;
goto LABEL_36;
}
}
else
{
v39 = (__int128 *)(v38 + 560);
__p = *((void **)v39 + 2);
v15 = *v39;
v58 = *v39;
v40 = v58;
if ( (v58 & 1) != 0 )
goto LABEL_19;
}
if ( !v40 )
{
LABEL_20:
v54 = sub_1007FE900();
if ( !v22 )
{
LABEL_42:
v50 = *(_QWORD *)(v17 + 552);
sub_100278250((float *)&v52, v56, v55 + -10.0);
cocos2d::CCNode::convertToNodeSpace((double *)&v58, v50, &v52);
GameToolbox::alignItemsHorisontally((__int64)v54, (unsigned __int64 *)&v58, 0, (__m128)0x41100000u);
return v60;
}
LABEL_37:
v43 = v22;
v44 = 0;
v45 = v57;
do
{
v48 = v61[v44];
v49 = "gj_ytIcon_001.png";
if ( v48 - 1 <= 3 )
v49 = off_100BAB5E0[v48 - 1];
v46 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v49, *(double *)&v15);
v47 = CCMenuItemSpriteExtra::create((__int64)v46, 0, v45, (__int64)MyStuffPopup::onSocialPage, 0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v47 + 72LL))(v47, v48);
*(_QWORD *)&v15 = 1067030938;
CCMenuItemSpriteExtra::setSizeMult((__int64)v47, 1.2);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v45 + 552) + 456LL))(*(_QWORD *)(v45 + 552), v47);
sub_1007FEBF0((__int64)v54, (__int64)v47);
++v44;
}
while ( v43 != v44 );
v17 = v57;
goto LABEL_42;
}
LABEL_36:
v42 = v22++;
v61[v42] = 3;
v54 = sub_1007FE900();
goto LABEL_37;
}
LABEL_16:
v37 = v22++;
v61[v37] = 4;
goto LABEL_17;
}
LABEL_12:
v32 = v22++;
v61[v32] = 2;
goto LABEL_13;
}
LABEL_8:
v27 = v22++;
v61[v27] = 1;
goto LABEL_9;
}
return v2;
}