//
// LevelListLayer::updateSideButtons from 0x140307bb0 to 0x140307caf (255 bytes)
//
// 3 xrefs:
// > LevelListLayer::init @ 0x140305008
// > LevelListLayer::likedItem @ 0x140307b7a
// > ??> @ 0x1406d4550
//
// 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=1
void LevelListLayer::updateSideButtons(LevelListLayer *a1)
{
GameLevelManager *v2; // rbx
int m_listID; // esi
cocos2d::CCNode *v4; // rbx
cocos2d::CCNode_vtbl *v5; // rdi
__int64 v6; // rcx
cocos2d::CCSpriteFrameCache *v7; // rax
struct cocos2d::CCSpriteFrame *v8; // rax
void *v9; // [rsp+40h] [rbp+8h]
if ( a1->m_likeButton )
{
v2 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v9 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v2 = (GameLevelManager *)qword_1406C2EC0;
}
m_listID = a1->m_levelList->m_listID;
if ( GameLevelManager::hasLikedAccountItem(v2, (LikeItemType)4, m_listID, 1, 0)
|| GameLevelManager::hasLikedAccountItem(v2, (LikeItemType)4, m_listID, 0, 0) )
{
a1->m_likeButton->setEnabled(a1->m_likeButton, 0);
v4 = a1->m_likeButton->getNormalImage(a1->m_likeButton);
v5 = v4->__vftable;
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6);
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, "GJ_like2Btn2_001.png");
((void (__fastcall *)(cocos2d::CCNode *, struct cocos2d::CCSpriteFrame *))v5[1].setScaleX)(v4, v8);
}
}
}