{"type": "func", "start": 4299955808, "end": 4299956027, "name": "EndLevelLayer::onReplay", "pseudocode": "// \n// EndLevelLayer::onReplay from 0x1004c1e60 to 0x1004c1f3b (219 bytes)\n// \n// 3 xrefs:\n// > EndLevelLayer::keyDown @ 0x1004c3975\n// > sub_1004C3990 @ 0x1004c39bc\n// > EndLevelLayer::customSetup @ 0x1004c0f05\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 *v2; // rax\n  FMODAudioEngine *v3; // rax\n  FMODAudioEngine *v4; // rax\n  void *v5[4]; // [rsp+0h] [rbp-20h] 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 *)v5, \" playSound_01.ogg\");\n    FMODAudioEngine::playEffect((__int64)v4, (__int64)v5, (__m128)0x3F800000u, 0.0, 0.30000001);\n    if ( ((__int64)v5[0] & 1) != 0 )\n      operator delete(v5[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    PlayLayer::delayedFullReset(a1->m_playLayer);\n  }\n}", "assembly": "; \n; EndLevelLayer::onReplay from 0x1004c1e60 to 0x1004c1f3b (219 bytes)\n; \n; 3 xrefs:\n; > EndLevelLayer::keyDown @ 0x1004c3975\n; > sub_1004C3990 @ 0x1004c39bc\n; > EndLevelLayer::customSetup @ 0x1004c0f05\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, 0x1004c1e60\nmov     rbp, rsp                                                       ; +0x1, 0x1004c1e61\npush    rbx                                                            ; +0x4, 0x1004c1e64\nsub     rsp, 18h                                                       ; +0x5, 0x1004c1e65\ncmp     byte ptr [rdi+26Bh], 0                                         ; +0x9, 0x1004c1e69\njnz     loc_1004C1F34                                                  ; +0x10, 0x1004c1e70\nmov     rbx, rdi                                                       ; +0x16, 0x1004c1e76\nmov     byte ptr [rdi+26Bh], 1                                         ; +0x19, 0x1004c1e79\ncall    GameManager__sharedState                                       ; +0x20, 0x1004c1e80\nlea     rsi, a0024; \"0024\"                                             ; +0x25, 0x1004c1e85\nmov     rdi, rax                                                       ; +0x2c, 0x1004c1e8c\ncall    GameManager__getGameVariable                                   ; +0x2f, 0x1004c1e8f\ntest    al, al                                                         ; +0x34, 0x1004c1e94\njnz     short loc_1004C1E9D                                            ; +0x36, 0x1004c1e96\ncall    PlatformToolbox__hideCursor                                    ; +0x38, 0x1004c1e98\ncall    FMODAudioEngine__sharedEngine                                  ; +0x3d, 0x1004c1e9d\nmov     rdi, rax                                                       ; +0x42, 0x1004c1ea2\ncall    FMODAudioEngine__clearAllAudio                                 ; +0x45, 0x1004c1ea5\ncall    FMODAudioEngine__sharedEngine                                  ; +0x4a, 0x1004c1eaa\nmov     [rbp+var_20], 20h ; ' '                                        ; +0x4f, 0x1004c1eaf\nmovups  xmm0, xmmword ptr cs:aPlaysound01Ogg; \"playSound_01.ogg\"       ; +0x53, 0x1004c1eb3\nmovups  xmmword ptr [rbp+var_20+1], xmm0                               ; +0x5a, 0x1004c1eba\nmov     [rbp+var_20+11h], 0                                            ; +0x5e, 0x1004c1ebe\nlea     rsi, [rbp+var_20]                                              ; +0x62, 0x1004c1ec2\nmovss   xmm0, cs:alpha                                                 ; +0x66, 0x1004c1ec6\nmovss   xmm2, cs:dword_100815420                                       ; +0x6e, 0x1004c1ece\nxorps   xmm1, xmm1                                                     ; +0x76, 0x1004c1ed6\nmov     rdi, rax                                                       ; +0x79, 0x1004c1ed9\ncall    FMODAudioEngine__playEffect                                    ; +0x7c, 0x1004c1edc\ntest    [rbp+var_20], 1                                                ; +0x81, 0x1004c1ee1\njz      short loc_1004C1EF0                                            ; +0x85, 0x1004c1ee5\nmov     rdi, qword ptr [rbp+var_20+10h]; __p                           ; +0x87, 0x1004c1ee7\ncall    __ZdlPv; operator delete(void *)                               ; +0x8b, 0x1004c1eeb\nmov     rax, [rbx]                                                     ; +0x90, 0x1004c1ef0\nmov     rdi, rbx                                                       ; +0x93, 0x1004c1ef3\nxor     esi, esi                                                       ; +0x96, 0x1004c1ef6\ncall    qword ptr [rax+518h]                                           ; +0x98, 0x1004c1ef8\nmov     rax, [rbx]                                                     ; +0x9e, 0x1004c1efe\nmov     rdi, rbx                                                       ; +0xa1, 0x1004c1f01\nxor     esi, esi                                                       ; +0xa4, 0x1004c1f04\ncall    qword ptr [rax+3D8h]                                           ; +0xa6, 0x1004c1f06\nmov     rax, [rbx]                                                     ; +0xac, 0x1004c1f0c\nmov     rdi, rbx                                                       ; +0xaf, 0x1004c1f0f\nxor     esi, esi                                                       ; +0xb2, 0x1004c1f12\ncall    qword ptr [rax+430h]                                           ; +0xb4, 0x1004c1f14\nmov     rax, [rbx]                                                     ; +0xba, 0x1004c1f1a\nmov     rdi, rbx                                                       ; +0xbd, 0x1004c1f1d\nxor     esi, esi                                                       ; +0xc0, 0x1004c1f20\ncall    qword ptr [rax+420h]                                           ; +0xc2, 0x1004c1f22\nmov     rdi, [rbx+260h]                                                ; +0xc8, 0x1004c1f28\ncall    PlayLayer__delayedFullReset                                    ; +0xcf, 0x1004c1f2f\nadd     rsp, 18h                                                       ; +0xd4, 0x1004c1f34\npop     rbx                                                            ; +0xd8, 0x1004c1f38\npop     rbp                                                            ; +0xd9, 0x1004c1f39\nretn                                                                   ; +0xda, 0x1004c1f3a", "xrefs": ["EndLevelLayer::keyDown @ 0x1004c3975", "sub_1004C3990 @ 0x1004c39bc", "EndLevelLayer::customSetup @ 0x1004c0f05"], "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"}