//
// NCSInfoLayer::init from 0x1001fb550 to 0x1001fbbc8 (1656 bytes)
//
// 1 xrefs:
// > NCSInfoLayer::create @ 0x1001f96dc
//
// 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:26:50 +0000
//
__int64 __fastcall NCSInfoLayer::init(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rax
__int64 v4; // r14
__int64 v5; // r14
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // r14
__int64 v9; // r15
_DWORD *v10; // r14
char *v11; // rax
__int64 v12; // r15
__int64 v13; // r12
char *v14; // rax
char *v15; // rax
char *v16; // rax
__int64 v17; // r14
__int64 v18; // r13
__int64 v19; // r13
__int64 v20; // rbx
__int64 v21; // [rsp+8h] [rbp-78h]
__int64 v22; // [rsp+10h] [rbp-70h]
_QWORD v23[2]; // [rsp+18h] [rbp-68h] BYREF
void *__p; // [rsp+28h] [rbp-58h]
_BYTE v25[8]; // [rsp+34h] [rbp-4Ch] BYREF
_BYTE v26[16]; // [rsp+3Ch] [rbp-44h] BYREF
float v27; // [rsp+4Ch] [rbp-34h] BYREF
float v28; // [rsp+50h] [rbp-30h]
unsigned __int8 v29; // [rsp+57h] [rbp-29h]
result = FLAlertLayer::init_1(a1, 75);
if ( (_BYTE)result )
{
v29 = result;
*(_QWORD *)(a1 + 672) = a2;
*(_BYTE *)(a1 + 596) = 1;
v3 = cocos2d::CCDirector::sharedDirector(a1, 75);
cocos2d::CCDirector::getWinSize(&v27, v3);
sub_100278270(v26, 0.0, 0.0, COERCE_DOUBLE(1117782016), COERCE_DOUBLE(1117782016));
v4 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square02.png", v26);
sub_100278260(v26, COERCE_DOUBLE(1138491392), COERCE_DOUBLE(1133576192));
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 320LL))(v4, v26);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v4,
0xFFFFFFFFLL);
sub_100278250(v26, v27 * 0.5, v28 * 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 184LL))(v4, v26);
v5 = cocos2d::CCSprite::createWithSpriteFrameName("ncs_large_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v5 + 160LL))(v5, 1.2);
sub_100278250(v26, v27 * 0.5, (float)((float)(v28 * 0.5) + 145.0) + -38.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v5 + 184LL))(v5, v26);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v5);
v6 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v6;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v6, 10);
v7 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v8 = CCMenuItemSpriteExtra::create(v7, 0, a1, NewgroundsInfoLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v8, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v8);
v9 = *(_QWORD *)(a1 + 552);
sub_100278250(v25, (float)((float)(v27 * 0.5) + -220.0) + 10.0, (float)((float)(v28 * 0.5) + 145.0) + -10.0);
cocos2d::CCNode::convertToNodeSpace(v26, v9, v25);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 184LL))(v8, v26);
__p = operator new(0x98u);
v23[0] = 153;
v23[1] = 146;
strcpy(
(char *)__p,
"All NCS catalogue is copyright free, allowing all content creators to monetise their content on pl"
"atforms like YouTube and Twitch!");
sub_100278250(v26, 0.5, 1.0);
v10 = (_DWORD *)TextArea::create(v23, "chatFont.fnt", v26, 0, 0, 1.0, 396.0, 22.0);
if ( (v23[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(_QWORD, _DWORD *))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v10);
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v10 + 160LL))(v10, 1.0);
sub_100278250(v26, v27 * 0.5, (float)(v28 * 0.5) + 35.0);
(*(void (__fastcall **)(_DWORD *, _BYTE *))(*(_QWORD *)v10 + 184LL))(v10, v26);
v10[162] = 1102053376;
v11 = ButtonSprite::create_1(
(__int64)"Open Library",
0x12Cu,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.75,
35.0);
v12 = CCMenuItemSpriteExtra::create(v11, 0, a1, NCSInfoLayer::onLibrary, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v12);
CCMenuItemSpriteExtra::setSizeMult(v12, 1.1);
v13 = *(_QWORD *)(a1 + 552);
sub_100278250(v25, v27 * 0.5, (float)(v28 * 0.5) + -50.0);
cocos2d::CCNode::convertToNodeSpace(v26, v13, v25);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 184LL))(v12, v26);
v14 = ButtonSprite::create_1(
(__int64)"Connect with NCS",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_05.png",
0.40000001,
25.0);
v21 = CCMenuItemSpriteExtra::create(v14, 0, a1, NCSInfoLayer::onNCS, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v21);
CCMenuItemSpriteExtra::setSizeMult(v21, 1.1);
v15 = ButtonSprite::create_1(
(__int64)"NCS.IO",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v22 = CCMenuItemSpriteExtra::create(v15, 0, a1, NCSInfoLayer::onNCSIO, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v22);
CCMenuItemSpriteExtra::setSizeMult(v22, 1.1);
v16 = ButtonSprite::create_1(
(__int64)"Usage Policy",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v17 = CCMenuItemSpriteExtra::create(v16, 0, a1, NCSInfoLayer::onNCSUsage, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v17);
CCMenuItemSpriteExtra::setSizeMult(v17, 1.1);
v18 = *(_QWORD *)(a1 + 552);
sub_100278250(
v25,
(float)((float)((float)(v27 * 0.5) + 220.0) + -72.0) + -80.0,
(float)((float)(v28 * 0.5) + -145.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace(v26, v18, v25);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v17 + 184LL))(v17, v26);
v19 = sub_1007FE900(v17);
sub_1007FEBF0(v19, v17);
sub_1007FEBF0(v19, v22);
sub_1007FEBF0(v19, v21);
v20 = *(_QWORD *)(a1 + 552);
sub_100278250(v25, v27 * 0.5, (float)((float)(0.5 * v28) + -145.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace(v26, v20, v25);
GameToolbox::alignItemsHorisontally(v19, v26, 0, 14.0);
return v29;
}
return result;
}