{"type": "func", "start": 4297156572, "end": 4297156712, "name": "AchievementNotifier::willSwitchToScene", "pseudocode": "// \n// AchievementNotifier::willSwitchToScene from 0x1002167dc to 0x100216868 (140 bytes)\n// \n// 2 xrefs:\n// > AppDelegate::willSwitchToScene @ 0x10026980c\n// > sub_100269810 @ 0x100269830\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 __fastcall AchievementNotifier::willSwitchToScene(AchievementNotifier *a1, cocos2d::CCScene *a2)\n{\n  AchievementBar *m_activeAchievementBar; // x0\n\n  a1->m_nextScene = a2;\n  m_activeAchievementBar = a1->m_activeAchievementBar;\n  if ( m_activeAchievementBar )\n  {\n    if ( (cocos2d::CCScene *)((__int64 (__fastcall *)(AchievementBar *))m_activeAchievementBar->getParent)(m_activeAchievementBar) != a2 )\n    {\n      cocos2d::CCObject::retain(a1->m_activeAchievementBar);\n      ((void (__fastcall *)(AchievementBar *, _QWORD))a1->m_activeAchievementBar->removeFromParentAndCleanup)(\n        a1->m_activeAchievementBar,\n        0);\n      ((void (__fastcall *)(cocos2d::CCScene *, AchievementBar *, __int64))a2->addChild_0)(\n        a2,\n        a1->m_activeAchievementBar,\n        105);\n      cocos2d::CCObject::release(a1->m_activeAchievementBar);\n      cocos2d::CCNode::resumeSchedulerAndActions(a1->m_activeAchievementBar);\n    }\n  }\n}", "assembly": "; \n; AchievementNotifier::willSwitchToScene from 0x1002167dc to 0x100216868 (140 bytes)\n; \n; 2 xrefs:\n; > AppDelegate::willSwitchToScene @ 0x10026980c\n; > sub_100269810 @ 0x100269830\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\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x1002167dc\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x1002167e0\nADD             X29, SP, #0x10                                         ; +0x8, 0x1002167e4\nMOV             X19, X0                                                ; +0xc, 0x1002167e8\nSTR             X1, [X0,#0x140]                                        ; +0x10, 0x1002167ec\nLDR             X0, [X0,#0x150]                                        ; +0x14, 0x1002167f0\nCBZ             X0, loc_10021685C                                      ; +0x18, 0x1002167f4\nMOV             X20, X1                                                ; +0x1c, 0x1002167f8\nLDR             X8, [X0]                                               ; +0x20, 0x1002167fc\nLDR             X8, [X8,#0x1F0]                                        ; +0x24, 0x100216800\nBLR             X8                                                     ; +0x28, 0x100216804\nCMP             X0, X20                                                ; +0x2c, 0x100216808\nB.EQ            loc_10021685C                                          ; +0x30, 0x10021680c\nLDR             X0, [X19,#0x150]                                       ; +0x34, 0x100216810\nBL              cocos2d__CCObject__retain                              ; +0x38, 0x100216814\nLDR             X0, [X19,#0x150]                                       ; +0x3c, 0x100216818\nLDR             X8, [X0]                                               ; +0x40, 0x10021681c\nLDR             X8, [X8,#0x200]                                        ; +0x44, 0x100216820\nMOV             W1, #0                                                 ; +0x48, 0x100216824\nBLR             X8                                                     ; +0x4c, 0x100216828\nLDR             X1, [X19,#0x150]                                       ; +0x50, 0x10021682c\nLDR             X8, [X20]                                              ; +0x54, 0x100216830\nLDR             X8, [X8,#0x1C0]                                        ; +0x58, 0x100216834\nMOV             X0, X20                                                ; +0x5c, 0x100216838\nMOV             W2, #0x69 ; 'i'                                        ; +0x60, 0x10021683c\nBLR             X8                                                     ; +0x64, 0x100216840\nLDR             X0, [X19,#0x150]                                       ; +0x68, 0x100216844\nBL              cocos2d__CCObject__release                             ; +0x6c, 0x100216848\nLDR             X0, [X19,#0x150]                                       ; +0x70, 0x10021684c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x74, 0x100216850\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x78, 0x100216854\nB               cocos2d__CCNode__resumeSchedulerAndActions             ; +0x7c, 0x100216858\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x80, 0x10021685c\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x84, 0x100216860\nRET                                                                    ; +0x88, 0x100216864", "xrefs": ["AppDelegate::willSwitchToScene @ 0x10026980c", "sub_100269810 @ 0x100269830"], "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"}