{"type": "func", "start": 4299956448, "end": 4299956741, "name": "EndLevelLayer::onRestartCheckpoint", "pseudocode": "// \n// EndLevelLayer::onRestartCheckpoint from 0x1004c20e0 to 0x1004c2205 (293 bytes)\n// \n// 1 xrefs:\n// > EndLevelLayer::customSetup @ 0x1004c1126\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 *v2; // rax\n  FMODAudioEngine *v3; // rax\n  FMODAudioEngine *v4; // rax\n  cocos2d::CCDelayTime *v5; // r14\n  cocos2d::CCCallFunc *v6; // rax\n  cocos2d::CCSequence *v7; // r14\n  void *v8[5]; // [rsp+8h] [rbp-28h] BYREF\n\n  if ( !a1->m_exiting )\n  {\n    a1->m_exiting = 1;\n    v2 = GameManager::sharedState();\n    if ( !GameManager::getGameVariable(v2, \"0024\") )\n      PlatformToolbox::hideCursor();\n    v3 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::clearAllAudio(v3);\n    v4 = FMODAudioEngine::sharedEngine();\n    strcpy((char *)v8, \" playSound_01.ogg\");\n    FMODAudioEngine::playEffect((__int64)v4, (__int64)v8, (__m128)0x3F800000u, 0.0, 0.30000001);\n    if ( ((__int64)v8[0] & 1) != 0 )\n      operator delete(v8[2]);\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    v5 = cocos2d::CCDelayTime::create(0.5);\n    v6 = cocos2d::CCCallFunc::create(a1->m_playLayer, (cocos2d::SEL_CallFunc)0x611uLL);\n    v7 = sub_1003B5760(v5, v6, 0);\n    ((void (__fastcall *)(cocos2d::CCSequence *, __int64))v7->setTag)(v7, 16);\n    cocos2d::CCNode::runAction(a1->m_playLayer, v7);\n  }\n}", "assembly": "; \n; EndLevelLayer::onRestartCheckpoint from 0x1004c20e0 to 0x1004c2205 (293 bytes)\n; \n; 1 xrefs:\n; > EndLevelLayer::customSetup @ 0x1004c1126\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\npush    rbp                                                            ; +0x0, 0x1004c20e0\nmov     rbp, rsp                                                       ; +0x1, 0x1004c20e1\npush    r14                                                            ; +0x4, 0x1004c20e4\npush    rbx                                                            ; +0x6, 0x1004c20e6\nsub     rsp, 20h                                                       ; +0x7, 0x1004c20e7\ncmp     byte ptr [rdi+26Bh], 0                                         ; +0xb, 0x1004c20eb\njnz     loc_1004C21FC                                                  ; +0x12, 0x1004c20f2\nmov     rbx, rdi                                                       ; +0x18, 0x1004c20f8\nmov     byte ptr [rdi+26Bh], 1                                         ; +0x1b, 0x1004c20fb\ncall    GameManager__sharedState                                       ; +0x22, 0x1004c2102\nlea     rsi, a0024; \"0024\"                                             ; +0x27, 0x1004c2107\nmov     rdi, rax                                                       ; +0x2e, 0x1004c210e\ncall    GameManager__getGameVariable                                   ; +0x31, 0x1004c2111\ntest    al, al                                                         ; +0x36, 0x1004c2116\njnz     short loc_1004C211F                                            ; +0x38, 0x1004c2118\ncall    PlatformToolbox__hideCursor                                    ; +0x3a, 0x1004c211a\ncall    FMODAudioEngine__sharedEngine                                  ; +0x3f, 0x1004c211f\nmov     rdi, rax                                                       ; +0x44, 0x1004c2124\ncall    FMODAudioEngine__clearAllAudio                                 ; +0x47, 0x1004c2127\ncall    FMODAudioEngine__sharedEngine                                  ; +0x4c, 0x1004c212c\nmov     [rbp+var_28], 20h ; ' '                                        ; +0x51, 0x1004c2131\nmovups  xmm0, xmmword ptr cs:aPlaysound01Ogg; \"playSound_01.ogg\"       ; +0x55, 0x1004c2135\nmovups  xmmword ptr [rbp+var_28+1], xmm0                               ; +0x5c, 0x1004c213c\nmov     [rbp+var_28+11h], 0                                            ; +0x60, 0x1004c2140\nlea     rsi, [rbp+var_28]                                              ; +0x64, 0x1004c2144\nmovss   xmm0, cs:alpha                                                 ; +0x68, 0x1004c2148\nmovss   xmm2, cs:dword_100815420                                       ; +0x70, 0x1004c2150\nxorps   xmm1, xmm1                                                     ; +0x78, 0x1004c2158\nmov     rdi, rax                                                       ; +0x7b, 0x1004c215b\ncall    FMODAudioEngine__playEffect                                    ; +0x7e, 0x1004c215e\ntest    [rbp+var_28], 1                                                ; +0x83, 0x1004c2163\njz      short loc_1004C2172                                            ; +0x87, 0x1004c2167\nmov     rdi, qword ptr [rbp+var_28+10h]; __p                           ; +0x89, 0x1004c2169\ncall    __ZdlPv; operator delete(void *)                               ; +0x8d, 0x1004c216d\nmov     rax, [rbx]                                                     ; +0x92, 0x1004c2172\nmov     rdi, rbx                                                       ; +0x95, 0x1004c2175\nxor     esi, esi                                                       ; +0x98, 0x1004c2178\ncall    qword ptr [rax+518h]                                           ; +0x9a, 0x1004c217a\nmov     rax, [rbx]                                                     ; +0xa0, 0x1004c2180\nmov     rdi, rbx                                                       ; +0xa3, 0x1004c2183\nxor     esi, esi                                                       ; +0xa6, 0x1004c2186\ncall    qword ptr [rax+3D8h]                                           ; +0xa8, 0x1004c2188\nmov     rax, [rbx]                                                     ; +0xae, 0x1004c218e\nmov     rdi, rbx                                                       ; +0xb1, 0x1004c2191\nxor     esi, esi                                                       ; +0xb4, 0x1004c2194\ncall    qword ptr [rax+430h]                                           ; +0xb6, 0x1004c2196\nmov     rax, [rbx]                                                     ; +0xbc, 0x1004c219c\nmov     rdi, rbx                                                       ; +0xbf, 0x1004c219f\nxor     esi, esi                                                       ; +0xc2, 0x1004c21a2\ncall    qword ptr [rax+420h]                                           ; +0xc4, 0x1004c21a4\nmovss   xmm0, cs:dword_100814FA8                                       ; +0xca, 0x1004c21aa\ncall    cocos2d__CCDelayTime__create                                   ; +0xd2, 0x1004c21b2\nmov     r14, rax                                                       ; +0xd7, 0x1004c21b7\nmov     rdi, [rbx+260h]                                                ; +0xda, 0x1004c21ba\nmov     esi, 611h                                                      ; +0xe1, 0x1004c21c1\nxor     edx, edx                                                       ; +0xe6, 0x1004c21c6\ncall    cocos2d__CCCallFunc__create                                    ; +0xe8, 0x1004c21c8\nmov     rdi, r14                                                       ; +0xed, 0x1004c21cd\nmov     rsi, rax                                                       ; +0xf0, 0x1004c21d0\nxor     edx, edx                                                       ; +0xf3, 0x1004c21d3\nxor     eax, eax                                                       ; +0xf5, 0x1004c21d5\ncall    sub_1003B5760                                                  ; +0xf7, 0x1004c21d7\nmov     r14, rax                                                       ; +0xfc, 0x1004c21dc\nmov     rax, [rax]                                                     ; +0xff, 0x1004c21df\nmov     rdi, r14                                                       ; +0x102, 0x1004c21e2\nmov     esi, 10h                                                       ; +0x105, 0x1004c21e5\ncall    qword ptr [rax+48h]                                            ; +0x10a, 0x1004c21ea\nmov     rdi, [rbx+260h]                                                ; +0x10d, 0x1004c21ed\nmov     rsi, r14                                                       ; +0x114, 0x1004c21f4\ncall    cocos2d__CCNode__runAction                                     ; +0x117, 0x1004c21f7\nadd     rsp, 20h                                                       ; +0x11c, 0x1004c21fc\npop     rbx                                                            ; +0x120, 0x1004c2200\npop     r14                                                            ; +0x121, 0x1004c2201\npop     rbp                                                            ; +0x123, 0x1004c2203\nretn                                                                   ; +0x124, 0x1004c2204", "xrefs": ["EndLevelLayer::customSetup @ 0x1004c1126"], "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"}