{"type": "func", "start": 5369976000, "end": 5369976519, "name": "EndLevelLayer::onRestartCheckpoint", "pseudocode": "// \n// EndLevelLayer::onRestartCheckpoint from 0x1401354c0 to 0x1401356c7 (519 bytes)\n// \n// 2 xrefs:\n// > EndLevelLayer::customSetup @ 0x140133f63\n// > <???> @ 0x1406c9ef4\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 EndLevelLayer::onRestartCheckpoint(EndLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  cocos2d::CCEGLView *v4; // rax\n  FMODAudioEngine *v5; // rcx\n  __int64 v6; // r8\n  __int64 v7; // r9\n  int v8; // ecx\n  __int64 v9; // rbx\n  struct cocos2d::CCDelayTime *v10; // rax\n  struct cocos2d::CCSequence *v11; // rbx\n  cocos2d::ccColor3B *v12; // r8\n  float v13; // [rsp+20h] [rbp-38h]\n  __int128 v14; // [rsp+30h] [rbp-28h] BYREF\n  __int64 v15; // [rsp+40h] [rbp-18h]\n  __int64 v16; // [rsp+48h] [rbp-10h]\n  void *v17; // [rsp+60h] [rbp+8h]\n  FMODAudioEngine *v18; // [rsp+60h] [rbp+8h]\n  FMODAudioEngine *v19; // [rsp+70h] [rbp+18h]\n\n  if ( !a1->m_exiting )\n  {\n    a1->m_exiting = 1;\n    v3 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v17 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = (GameManager *)qword_1406C2ED8;\n    }\n    if ( !GameManager::getGameVariable(v3, \"0024\") )\n    {\n      v4 = (cocos2d::CCEGLView *)cocos2d::CCEGLView::sharedOpenGLView();\n      cocos2d::CCEGLView::showCursor(v4, 0);\n    }\n    v5 = (FMODAudioEngine *)qword_1406C2E88;\n    if ( !qword_1406C2E88 )\n    {\n      v18 = (FMODAudioEngine *)operator new(0x888u);\n      qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v18);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n      v5 = (FMODAudioEngine *)qword_1406C2E88;\n    }\n    FMODAudioEngine::clearAllAudio(v5);\n    v14 = 0;\n    *(_QWORD *)&v14 = sub_14003AA10(0x20u);\n    v15 = 16;\n    v16 = 31;\n    strcpy((char *)v14, \"playSound_01.ogg\");\n    v8 = qword_1406C2E88;\n    if ( !qword_1406C2E88 )\n    {\n      v19 = (FMODAudioEngine *)operator new(0x888u);\n      qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v19);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n      v8 = qword_1406C2E88;\n    }\n    FMODAudioEngine::playEffect(v8, (__int64)&v14, v6, v7, 1050253722);\n    a1->exitLayer(a1, nullptr);\n    a1->setTouchEnabled(a1, 0);\n    a1->setKeyboardEnabled(a1, 0);\n    a1->setKeypadEnabled(a1, 0);\n    v9 = cocos2d::CCCallFunc::create(a1->m_playLayer, sub_1401377C0);\n    v10 = cocos2d::CCDelayTime::create(0.5);\n    v11 = cocos2d::CCSequence::create(v10, v9, 0);\n    v11->setTag(v11, 16);\n    cocos2d::CCNode::runAction((CCLightFlash *)a1->m_playLayer, (cocos2d::CCPoint)v11, v12, 0.0, v13);\n  }\n}", "assembly": "; \n; EndLevelLayer::onRestartCheckpoint from 0x1401354c0 to 0x1401356c7 (519 bytes)\n; \n; 2 xrefs:\n; > EndLevelLayer::customSetup @ 0x140133f63\n; > <???> @ 0x1406c9ef4\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401354c0\npush    rdi                                                            ; +0x5, 0x1401354c5\nsub     rsp, 50h                                                       ; +0x6, 0x1401354c6\nmov     rdi, rcx                                                       ; +0xa, 0x1401354ca\ncmp     byte ptr [rcx+26Bh], 0                                         ; +0xd, 0x1401354cd\njnz     loc_1401356BC                                                  ; +0x14, 0x1401354d4\nmov     byte ptr [rcx+26Bh], 1                                         ; +0x1a, 0x1401354da\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x21, 0x1401354e1\ntest    rcx, rcx                                                       ; +0x28, 0x1401354e8\njnz     short loc_14013551C                                            ; +0x2b, 0x1401354eb\nmov     ecx, 668h; Size                                                ; +0x2d, 0x1401354ed\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x32, 0x1401354f2\nmov     [rsp+58h+arg_0], rax                                           ; +0x37, 0x1401354f7\nmov     rcx, rax                                                       ; +0x3c, 0x1401354fc\ncall    sub_14017AB00                                                  ; +0x3f, 0x1401354ff\nnop                                                                    ; +0x44, 0x140135504\nmov     cs:qword_1406C2ED8, rax                                        ; +0x45, 0x140135505\nmov     rdx, [rax]                                                     ; +0x4c, 0x14013550c\nmov     rcx, rax                                                       ; +0x4f, 0x14013550f\ncall    qword ptr [rdx+48h]                                            ; +0x52, 0x140135512\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x55, 0x140135515\nlea     rdx, a0024; \"0024\"                                             ; +0x5c, 0x14013551c\ncall    GameManager__getGameVariable                                   ; +0x63, 0x140135523\ntest    al, al                                                         ; +0x68, 0x140135528\njnz     short loc_14013553D                                            ; +0x6a, 0x14013552a\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x6c, 0x14013552c\nmov     rcx, rax                                                       ; +0x72, 0x140135532\nxor     edx, edx                                                       ; +0x75, 0x140135535\ncall    cs:?showCursor@CCEGLView@cocos2d@@QEAAX_N@Z; cocos2d::CCEGLView::showCursor(bool) ; +0x77, 0x140135537\nmov     rcx, cs:qword_1406C2E88                                        ; +0x7d, 0x14013553d\ntest    rcx, rcx                                                       ; +0x84, 0x140135544\njnz     short loc_140135578                                            ; +0x87, 0x140135547\nmov     ecx, 888h; Size                                                ; +0x89, 0x140135549\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8e, 0x14013554e\nmov     [rsp+58h+arg_0], rax                                           ; +0x93, 0x140135553\nmov     rcx, rax                                                       ; +0x98, 0x140135558\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x9b, 0x14013555b\nnop                                                                    ; +0xa0, 0x140135560\nmov     cs:qword_1406C2E88, rax                                        ; +0xa1, 0x140135561\nmov     rdx, [rax]                                                     ; +0xa8, 0x140135568\nmov     rcx, rax                                                       ; +0xab, 0x14013556b\ncall    qword ptr [rdx+48h]                                            ; +0xae, 0x14013556e\nmov     rcx, cs:qword_1406C2E88                                        ; +0xb1, 0x140135571\ncall    FMODAudioEngine__clearAllAudio                                 ; +0xb8, 0x140135578\nlea     rax, [rsp+58h+var_28]                                          ; +0xbd, 0x14013557d\nmov     [rsp+58h+arg_0], rax                                           ; +0xc2, 0x140135582\nxorps   xmm0, xmm0                                                     ; +0xc7, 0x140135587\nmovups  [rsp+58h+var_28], xmm0                                         ; +0xca, 0x14013558a\nmov     [rsp+58h+var_18], 0                                            ; +0xcf, 0x14013558f\nmov     [rsp+58h+var_10], 0Fh                                          ; +0xd8, 0x140135598\nmov     ecx, 20h ; ' '                                                 ; +0xe1, 0x1401355a1\ncall    sub_14003AA10                                                  ; +0xe6, 0x1401355a6\nmov     qword ptr [rsp+58h+var_28], rax                                ; +0xeb, 0x1401355ab\nmov     [rsp+58h+var_18], 10h                                          ; +0xf0, 0x1401355b0\nmov     [rsp+58h+var_10], 1Fh                                          ; +0xf9, 0x1401355b9\nmovups  xmm0, cs:xmmword_140532E28                                     ; +0x102, 0x1401355c2\nmovups  xmmword ptr [rax], xmm0                                        ; +0x109, 0x1401355c9\nmov     byte ptr [rax+10h], 0                                          ; +0x10c, 0x1401355cc\nmov     rcx, cs:qword_1406C2E88                                        ; +0x110, 0x1401355d0\ntest    rcx, rcx                                                       ; +0x117, 0x1401355d7\njnz     short loc_14013560B                                            ; +0x11a, 0x1401355da\nmov     ecx, 888h; Size                                                ; +0x11c, 0x1401355dc\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x121, 0x1401355e1\nmov     [rsp+58h+arg_10], rax                                          ; +0x126, 0x1401355e6\nmov     rcx, rax                                                       ; +0x12b, 0x1401355eb\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x12e, 0x1401355ee\nnop                                                                    ; +0x133, 0x1401355f3\nmov     cs:qword_1406C2E88, rax                                        ; +0x134, 0x1401355f4\nmov     rdx, [rax]                                                     ; +0x13b, 0x1401355fb\nmov     rcx, rax                                                       ; +0x13e, 0x1401355fe\ncall    qword ptr [rdx+48h]                                            ; +0x141, 0x140135601\nmov     rcx, cs:qword_1406C2E88                                        ; +0x144, 0x140135604\nmovss   xmm0, cs:dword_140622AA0                                       ; +0x14b, 0x14013560b\nmovss   [rsp+58h+var_38], xmm0                                         ; +0x153, 0x140135613\nxorps   xmm3, xmm3                                                     ; +0x159, 0x140135619\nmovss   xmm2, cs:flt_140622C24                                         ; +0x15c, 0x14013561c\nlea     rdx, [rsp+58h+var_28]                                          ; +0x164, 0x140135624\ncall    FMODAudioEngine__playEffect                                    ; +0x169, 0x140135629\nmov     rax, [rdi]                                                     ; +0x16e, 0x14013562e\nxor     edx, edx                                                       ; +0x171, 0x140135631\nmov     rcx, rdi                                                       ; +0x173, 0x140135633\ncall    qword ptr [rax+420h]                                           ; +0x176, 0x140135636\nmov     rax, [rdi]                                                     ; +0x17c, 0x14013563c\nxor     edx, edx                                                       ; +0x17f, 0x14013563f\nmov     rcx, rdi                                                       ; +0x181, 0x140135641\ncall    qword ptr [rax+388h]                                           ; +0x184, 0x140135644\nmov     rax, [rdi]                                                     ; +0x18a, 0x14013564a\nxor     edx, edx                                                       ; +0x18d, 0x14013564d\nmov     rcx, rdi                                                       ; +0x18f, 0x14013564f\ncall    qword ptr [rax+3E0h]                                           ; +0x192, 0x140135652\nmov     rax, [rdi]                                                     ; +0x198, 0x140135658\nxor     edx, edx                                                       ; +0x19b, 0x14013565b\nmov     rcx, rdi                                                       ; +0x19d, 0x14013565d\ncall    qword ptr [rax+3D0h]                                           ; +0x1a0, 0x140135660\nlea     rdx, sub_1401377C0                                             ; +0x1a6, 0x140135666\nmov     rcx, [rdi+260h]                                                ; +0x1ad, 0x14013566d\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x1b4, 0x140135674\nmov     rbx, rax                                                       ; +0x1ba, 0x14013567a\nmovss   xmm0, cs:dword_140622B08                                       ; +0x1bd, 0x14013567d\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x1c5, 0x140135685\nmov     rcx, rax                                                       ; +0x1cb, 0x14013568b\nxor     r8d, r8d                                                       ; +0x1ce, 0x14013568e\nmov     rdx, rbx                                                       ; +0x1d1, 0x140135691\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x1d4, 0x140135694\nmov     rbx, rax                                                       ; +0x1da, 0x14013569a\nmov     r8, [rax]                                                      ; +0x1dd, 0x14013569d\nmov     edx, 10h                                                       ; +0x1e0, 0x1401356a0\nmov     rcx, rax                                                       ; +0x1e5, 0x1401356a5\ncall    qword ptr [r8+40h]                                             ; +0x1e8, 0x1401356a8\nmov     rdx, rbx                                                       ; +0x1ec, 0x1401356ac\nmov     rcx, [rdi+260h]                                                ; +0x1ef, 0x1401356af\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x1f6, 0x1401356b6\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x1fc, 0x1401356bc\nadd     rsp, 50h                                                       ; +0x201, 0x1401356c1\npop     rdi                                                            ; +0x205, 0x1401356c5\nretn                                                                   ; +0x206, 0x1401356c6", "xrefs": ["EndLevelLayer::customSetup @ 0x140133f63", "<???> @ 0x1406c9ef4"], "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"}