{"type": "func", "start": 8318276, "end": 8318856, "name": "EditLevelLayer::onPlay", "pseudocode": "// \n// EditLevelLayer::onPlay from 0x7eed44 to 0x7eef88 (580 bytes)\n// \n// 6 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x7f1d08\n// > EditLevelLayer::FLAlert_Clicked @ 0x7f1d50\n// > EditLevelLayer::keyDown @ 0x7f1da4\n// > <???> @ 0xbd2e0\n// > EditLevelLayer::init @ 0x7f0adc\n// > <???> @ 0x15457b0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:54:34 +0000\n// \n\n__int64 __fastcall EditLevelLayer::onPlay(EditLevelLayer *this, cocos2d::CCObject *a2)\n{\n  __int64 v3; // x0\n  __int64 v4; // x2\n  __int64 v5; // x1\n  FLAlertLayer *v6; // x20\n  __int64 v7; // x2\n  FMODAudioEngine *v9; // x0\n  FMODAudioEngine *v10; // x0\n  FMODAudioEngine *v11; // x0\n  __int64 v12; // x22\n  cocos2d::CCDelayTime *v13; // x0\n  cocos2d::CCSequence *v14; // x21\n  cocos2d::CCFiniteTimeAction *v15; // x0\n  cocos2d::CCAction *v16; // x0\n  __int64 v17; // [xsp+30h] [xbp+30h] BYREF\n  __int64 v18; // [xsp+38h] [xbp+38h]\n  void *v19; // [xsp+40h] [xbp+40h]\n\n  if ( !*(_BYTE *)(cocos2d::CCDirector::sharedDirector(_stack_chk_guard) + 176) && !*((_BYTE *)this + 496) )\n  {\n    v3 = *((_QWORD *)this + 59);\n    v4 = *(_BYTE *)(v3 + 1472) >> 1;\n    if ( (*(_BYTE *)(v3 + 1472) & 1) != 0 )\n      v4 = *(_QWORD *)(v3 + 1480);\n    if ( v4 && (*(_DWORD *)(v3 + 1520) != *(_DWORD *)(v3 + 788) || *(_DWORD *)(v3 + 1524) != 4) )\n      GJGameLevel::clearPlatformerSave((GJGameLevel *)v3);\n    if ( *((_BYTE *)this + 536) )\n      goto LABEL_16;\n    v5 = *(_BYTE *)(*((_QWORD *)this + 59) + 1472LL) >> 1;\n    if ( (*(_BYTE *)(*((_QWORD *)this + 59) + 1472LL) & 1) != 0 )\n      v5 = *(_QWORD *)(*((_QWORD *)this + 59) + 1480LL);\n    if ( !v5 )\n    {\nLABEL_16:\n      EditLevelLayer::closeTextInputs((cocos2d::CCArray **)this);\n      v9 = (FMODAudioEngine *)(*(__int64 (__fastcall **)(EditLevelLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);\n      *((_BYTE *)this + 496) = 1;\n      v10 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v9);\n      v11 = (FMODAudioEngine *)FMODAudioEngine::stopAllMusic(v10, 1);\n      v12 = FMODAudioEngine::sharedEngine(v11);\n      v17 = 0;\n      v18 = 0;\n      v19 = nullptr;\n      std::string::__init(&v17, \"playSound_01.ogg\", 0x10u);\n      FMODAudioEngine::playEffect(v12, (char *)&v17, 1.0, 0.0, 0.3);\n      if ( (v17 & 1) != 0 )\n        operator delete(v19);\n      v13 = (cocos2d::CCDelayTime *)EditLevelLayer::verifyLevelName(this);\n      v14 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(v13, 0.0);\n      v15 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, EditLevelLayer::playStep2, 0);\n      v16 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v14, v15, 0);\n      cocos2d::CCNode::runAction(this, v16);\n    }\n    else\n    {\n      v17 = 0;\n      v18 = 0;\n      v19 = nullptr;\n      std::string::__init(\n        &v17,\n        \"There is a <cg>saved</c> <cy>checkpoint</c> for this level.\\nDo you want to <cl>load</c> it?\",\n        0x5Bu);\n      v6 = (FLAlertLayer *)FLAlertLayer::create(\n                             (__int64)this + 416,\n                             (cocos2d::CCLabelBMFont *)\"Load Save\",\n                             (char *)&v17,\n                             (ButtonSprite *)\"New Game\",\n                             (ButtonSprite *)\"Load Save\",\n                             380.0);\n      if ( (v17 & 1) != 0 )\n        operator delete(v19);\n      FLAlertLayer::addCloseButton(v6);\n      v7 = *(_QWORD *)v6;\n      *((_BYTE *)v6 + 656) = 1;\n      (*(void (__fastcall **)(FLAlertLayer *, __int64))(v7 + 72))(v6, 11);\n      (*(void (__fastcall **)(FLAlertLayer *))(*(_QWORD *)v6 + 1312LL))(v6);\n    }\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; EditLevelLayer::onPlay from 0x7eed44 to 0x7eef88 (580 bytes)\n; \n; 6 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x7f1d08\n; > EditLevelLayer::FLAlert_Clicked @ 0x7f1d50\n; > EditLevelLayer::keyDown @ 0x7f1da4\n; > <???> @ 0xbd2e0\n; > EditLevelLayer::init @ 0x7f0adc\n; > <???> @ 0x15457b0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:54:34 +0000\n; \nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x7eed44\nMOV             X29, SP                                                ; +0x4, 0x7eed48\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x7eed4c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x7eed50\nMOV             X20, X0                                                ; +0x10, 0x7eed54\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x14, 0x7eed58\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x7eed5c\nLDR             X0, [X0]; this                                         ; +0x1c, 0x7eed60\nSTR             X0, [X29,#0x50+var_8]                                  ; +0x20, 0x7eed64\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x24, 0x7eed68\nLDRB            W0, [X0,#0xB0]                                         ; +0x28, 0x7eed6c\nCBNZ            W0, loc_7EEE5C                                         ; +0x2c, 0x7eed70\nLDRB            W0, [X20,#0x1F0]                                       ; +0x30, 0x7eed74\nCBNZ            W0, loc_7EEE5C                                         ; +0x34, 0x7eed78\nLDR             X0, [X20,#0x1D8]; this                                 ; +0x38, 0x7eed7c\nLDRB            W1, [X0,#0x5C0]                                        ; +0x3c, 0x7eed80\nUBFX            X2, X1, #1, #7                                         ; +0x40, 0x7eed84\nTBZ             W1, #0, loc_7EED90                                     ; +0x44, 0x7eed88\nLDR             X2, [X0,#0x5C8]                                        ; +0x48, 0x7eed8c\nCBZ             X2, loc_7EEDA8                                         ; +0x4c, 0x7eed90\nLDR             W2, [X0,#0x5F0]                                        ; +0x50, 0x7eed94\nLDR             W1, [X0,#0x314]                                        ; +0x54, 0x7eed98\nCMP             W2, W1                                                 ; +0x58, 0x7eed9c\nB.EQ            loc_7EEF50                                             ; +0x5c, 0x7eeda0\nBL              _ZN11GJGameLevel19clearPlatformerSaveEv; GJGameLevel::clearPlatformerSave(void) ; +0x60, 0x7eeda4\nLDRB            W0, [X20,#0x218]                                       ; +0x64, 0x7eeda8\nCBNZ            W0, loc_7EEE80                                         ; +0x68, 0x7eedac\nLDR             X0, [X20,#0x1D8]                                       ; +0x6c, 0x7eedb0\nADD             X2, X0, #0x5C0                                         ; +0x70, 0x7eedb4\nLDRB            W0, [X0,#0x5C0]                                        ; +0x74, 0x7eedb8\nUBFX            X1, X0, #1, #7                                         ; +0x78, 0x7eedbc\nTBZ             W0, #0, loc_7EEDC8                                     ; +0x7c, 0x7eedc0\nLDR             X1, [X2,#8]                                            ; +0x80, 0x7eedc4\nCBZ             X1, loc_7EEE80                                         ; +0x84, 0x7eedc8\nADD             X21, X29, #0x50+var_20                                 ; +0x88, 0x7eedcc\nADRP            X1, #aThereIsACgSave@PAGE; \"There is a <cg>saved</c> <cy>checkpoint\"... ; +0x8c, 0x7eedd0\nMOV             X0, X21                                                ; +0x90, 0x7eedd4\nADD             X1, X1, #aThereIsACgSave@PAGEOFF; \"There is a <cg>saved</c> <cy>checkpoint\"... ; +0x94, 0x7eedd8\nMOV             X2, #0x5B ; '['                                        ; +0x98, 0x7eeddc\nSTR             XZR, [X29,#0x50+var_20]                                ; +0x9c, 0x7eede0\nSTR             XZR, [X29,#0x50+var_18]                                ; +0xa0, 0x7eede4\nSTR             XZR, [X29,#0x50+var_10]                                ; +0xa4, 0x7eede8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0xa8, 0x7eedec\nADRP            X1, #aLoadSave@PAGE; \"Load Save\"                       ; +0xac, 0x7eedf0\nADRP            X3, #aNewGame@PAGE; \"New Game\"                         ; +0xb0, 0x7eedf4\nLDR             S0, =0x43BE0000                                        ; +0xb4, 0x7eedf8\nADD             X1, X1, #aLoadSave@PAGEOFF; \"Load Save\"                ; +0xb8, 0x7eedfc\nADD             X0, X20, #0x1A0                                        ; +0xbc, 0x7eee00\nMOV             X2, X21                                                ; +0xc0, 0x7eee04\nADD             X3, X3, #aNewGame@PAGEOFF; \"New Game\"                  ; +0xc4, 0x7eee08\nMOV             X4, X1                                                 ; +0xc8, 0x7eee0c\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xcc, 0x7eee10\nMOV             X20, X0                                                ; +0xd0, 0x7eee14\nLDRB            W0, [X29,#0x50+var_20]                                 ; +0xd4, 0x7eee18\nTBZ             W0, #0, loc_7EEE28                                     ; +0xd8, 0x7eee1c\nLDR             X0, [X29,#0x50+var_10]; void *                         ; +0xdc, 0x7eee20\nBL              _ZdlPv; operator delete(void *)                        ; +0xe0, 0x7eee24\nMOV             X0, X20; this                                          ; +0xe4, 0x7eee28\nBL              _ZN12FLAlertLayer14addCloseButtonEv; FLAlertLayer::addCloseButton(void) ; +0xe8, 0x7eee2c\nLDR             X2, [X20]                                              ; +0xec, 0x7eee30\nMOV             W0, #1                                                 ; +0xf0, 0x7eee34\nSTRB            W0, [X20,#0x290]                                       ; +0xf4, 0x7eee38\nMOV             W1, #0xB                                               ; +0xf8, 0x7eee3c\nMOV             X0, X20                                                ; +0xfc, 0x7eee40\nLDR             X2, [X2,#0x48]                                         ; +0x100, 0x7eee44\nBLR             X2                                                     ; +0x104, 0x7eee48\nLDR             X1, [X20]                                              ; +0x108, 0x7eee4c\nMOV             X0, X20                                                ; +0x10c, 0x7eee50\nLDR             X1, [X1,#0x520]                                        ; +0x110, 0x7eee54\nBLR             X1                                                     ; +0x114, 0x7eee58\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x118, 0x7eee5c\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x11c, 0x7eee60\nLDR             X0, [X19]                                              ; +0x120, 0x7eee64\nCMP             X1, X0                                                 ; +0x124, 0x7eee68\nB.NE            loc_7EEF64                                             ; +0x128, 0x7eee6c\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x12c, 0x7eee70\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x130, 0x7eee74\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x134, 0x7eee78\nRET                                                                    ; +0x138, 0x7eee7c\nMOV             X0, X20; this                                          ; +0x13c, 0x7eee80\nMOV             W22, #1                                                ; +0x140, 0x7eee84\nADD             X21, X29, #0x50+var_20                                 ; +0x144, 0x7eee88\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0x148, 0x7eee8c\nLDR             X2, [X20]                                              ; +0x14c, 0x7eee90\nMOV             W1, #0                                                 ; +0x150, 0x7eee94\nMOV             X0, X20                                                ; +0x154, 0x7eee98\nLDR             X2, [X2,#0x430]                                        ; +0x158, 0x7eee9c\nBLR             X2                                                     ; +0x15c, 0x7eeea0\nSTRB            W22, [X20,#0x1F0]                                      ; +0x160, 0x7eeea4\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x164, 0x7eeea8\nMOV             W1, W22; bool                                          ; +0x168, 0x7eeeac\nBL              _ZN15FMODAudioEngine12stopAllMusicEb; FMODAudioEngine::stopAllMusic(bool) ; +0x16c, 0x7eeeb0\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x170, 0x7eeeb4\nMOV             X22, X0                                                ; +0x174, 0x7eeeb8\nADRP            X1, #aPlaysound01Ogg@PAGE; \"playSound_01.ogg\"          ; +0x178, 0x7eeebc\nMOV             X0, X21                                                ; +0x17c, 0x7eeec0\nADD             X1, X1, #aPlaysound01Ogg@PAGEOFF; \"playSound_01.ogg\"   ; +0x180, 0x7eeec4\nMOV             X2, #0x10                                              ; +0x184, 0x7eeec8\nSTR             XZR, [X29,#0x50+var_20]                                ; +0x188, 0x7eeecc\nSTR             XZR, [X29,#0x50+var_18]                                ; +0x18c, 0x7eeed0\nSTR             XZR, [X29,#0x50+var_10]                                ; +0x190, 0x7eeed4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0x194, 0x7eeed8\nFMOV            S1, WZR                                                ; +0x198, 0x7eeedc\nMOV             X0, X22                                                ; +0x19c, 0x7eeee0\nLDR             S2, =0x3E99999A                                        ; +0x1a0, 0x7eeee4\nMOV             X1, X21                                                ; +0x1a4, 0x7eeee8\nFMOV            S0, #1.0                                               ; +0x1a8, 0x7eeeec\nBL              _ZN15FMODAudioEngine10playEffectENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEfff; FMODAudioEngine::playEffect(std::string,float,float,float) ; +0x1ac, 0x7eeef0\nLDRB            W0, [X29,#0x50+var_20]                                 ; +0x1b0, 0x7eeef4\nTBNZ            W0, #0, loc_7EEF44                                     ; +0x1b4, 0x7eeef8\nMOV             X0, X20; this                                          ; +0x1b8, 0x7eeefc\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x1bc, 0x7eef00\nFMOV            S0, WZR; float                                         ; +0x1c0, 0x7eef04\nBL              _ZN7cocos2d11CCDelayTime6createEf; cocos2d::CCDelayTime::create(float) ; +0x1c4, 0x7eef08\nMOV             X21, X0                                                ; +0x1c8, 0x7eef0c\nADRP            X1, #_ZN14EditLevelLayer9playStep2Ev_ptr@PAGE          ; +0x1cc, 0x7eef10\nMOV             X0, X20                                                ; +0x1d0, 0x7eef14\nMOV             X2, #0                                                 ; +0x1d4, 0x7eef18\nLDR             X1, [X1,#_ZN14EditLevelLayer9playStep2Ev_ptr@PAGEOFF]; EditLevelLayer::playStep2(void) ... ; +0x1d8, 0x7eef1c\nBL              _ZN7cocos2d10CCCallFunc6createEPNS_8CCObjectEMS1_FvvE; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x1dc, 0x7eef20\nMOV             X1, X0; cocos2d::CCFiniteTimeAction *                  ; +0x1e0, 0x7eef24\nMOV             X2, #0                                                 ; +0x1e4, 0x7eef28\nMOV             X0, X21; this                                          ; +0x1e8, 0x7eef2c\nBL              _ZN7cocos2d10CCSequence6createEPNS_18CCFiniteTimeActionEz; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x1ec, 0x7eef30\nMOV             X1, X0; cocos2d::CCAction *                            ; +0x1f0, 0x7eef34\nMOV             X0, X20; this                                          ; +0x1f4, 0x7eef38\nBL              _ZN7cocos2d6CCNode9runActionEPNS_8CCActionE; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x1f8, 0x7eef3c\nB               loc_7EEE5C                                             ; +0x1fc, 0x7eef40\nLDR             X0, [X29,#0x50+var_10]; void *                         ; +0x200, 0x7eef44\nBL              _ZdlPv; operator delete(void *)                        ; +0x204, 0x7eef48\nB               loc_7EEEFC                                             ; +0x208, 0x7eef4c\nLDR             W1, [X0,#0x5F4]                                        ; +0x20c, 0x7eef50\nCMP             W1, #4                                                 ; +0x210, 0x7eef54\nB.EQ            loc_7EEDA8                                             ; +0x214, 0x7eef58\nBL              _ZN11GJGameLevel19clearPlatformerSaveEv; GJGameLevel::clearPlatformerSave(void) ; +0x218, 0x7eef5c\nB               loc_7EEDA8                                             ; +0x21c, 0x7eef60\nBL              .__stack_chk_fail                                      ; +0x220, 0x7eef64\nLDRB            W1, [X29,#0x50+var_20]                                 ; +0x224, 0x7eef68\nMOV             X19, X0                                                ; +0x228, 0x7eef6c\nTBZ             W1, #0, loc_7EEF7C                                     ; +0x22c, 0x7eef70\nLDR             X0, [X29,#0x50+var_10]; void *                         ; +0x230, 0x7eef74\nBL              _ZdlPv; operator delete(void *)                        ; +0x234, 0x7eef78\nMOV             X0, X19                                                ; +0x238, 0x7eef7c\nBL              _Unwind_Resume                                         ; +0x23c, 0x7eef80\nB               loc_7EEF68                                             ; +0x240, 0x7eef84", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x7f1d08", "EditLevelLayer::FLAlert_Clicked @ 0x7f1d50", "EditLevelLayer::keyDown @ 0x7f1da4", "<???> @ 0xbd2e0", "EditLevelLayer::init @ 0x7f0adc", "<???> @ 0x15457b0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}