//
// GJCommentListLayer::init from 0x140291dd0 to 0x1402921da (1034 bytes)
//
// 2 xrefs:
// > GJCommentListLayer::create @ 0x140291d8e
// > ??> @ 0x1406d19e8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
bool GJCommentListLayer::init(
GJCommentListLayer *a1,
BoomListView *a2,
const char *a3,
cocos2d::ccColor4B a4,
float a5,
float a6,
bool a7)
{
bool result; // al
__int64 v10; // rcx
__int64 v11; // rax
cocos2d::CCTouchDispatcher *v12; // rax
const char *v13; // rdx
size_t v14; // rbx
size_t v15; // r8
const char *v16; // rdx
void **v17; // rcx
cocos2d::CCSprite *v18; // rdi
cocos2d::CCSprite_vtbl *v19; // rbx
double v20; // xmm0_8
const cocos2d::CCPoint *v21; // rax
void **v22; // rcx
struct cocos2d::CCSprite *v23; // rdi
cocos2d::CCSprite_vtbl *v24; // rbx
__int64 v25; // rax
float v26; // xmm0_4
cocos2d::CCSprite_vtbl *v27; // rbx
double v28; // xmm0_8
const cocos2d::CCPoint *v29; // rax
void **v30; // rcx
struct cocos2d::CCSprite *v31; // rsi
cocos2d::CCSprite_vtbl *v32; // rbx
const cocos2d::CCPoint *v33; // rax
float v34; // xmm0_4
cocos2d::CCSprite_vtbl *v35; // rbx
__int64 v36; // rax
double v37; // xmm0_8
void **v38; // rcx
struct cocos2d::CCSprite *v39; // rdi
cocos2d::CCSprite_vtbl *v40; // rbx
const cocos2d::CCPoint *v41; // rax
float v42; // xmm0_4
cocos2d::CCSprite_vtbl *v43; // rbx
const cocos2d::CCPoint *v44; // rax
cocos2d::CCSprite_vtbl *v45; // rbx
void *v46; // rcx
void *v47; // rcx
cocos2d::ccColor4B v48; // [rsp+30h] [rbp-69h] BYREF
void *Block[2]; // [rsp+38h] [rbp-61h] BYREF
__m128i si128; // [rsp+48h] [rbp-51h]
void *v51[2]; // [rsp+58h] [rbp-41h] BYREF
__int128 v52; // [rsp+68h] [rbp-31h]
v48 = a4;
result = cocos2d::CCLayerColor::initWithColor(a1, &v48, a5, a6);
if ( result )
{
v11 = cocos2d::CCDirector::sharedDirector(v10);
v12 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 144LL))(v11);
cocos2d::CCTouchDispatcher::registerForcePrio(v12, a1, 2);
v13 = "GJ_commentTop_001.png";
if ( a7 )
v13 = "GJ_commentTop2_001.png";
*(_OWORD *)v51 = 0;
v52 = 0;
v14 = -1;
v15 = -1;
do
++v15;
while ( v13[v15] );
sub_14003A930(v51, v13, v15);
v16 = "GJ_commentSide_001.png";
if ( a7 )
v16 = "GJ_commentSide2_001.png";
*(_OWORD *)Block = 0;
si128 = 0;
do
++v14;
while ( v16[v14] );
sub_14003A930(Block, v16, v14);
v17 = v51;
if ( *((_QWORD *)&v52 + 1) > 0xFu )
v17 = (void **)v51[0];
v18 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v17);
cocos2d::CCSprite::setFlipY(v18, 1);
v19 = v18->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v20 = cocos2d::CCPoint::CCPoint(0.0, a5 * 0.5);
v19->setPosition_0(v18, v21);
a1->addChild_0(a1, v18, 10);
v22 = v51;
if ( *((_QWORD *)&v52 + 1) > 0xFu )
v22 = (void **)v51[0];
v23 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v22);
v24 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v20, a5 * 0.5);
v26 = ((float (__fastcall *)(struct cocos2d::CCSprite *, __int64))v24->setPosition_0)(v23, v25);
v27 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v28 = cocos2d::CCPoint::CCPoint(v26, 0.5);
v27->setAnchorPoint(v23, v29);
a1->addChild_0(a1, v23, 10);
v30 = Block;
if ( si128.m128i_i64[1] > 0xFuLL )
v30 = (void **)Block[0];
v31 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v30);
v32 = v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v28, 0.0);
v32->setAnchorPoint(v31, v33);
v34 = ((float (__fastcall *)(GJCommentListLayer *, struct cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v31, 9);
v35 = v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v34, -7.0);
v37 = ((double (__fastcall *)(struct cocos2d::CCSprite *, __int64))v35->setPosition_0)(v31, v36);
((void (__fastcall *)(struct cocos2d::CCSprite *))v31->setScaleY)(v31);
v38 = Block;
if ( si128.m128i_i64[1] > 0xFuLL )
v38 = (void **)Block[0];
v39 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v38);
v40 = v39->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v37, 1.0);
v40->setAnchorPoint(v39, v41);
v42 = ((float (__fastcall *)(GJCommentListLayer *, struct cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v39, 9);
v43 = v39->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v42, a5 + 7.0);
v43->setPosition_0(v39, v44);
v45 = v39->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v31->getScaleY(v31);
((void (__fastcall *)(struct cocos2d::CCSprite *))v45->setScaleY)(v39);
cocos2d::CCSprite::setFlipX(v39, 1);
if ( a2 )
{
a1->m_list = a2;
a1->addChild_0(a1, a2, 6);
}
if ( si128.m128i_i64[1] > 0xFuLL )
{
v46 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v46 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v46 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v46);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);
LOBYTE(Block[0]) = 0;
if ( *((_QWORD *)&v52 + 1) > 0xFu )
{
v47 = v51[0];
if ( (unsigned __int64)(*((_QWORD *)&v52 + 1) + 1LL) >= 0x1000 )
{
v47 = *((void **)v51[0] - 1);
if ( (unsigned __int64)((char *)v51[0] - (char *)v47 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v47);
}
return 1;
}
return result;
}