//
// NCSInfoLayer::init from 0x982130 to 0x982778 (1608 bytes)
//
// 2 xrefs:
// > NCSInfoLayer::create @ 0x9828e8
// > ??> @ 0xaeac0
//
// 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 12:57:51 +0000
//
__int64 __fastcall NCSInfoLayer::init(cocos2d::CCNode **this, CustomSongLayer *a2)
{
unsigned __int8 v4; // w0
unsigned int v5; // w23
cocos2d::CCDirector *v7; // x0
__int64 v8; // x24
void (__fastcall *v9)(__int64, __int64 *); // x26
void (__fastcall *v10)(__int64, __int64 *); // x26
const char *v11; // x1
__int64 v12; // x24
void (__fastcall *v13)(__int64, __int64 *); // x26
cocos2d::CCMenu *v14; // x0
__int64 v15; // x0
const char *v16; // x1
__int64 v17; // x0
__int64 v18; // x24
cocos2d::CCNode *v19; // x27
void (__fastcall *v20)(__int64, __int64 *); // x26
float *v21; // x25
void (__fastcall *v22)(float *, __int64 *); // x24
const char *v23; // x6
__int64 v24; // x0
__int64 v25; // x25
cocos2d::CCNode *v26; // x27
void (__fastcall *v27)(__int64, __int64 *); // x26
const char *v28; // x6
__int64 v29; // x0
cocos2d::CCObject *v30; // x26
const char *v31; // x6
__int64 v32; // x0
cocos2d::CCObject *v33; // x27
const char *v34; // x6
__int64 v35; // x0
cocos2d::CCObject *v36; // x24
cocos2d::CCNode *v37; // x28
__int64 (__fastcall *v38)(cocos2d::CCObject *, __int64 *); // x25
cocos2d::CCArray *v39; // x0
cocos2d::CCArray *v40; // x25
cocos2d::CCNode *v41; // x19
__int64 v42; // [xsp+90h] [xbp+90h] BYREF
_BYTE v43[8]; // [xsp+98h] [xbp+98h] BYREF
__int64 v44[2]; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v45[2]; // [xsp+B0h] [xbp+B0h] BYREF
void *v46; // [xsp+C0h] [xbp+C0h]
v4 = FLAlertLayer::init((FLAlertLayer *)this, 75);
v5 = v4;
if ( v4 )
{
*(this + 84) = a2;
*((_BYTE *)this + 596) = (unsigned __int8)&dword_0 + 1;
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)((char *)&dword_0 + 1));
cocos2d::CCDirector::getWinSize(&v42, v7);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v44, 0.0, 0.0, 80.0, 80.0);
v8 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v44);
v9 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v8 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v44, 440.0, 290.0);
v9(v8, v44);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v8, 0xFFFFFFFFLL);
v10 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v8 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, *(float *)&v42 * 0.5, *((float *)&v42 + 1) * 0.5);
v10(v8, v44);
v12 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"ncs_large_001.png", v11);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, 1.2);
v13 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v12 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v44,
*(float *)&v42 * 0.5,
(float)((float)(*((float *)&v42 + 1) * 0.5) + 145.0) - 38.0);
v13(v12, v44);
v14 = (cocos2d::CCMenu *)(*(__int64 (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 73) + 456LL))(
*(this + 73),
v12);
v15 = cocos2d::CCMenu::create(v14);
*(this + 69) = (cocos2d::CCNode *)v15;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v15, 10);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v16);
v18 = CCMenuItemSpriteExtra::create(v17, 0, (__int64)this, (__int64)NewgroundsInfoLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v18, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v18);
v19 = *(this + 69);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
(float)((float)(*(float *)&v42 * 0.5) + -220.0) + 10.0,
(float)((float)(*((float *)&v42 + 1) * 0.5) + 145.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace(v44, v19, (const cocos2d::CCPoint *)v43);
v20(v18, v44);
v45[0] = 0;
v45[1] = 0;
v46 = nullptr;
std::string::__init(
v45,
"All NCS catalogue is copyright free, allowing all content creators to monetise their content on pl"
"atforms like YouTube and Twitch!",
0x92u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 0.5, 1.0);
v21 = (float *)TextArea::create((char *)v45, "chatFont.fnt", (const cocos2d::CCPoint *)v44, 0, 0, 1.0, 396.0, 22.0);
if ( (v45[0] & 1) != 0 )
operator delete(v46);
(*(void (__fastcall **)(_QWORD, float *))(*(_QWORD *)*(this + 73) + 456LL))(*(this + 73), v21);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v21 + 160LL))(v21, 1.0);
v22 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v21 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, *(float *)&v42 * 0.5, (float)(*((float *)&v42 + 1) * 0.5) + 35.0);
v22(v21, v44);
v21[162] = 22.0;
v24 = ButtonSprite::create(
(ButtonSprite *)"Open Library",
(const char *)&qword_128 + 4,
0,
0,
0.75,
"bigFont.fnt",
"GJ_button_01.png",
v23,
35.0);
v25 = CCMenuItemSpriteExtra::create(v24, 0, (__int64)this, (__int64)NCSInfoLayer::onLibrary, 0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v25);
CCMenuItemSpriteExtra::setSizeMult(v25, 1.1);
v26 = *(this + 69);
v27 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v25 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
*(float *)&v42 * 0.5,
(float)(*((float *)&v42 + 1) * 0.5) + -50.0);
cocos2d::CCNode::convertToNodeSpace(v44, v26, (const cocos2d::CCPoint *)v43);
v27(v25, v44);
v29 = ButtonSprite::create(
(ButtonSprite *)"Connect with NCS",
(const char *)&qword_C8,
0,
0,
0.4,
"bigFont.fnt",
"GJ_button_05.png",
v28,
25.0);
v30 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v29, 0, (__int64)this, (__int64)NCSInfoLayer::onNCS, 0);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v30);
CCMenuItemSpriteExtra::setSizeMult((__int64)v30, 1.1);
v32 = ButtonSprite::create(
(ButtonSprite *)"NCS.IO",
(const char *)&qword_C8,
0,
0,
0.4,
"bigFont.fnt",
"GJ_button_04.png",
v31,
25.0);
v33 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v32, 0, (__int64)this, (__int64)NCSInfoLayer::onNCSIO, 0);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v33);
CCMenuItemSpriteExtra::setSizeMult((__int64)v33, 1.1);
v35 = ButtonSprite::create(
(ButtonSprite *)"Usage Policy",
(const char *)&qword_C8,
0,
0,
0.4,
"bigFont.fnt",
"GJ_button_04.png",
v34,
25.0);
v36 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v35,
0,
(__int64)this,
(__int64)NCSInfoLayer::onNCSUsage,
0);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v36);
CCMenuItemSpriteExtra::setSizeMult((__int64)v36, 1.1);
v37 = *(this + 69);
v38 = *(__int64 (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v36 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
(float)((float)((float)(*(float *)&v42 * 0.5) + 220.0) - 72.0) - 80.0,
(float)((float)(*((float *)&v42 + 1) * 0.5) + -145.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace(v44, v37, (const cocos2d::CCPoint *)v43);
v39 = (cocos2d::CCArray *)v38(v36, v44);
v40 = (cocos2d::CCArray *)cocos2d::CCArray::create(v39);
cocos2d::CCArray::addObject(v40, v36);
cocos2d::CCArray::addObject(v40, v33);
cocos2d::CCArray::addObject(v40, v30);
v41 = *(this + 69);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
*(float *)&v42 * 0.5,
(float)((float)(*((float *)&v42 + 1) * 0.5) + -145.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace(v44, v41, (const cocos2d::CCPoint *)v43);
GameToolbox::alignItemsHorisontally((__int64)v40, (__int64)v44, 0, 14.0);
}
return v5;
}