{"type": "func", "start": 5371829344, "end": 5371829501, "name": "LevelInfoLayer::onFavorite", "pseudocode": "// \n// LevelInfoLayer::onFavorite from 0x1402f9c60 to 0x1402f9cfd (157 bytes)\n// \n// 4 xrefs:\n// > LevelInfoLayer::init @ 0x1402f90ab\n// > <???> @ 0x1406908bc\n// > <???> @ 0x1406908cc\n// > <???> @ 0x1406d410c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid LevelInfoLayer::onFavorite(LevelInfoLayer *a1, cocos2d::CCObject *a2)\n{\n  GJGameLevel *m_level; // rcx\n  bool m_levelFavorited; // bp\n  const char *v4; // rbx\n  __int64 v5; // rcx\n  __int64 *v6; // rdi\n  __int64 v7; // rsi\n  cocos2d::CCSpriteFrameCache *v8; // rax\n  struct cocos2d::CCSpriteFrame *v9; // rax\n\n  if ( !a1->m_isBusy )\n  {\n    m_level = a1->m_level;\n    m_levelFavorited = m_level->m_levelFavorited;\n    m_level->m_levelFavorited = !m_levelFavorited;\n    v4 = \"gj_heartOff_001.png\";\n    v6 = (__int64 *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].copyWithZone)(a2);\n    v7 = *v6;\n    if ( !m_levelFavorited )\n      v4 = \"gj_heartOn_001.png\";\n    v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v5);\n    v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v8, v4);\n    (*(void (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v7 + 992))(v6, v9);\n  }\n}", "assembly": "; \n; LevelInfoLayer::onFavorite from 0x1402f9c60 to 0x1402f9cfd (157 bytes)\n; \n; 4 xrefs:\n; > LevelInfoLayer::init @ 0x1402f90ab\n; > <???> @ 0x1406908bc\n; > <???> @ 0x1406908cc\n; > <???> @ 0x1406d410c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nsub     rsp, 28h                                                       ; +0x0, 0x1402f9c60\ncmp     byte ptr [rcx+1E0h], 0                                         ; +0x4, 0x1402f9c64\njnz     loc_1402F9CF8                                                  ; +0xb, 0x1402f9c6b\nmov     rcx, [rcx+1F0h]                                                ; +0x11, 0x1402f9c71\nmov     [rsp+28h+arg_0], rbx                                           ; +0x18, 0x1402f9c78\nmov     [rsp+28h+arg_8], rbp                                           ; +0x1d, 0x1402f9c7d\nmov     [rsp+28h+arg_10], rsi                                          ; +0x22, 0x1402f9c82\nmovzx   ebp, byte ptr [rcx+364h]                                       ; +0x27, 0x1402f9c87\ntest    bpl, bpl                                                       ; +0x2e, 0x1402f9c8e\nmov     [rsp+28h+var_8], rdi                                           ; +0x31, 0x1402f9c91\nsetz    al                                                             ; +0x36, 0x1402f9c96\nmov     [rcx+364h], al                                                 ; +0x39, 0x1402f9c99\nmov     rcx, rdx                                                       ; +0x3f, 0x1402f9c9f\nmov     rax, [rdx]                                                     ; +0x42, 0x1402f9ca2\ncall    qword ptr [rax+3A8h]                                           ; +0x45, 0x1402f9ca5\ntest    bpl, bpl                                                       ; +0x4b, 0x1402f9cab\nlea     rbx, aGjHeartoff001P; \"gj_heartOff_001.png\"                    ; +0x4e, 0x1402f9cae\nmov     rdi, rax                                                       ; +0x55, 0x1402f9cb5\nmov     rsi, [rax]                                                     ; +0x58, 0x1402f9cb8\nlea     rax, aGjHearton001Pn; \"gj_heartOn_001.png\"                     ; +0x5b, 0x1402f9cbb\ncmovz   rbx, rax                                                       ; +0x62, 0x1402f9cc2\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x66, 0x1402f9cc6\nmov     rcx, rax                                                       ; +0x6c, 0x1402f9ccc\nmov     rdx, rbx                                                       ; +0x6f, 0x1402f9ccf\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x72, 0x1402f9cd2\nmov     rdx, rax                                                       ; +0x78, 0x1402f9cd8\nmov     rcx, rdi                                                       ; +0x7b, 0x1402f9cdb\ncall    qword ptr [rsi+3E0h]                                           ; +0x7e, 0x1402f9cde\nmov     rdi, [rsp+28h+var_8]                                           ; +0x84, 0x1402f9ce4\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x89, 0x1402f9ce9\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x8e, 0x1402f9cee\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x93, 0x1402f9cf3\nadd     rsp, 28h                                                       ; +0x98, 0x1402f9cf8\nretn                                                                   ; +0x9c, 0x1402f9cfc", "xrefs": ["LevelInfoLayer::init @ 0x1402f90ab", "<???> @ 0x1406908bc", "<???> @ 0x1406908cc", "<???> @ 0x1406d410c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}