//
// LevelInfoLayer::updateSideButtons from 0x10002bcc8 to 0x10002be60 (408 bytes)
//
// 4 xrefs:
// > LevelInfoLayer::init @ 0x100028a84
// > LevelInfoLayer::rateLevelClosed @ 0x10002e51c
// > sub_10002E520 @ 0x10002e524
// > LevelInfoLayer::likedItem @ 0x10002e554
//
// This function is hookable on this platform (idp: arm, 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 10:57:28 +0000
//
__int64 __fastcall LevelInfoLayer::updateSideButtons(__int64 a1)
{
__int64 v2; // x0
__int64 result; // x0
__int64 v4; // x20
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x20
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x0
__int64 v12; // x19
__int64 v13; // x0
__int64 v14; // x1
v2 = GameLevelManager::sharedState(a1);
result = sub_1000CC360(
v2,
1,
(unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 504) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 332LL)),
0);
if ( (_DWORD)result )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 520) + 1056LL))(*(_QWORD *)(a1 + 520), 0);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 520) + 1072LL))(*(_QWORD *)(a1 + 520));
v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v6 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v5, "GJ_like2Btn2_001.png");
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 1160LL))(v4, v6);
}
if ( *(_QWORD *)(a1 + 528) )
{
v7 = GameLevelManager::sharedState(result);
result = sub_1000BB43C(
v7,
(unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 504) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 332LL)));
if ( (_DWORD)result )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 528) + 1056LL))(*(_QWORD *)(a1 + 528), 0);
v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 528) + 1072LL))(*(_QWORD *)(a1 + 528));
v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, "GJ_starBtn2_001.png");
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1160LL))(v8, v10);
}
}
if ( *(_QWORD *)(a1 + 536) )
{
result = GameManager::sharedState(result);
if ( (unsigned int)(*(_DWORD *)(result + 1036) - *(_DWORD *)(result + 1032)) <= 0xFFFFFFFD )
{
result = GameManager::sharedState(result);
if ( (*(_BYTE *)(result + 1044) & 1) == 0 )
{
v11 = GameLevelManager::sharedState(result);
result = sub_1000BB664(
v11,
(unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 504) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 332LL)));
if ( (_DWORD)result )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 536) + 1056LL))(*(_QWORD *)(a1 + 536), 0);
v12 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 536) + 1072LL))(*(_QWORD *)(a1 + 536));
v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, "GJ_rateDiffBtn2_001.png");
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 1160LL))(v12, v14);
}
}
}
}
return result;
}