{"type": "func", "start": 4298076696, "end": 4298076936, "name": "EndLevelLayer::onReplay", "pseudocode": "// \n// EndLevelLayer::onReplay from 0x1002f7218 to 0x1002f7308 (240 bytes)\n// \n// 2 xrefs:\n// > EndLevelLayer::keyDown @ 0x1002f8ba0\n// > EndLevelLayer::customSetup @ 0x1002f645c\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::onReplay(EndLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  FMODAudioEngine *v4; // x0\n  FMODAudioEngine *v5; // x20\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v7; // [xsp+1Fh] [xbp-11h]\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 ( v7 < 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    PlayLayer::delayedFullReset(a1->m_playLayer);\n  }\n}", "assembly": "; \n; EndLevelLayer::onReplay from 0x1002f7218 to 0x1002f7308 (240 bytes)\n; \n; 2 xrefs:\n; > EndLevelLayer::keyDown @ 0x1002f8ba0\n; > EndLevelLayer::customSetup @ 0x1002f645c\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, #0x40                                          ; +0x0, 0x1002f7218\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x1002f721c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x1002f7220\nADD             X29, SP, #0x30                                         ; +0xc, 0x1002f7224\nLDRB            W8, [X0,#0x26B]                                        ; +0x10, 0x1002f7228\nTBNZ            W8, #0, loc_1002F72F8                                  ; +0x14, 0x1002f722c\nMOV             X19, X0                                                ; +0x18, 0x1002f7230\nMOV             W8, #1                                                 ; +0x1c, 0x1002f7234\nSTRB            W8, [X0,#0x26B]                                        ; +0x20, 0x1002f7238\nBL              GameManager__sharedState                               ; +0x24, 0x1002f723c\nADRL            X1, a0024; \"0024\"                                      ; +0x28, 0x1002f7240\nBL              GameManager__getGameVariable                           ; +0x30, 0x1002f7248\nTBNZ            W0, #0, loc_1002F7254                                  ; +0x34, 0x1002f724c\nBL              PlatformToolbox__hideCursor                            ; +0x38, 0x1002f7250\nBL              FMODAudioEngine__sharedEngine                          ; +0x3c, 0x1002f7254\nBL              FMODAudioEngine__clearAllAudio                         ; +0x40, 0x1002f7258\nBL              FMODAudioEngine__sharedEngine                          ; +0x44, 0x1002f725c\nMOV             X20, X0                                                ; +0x48, 0x1002f7260\nADRL            X1, aPlaysound01Ogg; \"playSound_01.ogg\"                ; +0x4c, 0x1002f7264\nADD             X0, SP, #0x30+__p; int                                 ; +0x54, 0x1002f726c\nBL              sub_100009900                                          ; +0x58, 0x1002f7270\nADRP            X8, #dword_100635360@PAGE                              ; +0x5c, 0x1002f7274\nLDR             S2, [X8,#dword_100635360@PAGEOFF]                      ; +0x60, 0x1002f7278\nADD             X1, SP, #0x30+__p                                      ; +0x64, 0x1002f727c\nFMOV            S0, #1.0                                               ; +0x68, 0x1002f7280\nFMOV            S1, WZR                                                ; +0x6c, 0x1002f7284\nMOV             X0, X20                                                ; +0x70, 0x1002f7288\nBL              FMODAudioEngine__playEffect                            ; +0x74, 0x1002f728c\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x78, 0x1002f7290\nTBZ             W8, #0x1F, loc_1002F72A0                               ; +0x7c, 0x1002f7294\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0x80, 0x1002f7298\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x1002f729c\nLDR             X8, [X19]                                              ; +0x88, 0x1002f72a0\nLDR             X8, [X8,#0x518]                                        ; +0x8c, 0x1002f72a4\nMOV             X0, X19                                                ; +0x90, 0x1002f72a8\nMOV             X1, #0                                                 ; +0x94, 0x1002f72ac\nBLR             X8                                                     ; +0x98, 0x1002f72b0\nLDR             X8, [X19]                                              ; +0x9c, 0x1002f72b4\nLDR             X8, [X8,#0x3D8]                                        ; +0xa0, 0x1002f72b8\nMOV             X0, X19                                                ; +0xa4, 0x1002f72bc\nMOV             W1, #0                                                 ; +0xa8, 0x1002f72c0\nBLR             X8                                                     ; +0xac, 0x1002f72c4\nLDR             X8, [X19]                                              ; +0xb0, 0x1002f72c8\nLDR             X8, [X8,#0x430]                                        ; +0xb4, 0x1002f72cc\nMOV             X0, X19                                                ; +0xb8, 0x1002f72d0\nMOV             W1, #0                                                 ; +0xbc, 0x1002f72d4\nBLR             X8                                                     ; +0xc0, 0x1002f72d8\nLDR             X8, [X19]                                              ; +0xc4, 0x1002f72dc\nLDR             X8, [X8,#0x420]                                        ; +0xc8, 0x1002f72e0\nMOV             X0, X19                                                ; +0xcc, 0x1002f72e4\nMOV             W1, #0                                                 ; +0xd0, 0x1002f72e8\nBLR             X8                                                     ; +0xd4, 0x1002f72ec\nLDR             X0, [X19,#0x260]                                       ; +0xd8, 0x1002f72f0\nBL              PlayLayer__delayedFullReset                            ; +0xdc, 0x1002f72f4\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xe0, 0x1002f72f8\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xe4, 0x1002f72fc\nADD             SP, SP, #0x40 ; '@'                                    ; +0xe8, 0x1002f7300\nRET                                                                    ; +0xec, 0x1002f7304", "xrefs": ["EndLevelLayer::keyDown @ 0x1002f8ba0", "EndLevelLayer::customSetup @ 0x1002f645c"], "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"}