//
// LikeItemLayer::init from 0x1404689f0 to 0x140468dd8 (1000 bytes)
//
// 4 xrefs:
// > LikeItemLayer::create @ 0x1404689af
// > ??> @ 0x1408cdc98
// > ??> @ 0x1408cdca8
// > ??> @ 0x140927fbc
//
// 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:32:35 +0000
//
bool __fastcall LikeItemLayer::init(__int64 a1, int a2, int a3, int a4)
{
bool result; // al
__int64 v9; // rcx
__int64 v10; // rax
__int64 v11; // rax
__int64 *v12; // rdi
__int64 v13; // rbx
__int64 v14; // rax
__int64 v15; // rbx
__int64 v16; // rax
__int64 v17; // rcx
__int64 v18; // rax
__int64 v19; // rcx
struct cocos2d::CCSprite *v20; // rax
cocos2d::CCObject *v21; // rsi
__int64 v22; // rdi
__int64 v23; // rbx
__int64 v24; // rax
__int64 v25; // rax
struct cocos2d::CCSprite *v26; // rax
cocos2d::CCObject *v27; // rsi
struct cocos2d::CCSprite *v28; // rax
cocos2d::CCObject *v29; // r14
__int64 v30; // rdi
__int64 v31; // rbx
__int64 v32; // rax
__int64 v33; // rax
__int64 v34; // rdi
__int64 v35; // rbx
__int64 v36; // rax
__int64 v37; // rax
struct cocos2d::CCLabelBMFont *v38; // rdi
__int64 v39; // rbx
__int64 v40; // rax
float v41; // [rsp+30h] [rbp-38h] BYREF
float v42; // [rsp+34h] [rbp-34h]
_BYTE v43[8]; // [rsp+38h] [rbp-30h] BYREF
_BYTE v44[16]; // [rsp+40h] [rbp-28h] BYREF
result = FLAlertLayer::init_1(a1, 75);
if ( result )
{
*(_DWORD *)(a1 + 664) = a2;
*(_DWORD *)(a1 + 668) = a3;
*(_DWORD *)(a1 + 672) = a4;
v10 = cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v10, &v41);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v44, 0.0, 0.0, 80.0, 80.0);
v12 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v11);
v13 = *v12;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v43, 200.0, 115.0);
(*(void (__fastcall **)(__int64 *, __int64))(v13 + 312))(v12, v14);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v12,
0xFFFFFFFFLL);
v15 = *v12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v41 * 0.5, v42 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v15 + 184))(v12, v16);
v18 = cocos2d::CCMenu::create(v17);
v19 = *(_QWORD *)(a1 + 584);
*(_QWORD *)(a1 + 552) = v18;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v19 + 456LL))(v19, v18, 10);
v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
LODWORD(v15) = (_DWORD)v20;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v20 + 160LL))(v20);
v21 = CCMenuItemSpriteExtra::create(v15, 0, a1, (__int64)PagedListPopup::onClose);
*((_DWORD *)v21 + 93) = 1069547520;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v21);
v22 = *(_QWORD *)v21;
v23 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
(float)((float)(v41 * 0.5) - 100.0) + 5.0,
(float)((float)(v42 * 0.5) + 57.5) - 5.0);
cocos2d::CCNode::convertToNodeSpace(v23, v44, v24);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v22 + 184))(v21, v25);
v26 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likeBtn_001.png");
LODWORD(v23) = (_DWORD)v26;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v26 + 160LL))(v26);
v27 = CCMenuItemSpriteExtra::create(v23, 0, a1, (__int64)LikeItemLayer::onLike);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v27);
v28 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_dislikeBtn_001.png");
LODWORD(v23) = (_DWORD)v28;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v28 + 160LL))(v28);
v29 = CCMenuItemSpriteExtra::create(v23, 0, a1, (__int64)LikeItemLayer::onDislike);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v29);
v30 = *(_QWORD *)v27;
v31 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, (float)(v41 * 0.5) - 43.0, (float)(v42 * 0.5) - 15.0);
cocos2d::CCNode::convertToNodeSpace(v31, v43, v32);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v30 + 184))(v27, v33);
v34 = *(_QWORD *)v29;
v35 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, (float)(v41 * 0.5) + 43.0, (float)(v42 * 0.5) - 15.0);
cocos2d::CCNode::convertToNodeSpace(v35, v43, v36);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v34 + 184))(v29, v37);
v38 = cocos2d::CCLabelBMFont::create("Vote", (const char *)&qword_140704F78);
v39 = *(_QWORD *)v38;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, v41 * 0.5, (float)((float)(v42 * 0.5) + 57.5) - 20.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v39 + 184))(v38, v40);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v38);
return 1;
}
return result;
}