//
// LevelListLayer::onFavorite from 0x100349130 to 0x1003491ca (154 bytes)
//
// 1 xrefs:
// > LevelListLayer::init @ 0x1003487d1
//
// 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 12:28:46 +0000
//
__int64 __fastcall LevelListLayer::onFavorite(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rax
char v4; // r14
__int64 v5; // rbx
__int64 v6; // rax
const char *v7; // rsi
__int64 v8; // rax
double v9; // xmm0_8
__int64 v10; // rax
__int64 v11; // rsi
if ( !*(_BYTE *)(a1 + 952) )
{
v3 = *(_QWORD *)(a1 + 912);
v4 = *(_BYTE *)(v3 + 396);
*(_BYTE *)(v3 + 396) = v4 ^ 1;
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2);
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = "gj_heartOn_001.png";
if ( v4 )
v7 = "gj_heartOff_001.png";
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, v7);
v9 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 1160LL))(v5, v8);
v10 = GameLevelManager::sharedState(v9);
v11 = *(_QWORD *)(a1 + 912);
if ( v4 )
return GameLevelManager::deleteLevelList(v10, v11);
else
return GameLevelManager::saveLevelList(v10, v11);
}
return result;
}