{"type": "func", "start": 4355328, "end": 4355514, "name": "EndLevelLayer::onReplay", "pseudocode": "// \n// EndLevelLayer::onReplay from 0x427500 to 0x4275ba (186 bytes)\n// \n// 1 xrefs:\n// > EndLevelLayer::keyDown @ 0x4276c0\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::onReplay(EndLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // r0\n  FMODAudioEngine *v4; // r0\n  FMODAudioEngine *v5; // r7\n  _BYTE v6[4]; // [sp+10h] [bp-Ch] BYREF\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_776584((int)v6, \"playSound_01.ogg\");\n    FMODAudioEngine::playEffect(v5, (int)v6, 1.0, 0, 1050253722);\n    sub_774008(v6);\n    a1->exitLayer(a1, nullptr);\n    a1->setTouchEnabled(a1, 0);\n    a1->setKeyboardEnabled(a1, 0);\n    a1->setKeypadEnabled(a1, 0);\n    PlayLayer::delayedFullReset(a1->m_playLayer);\n  }\n}", "assembly": "; \n; EndLevelLayer::onReplay from 0x427500 to 0x4275ba (186 bytes)\n; \n; 1 xrefs:\n; > EndLevelLayer::keyDown @ 0x4276c0\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x427508)                ; +0x0, 0x427500\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x427502\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x427504\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x427506\nSUB             SP, SP, #0x1C                                          ; +0x8, 0x427508\nMOV             R4, R0                                                 ; +0xa, 0x42750a\nLDR             R2, [R3]                                               ; +0xc, 0x42750c\nMOV             R6, R3                                                 ; +0xe, 0x42750e\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x10, 0x427510\nLDRB.W          R2, [R0,#0x1E7]                                        ; +0x12, 0x427512\nCMP             R2, #0                                                 ; +0x16, 0x427516\nBNE             loc_4275AA                                             ; +0x18, 0x427518\nMOVS            R3, #1                                                 ; +0x1a, 0x42751a\nSTRB.W          R3, [R0,#0x1E7]                                        ; +0x1c, 0x42751c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x20, 0x427520\nLDR             R1, =(a0024 - 0x42752A); \"0024\"                        ; +0x24, 0x427524\nADD             R1, PC; \"0024\"                                         ; +0x26, 0x427526\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x28, 0x427528\nCBNZ            R0, loc_427532                                         ; +0x2c, 0x42752c\nBL              _ZN15PlatformToolbox10hideCursorEv; PlatformToolbox::hideCursor(void) ; +0x2e, 0x42752e\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x32, 0x427532\nADD             R5, SP, #0x1C+var_C                                    ; +0x36, 0x427536\nBL              _ZN15FMODAudioEngine13clearAllAudioEv; FMODAudioEngine::clearAllAudio(void) ; +0x38, 0x427538\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x3c, 0x42753c\nLDR             R1, =(aPlaysound01Ogg - 0x427548); \"playSound_01.ogg\"  ; +0x40, 0x427540\nADD             R2, SP, #0x1C+var_10                                   ; +0x42, 0x427542\nADD             R1, PC; \"playSound_01.ogg\"                             ; +0x44, 0x427544\nMOV             R7, R0                                                 ; +0x46, 0x427546\nMOV             R0, R5; int                                            ; +0x48, 0x427548\nBL              sub_776584                                             ; +0x4a, 0x42754a\nLDR             R3, flt_4275BC                                         ; +0x4e, 0x42754e\nMOV             R0, R7; int                                            ; +0x50, 0x427550\nMOV             R1, R5; int                                            ; +0x52, 0x427552\nMOV.W           R2, #0x3F800000; int                                   ; +0x54, 0x427554\nSTR             R3, [SP,#0x1C+var_1C]; float                           ; +0x58, 0x427558\nMOVS            R3, #0; int                                            ; +0x5a, 0x42755a\nBL              _ZN15FMODAudioEngine10playEffectESsfff; FMODAudioEngine::playEffect(std::string,float,float,float) ; +0x5c, 0x42755c\nMOV             R0, R5                                                 ; +0x60, 0x427560\nBL              sub_774008                                             ; +0x62, 0x427562\nLDR             R3, [R4]                                               ; +0x66, 0x427566\nMOV             R0, R4                                                 ; +0x68, 0x427568\nMOVS            R1, #0                                                 ; +0x6a, 0x42756a\nLDR.W           R3, [R3,#0x28C]                                        ; +0x6c, 0x42756c\nBLX             R3                                                     ; +0x70, 0x427570\nLDR             R3, [R4]                                               ; +0x72, 0x427572\nMOV             R0, R4                                                 ; +0x74, 0x427574\nMOVS            R1, #0                                                 ; +0x76, 0x427576\nLDR.W           R3, [R3,#0x1EC]                                        ; +0x78, 0x427578\nBLX             R3                                                     ; +0x7c, 0x42757c\nLDR             R3, [R4]                                               ; +0x7e, 0x42757e\nMOV             R0, R4                                                 ; +0x80, 0x427580\nMOVS            R1, #0                                                 ; +0x82, 0x427582\nLDR.W           R3, [R3,#0x218]                                        ; +0x84, 0x427584\nBLX             R3                                                     ; +0x88, 0x427588\nLDR             R3, [R4]                                               ; +0x8a, 0x42758a\nMOV             R0, R4                                                 ; +0x8c, 0x42758c\nMOVS            R1, #0                                                 ; +0x8e, 0x42758e\nLDR.W           R3, [R3,#0x210]                                        ; +0x90, 0x427590\nBLX             R3                                                     ; +0x94, 0x427594\nLDR.W           R0, [R4,#0x1E0]; this                                  ; +0x96, 0x427596\nBL              _ZN9PlayLayer16delayedFullResetEv; PlayLayer::delayedFullReset(void) ; +0x9a, 0x42759a\nB               loc_4275AA                                             ; +0x9e, 0x42759e\nMOV             R0, R5                                                 ; +0xa0, 0x4275a0\nBL              sub_774008                                             ; +0xa2, 0x4275a2\nBL              __cxa_end_cleanup                                      ; +0xa6, 0x4275a6\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xaa, 0x4275aa\nLDR             R3, [R6]                                               ; +0xac, 0x4275ac\nCMP             R2, R3                                                 ; +0xae, 0x4275ae\nBEQ             loc_4275B6                                             ; +0xb0, 0x4275b0\nBLX             __stack_chk_fail                                       ; +0xb2, 0x4275b2\nADD             SP, SP, #0x1C                                          ; +0xb6, 0x4275b6\nPOP             {R4-R7,PC}                                             ; +0xb8, 0x4275b8", "xrefs": ["EndLevelLayer::keyDown @ 0x4276c0"], "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"}