//
// NewgroundsInfoLayer::init from 0x1001fabf0 to 0x1001fb36c (1916 bytes)
//
// 2 xrefs:
// > NewgroundsInfoLayer::create @ 0x1001f98b8
// > ??> @ 0x100ae2e10
//
// 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 NewgroundsInfoLayer::init(__int64 a1)
{
__int64 result; // rax
__int64 v2; // rax
__int64 v3; // r14
__int64 v4; // r15
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // r15
__int64 v8; // r12
__int64 v9; // r13
float v10; // xmm0_4
__int64 v11; // r15
__int64 v12; // r14
__int64 v13; // r12
__int64 v14; // r14
char *v15; // rax
char *v16; // rax
__int64 v17; // r15
char *v18; // rax
__int64 v19; // r13
char *v20; // rax
__int64 v21; // r12
__int64 v22; // r14
__int64 v23; // r15
__int64 v24; // rax
__int64 v25; // r14
__int64 v26; // rbx
float v27; // [rsp+4h] [rbp-5Ch]
float v28; // [rsp+8h] [rbp-58h]
__int64 v29; // [rsp+8h] [rbp-58h]
_BYTE v30[8]; // [rsp+14h] [rbp-4Ch] BYREF
_BYTE v31[16]; // [rsp+1Ch] [rbp-44h] BYREF
float v32; // [rsp+2Ch] [rbp-34h] BYREF
float v33; // [rsp+30h] [rbp-30h]
unsigned __int8 v34; // [rsp+37h] [rbp-29h]
result = FLAlertLayer::init_1(a1, 75);
if ( (_BYTE)result )
{
*(_BYTE *)(a1 + 596) = 1;
v34 = result;
v2 = cocos2d::CCDirector::sharedDirector(a1, 75);
cocos2d::CCDirector::getWinSize(&v32, v2);
sub_100278270(v31, 0.0, 0.0, COERCE_DOUBLE(1117782016), COERCE_DOUBLE(1117782016));
v3 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square02.png", v31);
sub_100278260(v31, COERCE_DOUBLE(1138491392), COERCE_DOUBLE(1133576192));
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v3 + 320LL))(v3, v31);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v3,
0xFFFFFFFFLL);
sub_100278250(v31, v32 * 0.5, v33 * 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v3 + 184LL))(v3, v31);
v4 = cocos2d::CCLabelBMFont::create_3("Newgrounds", "bigFont.fnt");
sub_100278250(v31, v32 * 0.5, (float)((float)(v33 * 0.5) + 145.0) + -28.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 184LL))(v4, v31);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v4);
v5 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v5;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v5, 10);
v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v7 = CCMenuItemSpriteExtra::create(v6, 0, a1, NewgroundsInfoLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v7, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v7);
v8 = *(_QWORD *)(a1 + 552);
sub_100278250(v30, (float)((float)(v32 * 0.5) + -220.0) + 10.0, (float)((float)(v33 * 0.5) + 145.0) + -10.0);
cocos2d::CCNode::convertToNodeSpace(v31, v8, v30);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 184LL))(v7, v31);
v9 = cocos2d::CCLabelBMFont::create_3("1. Find a song on Newgrounds.com", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, 0.64999998);
sub_100278250(v31, 0.0, 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 296LL))(v9, v31);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v9);
v28 = v32 * 0.5;
v27 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 328LL))(v9);
v10 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v9 + 168LL))(v9);
sub_100278250(v31, (float)((float)(v10 * (float)(v27 * -0.5)) + v28) + -2.0, (float)(v33 * 0.5) + 70.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v31);
v11 = cocos2d::CCLabelBMFont::create_3("2. Save the song ID", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.64999998);
sub_100278250(v31, 0.0, 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v11 + 296LL))(v11, v31);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v11);
v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 192LL))(v9);
sub_100278250(v30, 0.0, -30.0);
sub_100278350(v31, v12, v30);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v11 + 184LL))(v11, v31);
v13 = cocos2d::CCLabelBMFont::create_3("3. Enter the ID in the search box", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v13 + 160LL))(v13, 0.64999998);
sub_100278250(v31, 0.0, 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v13 + 296LL))(v13, v31);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v13);
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11);
sub_100278250(v30, 0.0, -30.0);
sub_100278350(v31, v14, v30);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v13 + 184LL))(v13, v31);
v15 = ButtonSprite::create_1(
(__int64)"Artists",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_02.png",
0.40000001,
25.0);
v29 = CCMenuItemSpriteExtra::create(v15, 0, a1, NewgroundsInfoLayer::onArtists, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v29);
CCMenuItemSpriteExtra::setSizeMult(v29, 1.1);
v16 = ButtonSprite::create_1(
(__int64)"Newgrounds",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.40000001,
25.0);
v17 = CCMenuItemSpriteExtra::create(v16, 0, a1, NewgroundsInfoLayer::onNewgrounds, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v17);
CCMenuItemSpriteExtra::setSizeMult(v17, 1.1);
v18 = ButtonSprite::create_1(
(__int64)"Guidelines",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_05.png",
0.40000001,
25.0);
v19 = CCMenuItemSpriteExtra::create(v18, 0, a1, NewgroundsInfoLayer::onGuidelines, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v19);
CCMenuItemSpriteExtra::setSizeMult(v19, 1.1);
v20 = ButtonSprite::create_1(
(__int64)"Support NG!",
0xC8u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_03.png",
0.40000001,
25.0);
v21 = CCMenuItemSpriteExtra::create(v20, 0, a1, NewgroundsInfoLayer::onSupporter, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v21);
CCMenuItemSpriteExtra::setSizeMult(v21, 1.1);
v22 = sub_1007FE900(v21);
sub_1007FEBF0(v22, v29);
sub_1007FEBF0(v22, v17);
sub_1007FEBF0(v22, v19);
sub_1007FEBF0(v22, v21);
v23 = *(_QWORD *)(a1 + 552);
sub_100278250(v30, v32 * 0.5, (float)((float)(v33 * 0.5) + -145.0) + 40.0);
cocos2d::CCNode::convertToNodeSpace(v31, v23, v30);
GameToolbox::alignItemsHorisontally(v22, v31, 0, 8.0);
v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_helpBtn2_001.png");
v25 = CCMenuItemSpriteExtra::create(v24, 0, a1, NewgroundsInfoLayer::onInfo, 0);
CCMenuItemSpriteExtra::setSizeMult(v25, 1.2);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v25);
v26 = *(_QWORD *)(a1 + 552);
sub_100278250(v30, (float)((float)(v32 * 0.5) + 220.0) + -27.0, (float)((float)(0.5 * v33) + 145.0) + -27.0);
cocos2d::CCNode::convertToNodeSpace(v31, v26, v30);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v25 + 184LL))(v25, v31);
return v34;
}
return result;
}