//
// CommentCell::onLike from 0x1400b7e00 to 0x1400b7f5d (349 bytes)
//
// 2 xrefs:
// > CommentCell::loadFromComment @ 0x1400b7931
// > ??> @ 0x1406c7c14
//
// 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
void CommentCell::onLike(CommentCell *a1, cocos2d::CCObject *a2)
{
bool m_accountComment; // al
_BOOL8 v4; // rdi
bool v5; // zf
GJComment *m_comment; // rax
int m_levelID; // esi
GameLevelManager *v8; // rcx
__int64 v9; // rcx
GJComment *v10; // rdx
GJAccountManager *v11; // rax
LikeItemLayer *v12; // rax
int v13; // [rsp+20h] [rbp-8h]
void *v14; // [rsp+30h] [rbp+8h]
void *v15; // [rsp+30h] [rbp+8h]
m_accountComment = a1->m_accountComment;
v4 = m_accountComment;
v5 = !m_accountComment;
m_comment = a1->m_comment;
if ( v5 )
m_levelID = m_comment->m_levelID;
else
m_levelID = m_comment->m_accountID;
if ( m_comment )
{
v8 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v14 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v8 = (GameLevelManager *)qword_1406C2EC0;
}
if ( !GameLevelManager::hasLikedItemFullCheck(
v8,
(LikeItemType)(v4 + 2),
a1->m_comment->m_commentID,
m_levelID,
v13) )
{
v9 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v15 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v9 = qword_1406C2ED8;
}
v10 = a1->m_comment;
if ( v10->m_userID != *(_DWORD *)(v9 + 652) - *(_DWORD *)(v9 + 656) )
{
if ( !v10->m_accountID
|| (v11 = GJAccountManager::sharedState(),
v10 = a1->m_comment,
v10->m_accountID != v11->m_accountID - v11->m_unkInt1) )
{
v12 = LikeItemLayer::create((LikeItemType)(v4 + 2), v10->m_commentID, m_levelID);
v12->m_likeDelegate = &a1->LikeItemDelegate;
v12->show(v12);
}
}
}
}
}