{"type": "func", "start": 4298077344, "end": 4298077648, "name": "EndLevelLayer::onRestartCheckpoint", "pseudocode": "// \n// EndLevelLayer::onRestartCheckpoint from 0x1002f74a0 to 0x1002f75d0 (304 bytes)\n// \n// 1 xrefs:\n// > EndLevelLayer::customSetup @ 0x1002f6650\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 EndLevelLayer::onRestartCheckpoint(EndLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  FMODAudioEngine *v4; // x0\n  FMODAudioEngine *v5; // x20\n  cocos2d::CCDelayTime *v6; // x20\n  char v7; // w0\n  __int64 v8; // x1\n  __int64 v9; // x2\n  __int64 v10; // x3\n  __int64 v11; // x4\n  __int64 v12; // x5\n  __int64 v13; // x6\n  __int64 v14; // x7\n  cocos2d::CCSequence *v15; // x20\n  void *__p[2]; // [xsp+18h] [xbp-28h] BYREF\n  char v17; // [xsp+2Fh] [xbp-11h]\n  cocos2d::SEL_CallFunc v18; // 0:x1.16\n\n  if ( !a1->m_exiting )\n  {\n    a1->m_exiting = 1;\n    v3 = GameManager::sharedState();\n    if ( !GameManager::getGameVariable(v3, \"0024\") )\n      PlatformToolbox::hideCursor();\n    v4 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::clearAllAudio(v4);\n    v5 = FMODAudioEngine::sharedEngine();\n    sub_100009900(__p, \"playSound_01.ogg\");\n    FMODAudioEngine::playEffect((__int64)v5, (__int64)__p, 1.0, 0.0, 0.3);\n    if ( v17 < 0 )\n      operator delete(__p[0]);\n    ((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->exitLayer)(a1, 0);\n    ((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setTouchEnabled)(a1, 0);\n    ((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setKeyboardEnabled)(a1, 0);\n    ((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n    v6 = cocos2d::CCDelayTime::create(0.5);\n    v18.ptr = (void (*)(void))1560;\n    v18.adj = 1;\n    v7 = (unsigned __int8)cocos2d::CCCallFunc::create(a1->m_playLayer, v18);\n    v15 = sub_10018A494(v6, v8, v9, v10, v11, v12, v13, v14, v7);\n    ((void (__fastcall *)(cocos2d::CCSequence *, __int64))v15->setTag)(v15, 16);\n    cocos2d::CCNode::runAction(a1->m_playLayer, v15);\n  }\n}", "assembly": "; \n; EndLevelLayer::onRestartCheckpoint from 0x1002f74a0 to 0x1002f75d0 (304 bytes)\n; \n; 1 xrefs:\n; > EndLevelLayer::customSetup @ 0x1002f6650\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             SP, SP, #0x50                                          ; +0x0, 0x1002f74a0\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x4, 0x1002f74a4\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x8, 0x1002f74a8\nADD             X29, SP, #0x40                                         ; +0xc, 0x1002f74ac\nLDRB            W8, [X0,#0x26B]                                        ; +0x10, 0x1002f74b0\nTBNZ            W8, #0, loc_1002F75C0                                  ; +0x14, 0x1002f74b4\nMOV             X19, X0                                                ; +0x18, 0x1002f74b8\nMOV             W8, #1                                                 ; +0x1c, 0x1002f74bc\nSTRB            W8, [X0,#0x26B]                                        ; +0x20, 0x1002f74c0\nBL              GameManager__sharedState                               ; +0x24, 0x1002f74c4\nADRL            X1, a0024; \"0024\"                                      ; +0x28, 0x1002f74c8\nBL              GameManager__getGameVariable                           ; +0x30, 0x1002f74d0\nTBNZ            W0, #0, loc_1002F74DC                                  ; +0x34, 0x1002f74d4\nBL              PlatformToolbox__hideCursor                            ; +0x38, 0x1002f74d8\nBL              FMODAudioEngine__sharedEngine                          ; +0x3c, 0x1002f74dc\nBL              FMODAudioEngine__clearAllAudio                         ; +0x40, 0x1002f74e0\nBL              FMODAudioEngine__sharedEngine                          ; +0x44, 0x1002f74e4\nMOV             X20, X0                                                ; +0x48, 0x1002f74e8\nADRL            X1, aPlaysound01Ogg; \"playSound_01.ogg\"                ; +0x4c, 0x1002f74ec\nADD             X0, SP, #0x40+__p; int                                 ; +0x54, 0x1002f74f4\nBL              sub_100009900                                          ; +0x58, 0x1002f74f8\nADRP            X8, #dword_100635360@PAGE                              ; +0x5c, 0x1002f74fc\nLDR             S2, [X8,#dword_100635360@PAGEOFF]                      ; +0x60, 0x1002f7500\nADD             X1, SP, #0x40+__p                                      ; +0x64, 0x1002f7504\nFMOV            S0, #1.0                                               ; +0x68, 0x1002f7508\nFMOV            S1, WZR                                                ; +0x6c, 0x1002f750c\nMOV             X0, X20                                                ; +0x70, 0x1002f7510\nBL              FMODAudioEngine__playEffect                            ; +0x74, 0x1002f7514\nLDRSB           W8, [SP,#0x40+var_11]                                  ; +0x78, 0x1002f7518\nTBZ             W8, #0x1F, loc_1002F7528                               ; +0x7c, 0x1002f751c\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x80, 0x1002f7520\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x1002f7524\nLDR             X8, [X19]                                              ; +0x88, 0x1002f7528\nLDR             X8, [X8,#0x518]                                        ; +0x8c, 0x1002f752c\nMOV             X0, X19                                                ; +0x90, 0x1002f7530\nMOV             X1, #0                                                 ; +0x94, 0x1002f7534\nBLR             X8                                                     ; +0x98, 0x1002f7538\nLDR             X8, [X19]                                              ; +0x9c, 0x1002f753c\nLDR             X8, [X8,#0x3D8]                                        ; +0xa0, 0x1002f7540\nMOV             X0, X19                                                ; +0xa4, 0x1002f7544\nMOV             W1, #0                                                 ; +0xa8, 0x1002f7548\nBLR             X8                                                     ; +0xac, 0x1002f754c\nLDR             X8, [X19]                                              ; +0xb0, 0x1002f7550\nLDR             X8, [X8,#0x430]                                        ; +0xb4, 0x1002f7554\nMOV             X0, X19                                                ; +0xb8, 0x1002f7558\nMOV             W1, #0                                                 ; +0xbc, 0x1002f755c\nBLR             X8                                                     ; +0xc0, 0x1002f7560\nLDR             X8, [X19]                                              ; +0xc4, 0x1002f7564\nLDR             X8, [X8,#0x420]                                        ; +0xc8, 0x1002f7568\nMOV             X0, X19                                                ; +0xcc, 0x1002f756c\nMOV             W1, #0                                                 ; +0xd0, 0x1002f7570\nBLR             X8                                                     ; +0xd4, 0x1002f7574\nFMOV            S0, #0.5                                               ; +0xd8, 0x1002f7578\nBL              cocos2d__CCDelayTime__create                           ; +0xdc, 0x1002f757c\nMOV             X20, X0                                                ; +0xe0, 0x1002f7580\nLDR             X0, [X19,#0x260]                                       ; +0xe4, 0x1002f7584\nMOV             W1, #0x618                                             ; +0xe8, 0x1002f7588\nMOV             W2, #1                                                 ; +0xec, 0x1002f758c\nBL              cocos2d__CCCallFunc__create                            ; +0xf0, 0x1002f7590\nSTP             X0, XZR, [SP,#0x40+var_40]                             ; +0xf4, 0x1002f7594\nMOV             X0, X20                                                ; +0xf8, 0x1002f7598\nBL              sub_10018A494                                          ; +0xfc, 0x1002f759c\nMOV             X20, X0                                                ; +0x100, 0x1002f75a0\nLDR             X8, [X0]                                               ; +0x104, 0x1002f75a4\nLDR             X8, [X8,#0x48]                                         ; +0x108, 0x1002f75a8\nMOV             W1, #0x10                                              ; +0x10c, 0x1002f75ac\nBLR             X8                                                     ; +0x110, 0x1002f75b0\nLDR             X0, [X19,#0x260]                                       ; +0x114, 0x1002f75b4\nMOV             X1, X20                                                ; +0x118, 0x1002f75b8\nBL              cocos2d__CCNode__runAction                             ; +0x11c, 0x1002f75bc\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x120, 0x1002f75c0\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x124, 0x1002f75c4\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x128, 0x1002f75c8\nRET                                                                    ; +0x12c, 0x1002f75cc", "xrefs": ["EndLevelLayer::customSetup @ 0x1002f6650"], "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"}