//
// BoomScrollLayer::init from 0x140040b60 to 0x140040ebe (862 bytes)
//
// 2 xrefs:
// > BoomScrollLayer::create @ 0x140040b0c
// > ??> @ 0x14090f488
//
// 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 11:25:29 +0000
//
// Hidden C++ exception states: #wind=1
bool __fastcall BoomScrollLayer::init(__int64 a1, cocos2d::CCObject *a2, __int64 a3, char a4, __int64 a5, __int64 a6)
{
bool result; // al
cocos2d::CCLayer *v10; // rbx
signed int v11; // esi
__int64 v12; // rdx
__int64 v13; // rax
float *v14; // rax
__int64 v15; // rax
__int64 v16; // rax
float v17; // xmm6_4
__int64 v18; // rax
float *WinSize; // rax
__int64 v20; // rax
struct cocos2d::CCSpriteBatchNode *v21; // r14
__int64 v22; // rcx
cocos2d::CCObject *v23; // rax
cocos2d::CCArray *v24; // rcx
struct cocos2d::CCObject *v25; // rbx
cocos2d::CCLayer *v26; // [rsp+30h] [rbp-48h] BYREF
_BYTE v27[8]; // [rsp+38h] [rbp-40h] BYREF
_BYTE v28[16]; // [rsp+40h] [rbp-38h] BYREF
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( result )
{
v10 = (cocos2d::CCLayer *)operator new(0x1A0u);
v26 = v10;
cocos2d::CCLayer::CCLayer(v10);
*(_QWORD *)v10 = &ExtendedLayer::`vftable';
*((_QWORD *)v10 + 40) = &ExtendedLayer::`vftable';
*((_QWORD *)v10 + 41) = &ExtendedLayer::`vftable';
*((_QWORD *)v10 + 42) = &ExtendedLayer::`vftable';
*((_QWORD *)v10 + 43) = &ExtendedLayer::`vftable';
*((_QWORD *)v10 + 44) = &ExtendedLayer::`vftable';
v11 = 0;
*((_QWORD *)v10 + 51) = 0;
if ( cocos2d::CCLayer::init(v10) )
{
cocos2d::CCObject::autorelease(v10);
}
else
{
(*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v10 + 8LL))(v10, 1);
v10 = nullptr;
}
*(_QWORD *)(a1 + 504) = v10;
(*(void (__fastcall **)(__int64, cocos2d::CCLayer *))(*(_QWORD *)a1 + 464LL))(a1, v10);
*(_DWORD *)(a1 + 28) = 4;
LOBYTE(v12) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v12);
*(_BYTE *)(a1 + 568) = 1;
*(_DWORD *)(a1 + 556) = 1109393408;
*(_DWORD *)(a1 + 560) = 1120403456;
v13 = cocos2d::CCDirector::sharedDirector();
*(_DWORD *)(a1 + 564) = *(_DWORD *)cocos2d::CCDirector::getWinSize(v13, &v26);
*(_BYTE *)(a1 + 569) = 1;
v14 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 320LL))(a1);
v15 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, *v14 * 0.5, 60.0);
cocos2d::CCPoint::operator=(a1 + 572, v15);
BoomScrollLayer::updateDots(a1);
*(_DWORD *)(a1 + 584) = -6908266;
*(_DWORD *)(a1 + 580) = -1;
v16 = cocos2d::CCDirector::sharedDirector();
v17 = *(float *)(cocos2d::CCDirector::getWinSize(v16, &v26) + 4);
v18 = cocos2d::CCDirector::sharedDirector();
WinSize = (float *)cocos2d::CCDirector::getWinSize(v18, v27);
v20 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v28, 0.0, 0.0, *WinSize, v17);
cocos2d::CCRect::operator=(a1 + 512, v20);
*(_QWORD *)(a1 + 588) = 0;
*(_DWORD *)(a1 + 528) = 1050253722;
*(_DWORD *)(a1 + 536) = 1053609165;
*(_DWORD *)(a1 + 532) = 1058642330;
*(_QWORD *)(a1 + 480) = a2;
cocos2d::CCObject::retain(a2);
v21 = cocos2d::CCSpriteBatchNode::create("smallDot.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSpriteBatchNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v21, 5);
BoomScrollLayer::updatePages(a1);
*(_BYTE *)(a1 + 436) = a4;
if ( a4 )
BoomScrollLayer::repositionPagesLooped(a1);
if ( a5 )
BoomScrollLayer::setupDynamicScrolling(a1, a5, a6);
v23 = (cocos2d::CCObject *)cocos2d::CCArray::create(v22);
*(_QWORD *)(a1 + 416) = v23;
cocos2d::CCObject::retain(v23);
while ( 1 )
{
v24 = *(_BYTE *)(a1 + 456) ? *(cocos2d::CCArray **)(a1 + 448) : *(cocos2d::CCArray **)(a1 + 480);
if ( v11 >= (int)cocos2d::CCArray::count(v24) )
break;
v25 = cocos2d::CCSprite::create("smallDot.png");
(*(void (__fastcall **)(struct cocos2d::CCSpriteBatchNode *, struct cocos2d::CCObject *))(*(_QWORD *)v21 + 464LL))(
v21,
v25);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 416), v25);
++v11;
}
cocos2d::CCNode::schedule(a1, BoomScrollLayer::updateDots);
return 1;
}
return result;
}