{"type": "func", "start": 5369974400, "end": 5369974923, "name": "EndLevelLayer::onReplay", "pseudocode": "// \n// EndLevelLayer::onReplay from 0x140134e80 to 0x14013508b (523 bytes)\n// \n// 3 xrefs:\n// > EndLevelLayer::keyDown @ 0x140136da4\n// > EndLevelLayer::customSetup @ 0x140133d7c\n// > <???> @ 0x1406c9eb8\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\n// Hidden C++ exception states: #wind=4\nvoid EndLevelLayer::onReplay(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  PlayLayer *m_playLayer; // rdi\n  __int64 v10; // rbx\n  struct cocos2d::CCDelayTime *v11; // rax\n  struct cocos2d::CCSequence *v12; // rax\n  cocos2d::ccColor3B *v13; // r8\n  float v14; // [rsp+20h] [rbp-38h]\n  __int128 v15; // [rsp+30h] [rbp-28h] BYREF\n  __int64 v16; // [rsp+40h] [rbp-18h]\n  __int64 v17; // [rsp+48h] [rbp-10h]\n  void *v18; // [rsp+60h] [rbp+8h]\n  FMODAudioEngine *v19; // [rsp+60h] [rbp+8h]\n  FMODAudioEngine *v20; // [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      v18 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v18);\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      v19 = (FMODAudioEngine *)operator new(0x888u);\n      qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v19);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n      v5 = (FMODAudioEngine *)qword_1406C2E88;\n    }\n    FMODAudioEngine::clearAllAudio(v5);\n    v15 = 0;\n    *(_QWORD *)&v15 = sub_14003AA10(0x20u);\n    v16 = 16;\n    v17 = 31;\n    strcpy((char *)v15, \"playSound_01.ogg\");\n    v8 = qword_1406C2E88;\n    if ( !qword_1406C2E88 )\n    {\n      v20 = (FMODAudioEngine *)operator new(0x888u);\n      qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v20);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n      v8 = qword_1406C2E88;\n    }\n    FMODAudioEngine::playEffect(v8, (__int64)&v15, v6, v7, 1050253722);\n    a1->exitLayer(a1, nullptr);\n    a1->setTouchEnabled(a1, 0);\n    a1->setKeyboardEnabled(a1, 0);\n    a1->setKeypadEnabled(a1, 0);\n    m_playLayer = a1->m_playLayer;\n    if ( m_playLayer->m_isPlatformer )\n    {\n      m_playLayer->m_started = 0;\n      m_playLayer->m_platformerRestart = 1;\n    }\n    v10 = cocos2d::CCCallFunc::create(m_playLayer, PlayLayer::fullReset);\n    v11 = cocos2d::CCDelayTime::create(0.5);\n    v12 = cocos2d::CCSequence::create(v11, v10, 0);\n    cocos2d::CCNode::runAction((CCLightFlash *)m_playLayer, (cocos2d::CCPoint)v12, v13, 0.0, v14);\n  }\n}", "assembly": "; \n; EndLevelLayer::onReplay from 0x140134e80 to 0x14013508b (523 bytes)\n; \n; 3 xrefs:\n; > EndLevelLayer::keyDown @ 0x140136da4\n; > EndLevelLayer::customSetup @ 0x140133d7c\n; > <???> @ 0x1406c9eb8\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, 0x140134e80\npush    rdi                                                            ; +0x5, 0x140134e85\nsub     rsp, 50h                                                       ; +0x6, 0x140134e86\nmov     rbx, rcx                                                       ; +0xa, 0x140134e8a\ncmp     byte ptr [rcx+26Bh], 0                                         ; +0xd, 0x140134e8d\njnz     loc_140135080                                                  ; +0x14, 0x140134e94\nmov     byte ptr [rcx+26Bh], 1                                         ; +0x1a, 0x140134e9a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x21, 0x140134ea1\ntest    rcx, rcx                                                       ; +0x28, 0x140134ea8\njnz     short loc_140134EDC                                            ; +0x2b, 0x140134eab\nmov     ecx, 668h; Size                                                ; +0x2d, 0x140134ead\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x32, 0x140134eb2\nmov     [rsp+58h+arg_0], rax                                           ; +0x37, 0x140134eb7\nmov     rcx, rax                                                       ; +0x3c, 0x140134ebc\ncall    sub_14017AB00                                                  ; +0x3f, 0x140134ebf\nnop                                                                    ; +0x44, 0x140134ec4\nmov     cs:qword_1406C2ED8, rax                                        ; +0x45, 0x140134ec5\nmov     rdx, [rax]                                                     ; +0x4c, 0x140134ecc\nmov     rcx, rax                                                       ; +0x4f, 0x140134ecf\ncall    qword ptr [rdx+48h]                                            ; +0x52, 0x140134ed2\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x55, 0x140134ed5\nlea     rdx, a0024; \"0024\"                                             ; +0x5c, 0x140134edc\ncall    GameManager__getGameVariable                                   ; +0x63, 0x140134ee3\ntest    al, al                                                         ; +0x68, 0x140134ee8\njnz     short loc_140134EFD                                            ; +0x6a, 0x140134eea\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x6c, 0x140134eec\nmov     rcx, rax                                                       ; +0x72, 0x140134ef2\nxor     edx, edx                                                       ; +0x75, 0x140134ef5\ncall    cs:?showCursor@CCEGLView@cocos2d@@QEAAX_N@Z; cocos2d::CCEGLView::showCursor(bool) ; +0x77, 0x140134ef7\nmov     rcx, cs:qword_1406C2E88                                        ; +0x7d, 0x140134efd\ntest    rcx, rcx                                                       ; +0x84, 0x140134f04\njnz     short loc_140134F38                                            ; +0x87, 0x140134f07\nmov     ecx, 888h; Size                                                ; +0x89, 0x140134f09\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8e, 0x140134f0e\nmov     [rsp+58h+arg_0], rax                                           ; +0x93, 0x140134f13\nmov     rcx, rax                                                       ; +0x98, 0x140134f18\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x9b, 0x140134f1b\nnop                                                                    ; +0xa0, 0x140134f20\nmov     cs:qword_1406C2E88, rax                                        ; +0xa1, 0x140134f21\nmov     rdx, [rax]                                                     ; +0xa8, 0x140134f28\nmov     rcx, rax                                                       ; +0xab, 0x140134f2b\ncall    qword ptr [rdx+48h]                                            ; +0xae, 0x140134f2e\nmov     rcx, cs:qword_1406C2E88                                        ; +0xb1, 0x140134f31\ncall    FMODAudioEngine__clearAllAudio                                 ; +0xb8, 0x140134f38\nlea     rax, [rsp+58h+var_28]                                          ; +0xbd, 0x140134f3d\nmov     [rsp+58h+arg_0], rax                                           ; +0xc2, 0x140134f42\nxorps   xmm0, xmm0                                                     ; +0xc7, 0x140134f47\nmovups  [rsp+58h+var_28], xmm0                                         ; +0xca, 0x140134f4a\nmov     [rsp+58h+var_18], 0                                            ; +0xcf, 0x140134f4f\nmov     [rsp+58h+var_10], 0Fh                                          ; +0xd8, 0x140134f58\nmov     ecx, 20h ; ' '                                                 ; +0xe1, 0x140134f61\ncall    sub_14003AA10                                                  ; +0xe6, 0x140134f66\nmov     qword ptr [rsp+58h+var_28], rax                                ; +0xeb, 0x140134f6b\nmov     [rsp+58h+var_18], 10h                                          ; +0xf0, 0x140134f70\nmov     [rsp+58h+var_10], 1Fh                                          ; +0xf9, 0x140134f79\nmovups  xmm0, cs:xmmword_140532E28                                     ; +0x102, 0x140134f82\nmovups  xmmword ptr [rax], xmm0                                        ; +0x109, 0x140134f89\nmov     byte ptr [rax+10h], 0                                          ; +0x10c, 0x140134f8c\nmov     rcx, cs:qword_1406C2E88                                        ; +0x110, 0x140134f90\ntest    rcx, rcx                                                       ; +0x117, 0x140134f97\njnz     short loc_140134FCB                                            ; +0x11a, 0x140134f9a\nmov     ecx, 888h; Size                                                ; +0x11c, 0x140134f9c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x121, 0x140134fa1\nmov     [rsp+58h+arg_10], rax                                          ; +0x126, 0x140134fa6\nmov     rcx, rax                                                       ; +0x12b, 0x140134fab\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x12e, 0x140134fae\nnop                                                                    ; +0x133, 0x140134fb3\nmov     cs:qword_1406C2E88, rax                                        ; +0x134, 0x140134fb4\nmov     rdx, [rax]                                                     ; +0x13b, 0x140134fbb\nmov     rcx, rax                                                       ; +0x13e, 0x140134fbe\ncall    qword ptr [rdx+48h]                                            ; +0x141, 0x140134fc1\nmov     rcx, cs:qword_1406C2E88                                        ; +0x144, 0x140134fc4\nmovss   xmm0, cs:dword_140622AA0                                       ; +0x14b, 0x140134fcb\nmovss   [rsp+58h+var_38], xmm0                                         ; +0x153, 0x140134fd3\nxorps   xmm3, xmm3                                                     ; +0x159, 0x140134fd9\nmovss   xmm2, cs:flt_140622C24                                         ; +0x15c, 0x140134fdc\nlea     rdx, [rsp+58h+var_28]                                          ; +0x164, 0x140134fe4\ncall    FMODAudioEngine__playEffect                                    ; +0x169, 0x140134fe9\nmov     rax, [rbx]                                                     ; +0x16e, 0x140134fee\nxor     edx, edx                                                       ; +0x171, 0x140134ff1\nmov     rcx, rbx                                                       ; +0x173, 0x140134ff3\ncall    qword ptr [rax+420h]                                           ; +0x176, 0x140134ff6\nmov     rax, [rbx]                                                     ; +0x17c, 0x140134ffc\nxor     edx, edx                                                       ; +0x17f, 0x140134fff\nmov     rcx, rbx                                                       ; +0x181, 0x140135001\ncall    qword ptr [rax+388h]                                           ; +0x184, 0x140135004\nmov     rax, [rbx]                                                     ; +0x18a, 0x14013500a\nxor     edx, edx                                                       ; +0x18d, 0x14013500d\nmov     rcx, rbx                                                       ; +0x18f, 0x14013500f\ncall    qword ptr [rax+3E0h]                                           ; +0x192, 0x140135012\nmov     rax, [rbx]                                                     ; +0x198, 0x140135018\nxor     edx, edx                                                       ; +0x19b, 0x14013501b\nmov     rcx, rbx                                                       ; +0x19d, 0x14013501d\ncall    qword ptr [rax+3D0h]                                           ; +0x1a0, 0x140135020\nmov     rdi, [rbx+260h]                                                ; +0x1a6, 0x140135026\ncmp     byte ptr [rdi+309Eh], 0                                        ; +0x1ad, 0x14013502d\njz      short loc_140135044                                            ; +0x1b4, 0x140135034\nmov     byte ptr [rdi+3258h], 0                                        ; +0x1b6, 0x140135036\nmov     byte ptr [rdi+3854h], 1                                        ; +0x1bd, 0x14013503d\nlea     rdx, PlayLayer__fullReset                                      ; +0x1c4, 0x140135044\nmov     rcx, rdi                                                       ; +0x1cb, 0x14013504b\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x1ce, 0x14013504e\nmov     rbx, rax                                                       ; +0x1d4, 0x140135054\nmovss   xmm0, cs:dword_140622B08                                       ; +0x1d7, 0x140135057\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x1df, 0x14013505f\nmov     rcx, rax                                                       ; +0x1e5, 0x140135065\nxor     r8d, r8d                                                       ; +0x1e8, 0x140135068\nmov     rdx, rbx                                                       ; +0x1eb, 0x14013506b\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x1ee, 0x14013506e\nmov     rdx, rax                                                       ; +0x1f4, 0x140135074\nmov     rcx, rdi                                                       ; +0x1f7, 0x140135077\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x1fa, 0x14013507a\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x200, 0x140135080\nadd     rsp, 50h                                                       ; +0x205, 0x140135085\npop     rdi                                                            ; +0x209, 0x140135089\nretn                                                                   ; +0x20a, 0x14013508a", "xrefs": ["EndLevelLayer::keyDown @ 0x140136da4", "EndLevelLayer::customSetup @ 0x140133d7c", "<???> @ 0x1406c9eb8"], "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"}