{"type": "func", "start": 5372066048, "end": 5372066437, "name": "MenuLayer::scene", "pseudocode": "// \n// MenuLayer::scene from 0x140333900 to 0x140333a85 (389 bytes)\n// \n// 14 xrefs:\n// > CreatorLayer::onBack @ 0x14009f80f\n// > CreatorLayer::keyBackClicked @ 0x14009f9d3\n// > GameManager::returnToLastScene @ 0x14018a290\n// > GameManager::returnToLastScene @ 0x14018a29f\n// > GameManager::safePopScene @ 0x14018a37f\n// > GameManager::reloadMenu @ 0x14018a3e8\n// > GameManager::reloadAllStep5 @ 0x14018a7e8\n// > GJGarageLayer::onBack @ 0x1402790a2\n// > LevelSelectLayer::onBack @ 0x140319a43\n// > LevelSelectLayer::keyBackClicked @ 0x140319a9a\n// > LoadingLayer::loadAssets @ 0x14032f7a8\n// > LoadingLayer::loadAssets @ 0x14032f7c9\n// > SecretLayer::onBack @ 0x1403e1eeb\n// > <???> @ 0x1406d50f0\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// local variable allocation has failed, the output may be wrong!\n// Hidden C++ exception states: #wind=1\ncocos2d::CCScene *MenuLayer::scene(bool a1)\n{\n  float v1; // xmm3_4\n  cocos2d::CCScene *v3; // rsi\n  __int64 v4; // rdx\n  __int64 v5; // rcx\n  MenuLayer *v6; // rdi\n  __int64 v7; // rbx\n  struct cocos2d::CCDelayTime *v8; // rax\n  struct cocos2d::CCSequence *v9; // rax\n  cocos2d::ccColor3B *v10; // r8\n  float v12; // [rsp+20h] [rbp-8h]\n\n  v3 = (cocos2d::CCScene *)cocos2d::CCScene::create(a1);\n  v3->m_eObjType = MenuLayerObjectType;\n  *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v5, v4) + 224) = v3;\n  v6 = (MenuLayer *)operator new(0x1E0u);\n  cocos2d::CCLayer::CCLayer(v6);\n  v6->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (MenuLayer_vtbl *)&MenuLayer::`vftable';\n  v6->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&MenuLayer::`vftable';\n  v6->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&MenuLayer::`vftable';\n  v6->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&MenuLayer::`vftable';\n  v6->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&MenuLayer::`vftable';\n  v6->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&MenuLayer::`vftable';\n  v6->FLAlertLayerProtocol::__vftable = (FLAlertLayerProtocol_vtbl *)&MenuLayer::`vftable';\n  v6->GooglePlayDelegate::__vftable = (GooglePlayDelegate_vtbl *)&MenuLayer::`vftable';\n  v6->m_showingTOS = 0;\n  v6->m_gpSprite = nullptr;\n  v6->m_viewProfileSprite = nullptr;\n  v6->m_profileLabel = nullptr;\n  v6->m_profileButton = nullptr;\n  v6->m_unknown = nullptr;\n  if ( MenuLayer::init(v6) )\n  {\n    cocos2d::CCObject::autorelease(v6);\n  }\n  else\n  {\n    ((void (__fastcall *)(MenuLayer *, __int64))v6->~MenuLayer)(v6, 1);\n    v6 = nullptr;\n  }\n  v3->addChild_1(v3, v6);\n  if ( a1 )\n  {\n    v7 = cocos2d::CCCallFunc::create(v6, MenuLayer::onOptionsInstant);\n    v8 = cocos2d::CCDelayTime::create(0.0);\n    v9 = cocos2d::CCSequence::create(v8, v7, 0);\n    cocos2d::CCNode::runAction((CCLightFlash *)v6, (cocos2d::CCPoint)v9, v10, v1, v12);\n  }\n  return v3;\n}", "assembly": "; \n; MenuLayer::scene from 0x140333900 to 0x140333a85 (389 bytes)\n; \n; 14 xrefs:\n; > CreatorLayer::onBack @ 0x14009f80f\n; > CreatorLayer::keyBackClicked @ 0x14009f9d3\n; > GameManager::returnToLastScene @ 0x14018a290\n; > GameManager::returnToLastScene @ 0x14018a29f\n; > GameManager::safePopScene @ 0x14018a37f\n; > GameManager::reloadMenu @ 0x14018a3e8\n; > GameManager::reloadAllStep5 @ 0x14018a7e8\n; > GJGarageLayer::onBack @ 0x1402790a2\n; > LevelSelectLayer::onBack @ 0x140319a43\n; > LevelSelectLayer::keyBackClicked @ 0x140319a9a\n; > LoadingLayer::loadAssets @ 0x14032f7a8\n; > LoadingLayer::loadAssets @ 0x14032f7c9\n; > SecretLayer::onBack @ 0x1403e1eeb\n; > <???> @ 0x1406d50f0\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_0], rbx                                               ; +0x0, 0x140333900\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140333905\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14033390a\npush    rdi                                                            ; +0xf, 0x14033390f\nsub     rsp, 20h                                                       ; +0x10, 0x140333910\nmovzx   ebx, cl                                                        ; +0x14, 0x140333914\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0x17, 0x140333917\nmov     rsi, rax                                                       ; +0x1d, 0x14033391d\nmov     dword ptr [rax+1Ch], 0Fh                                       ; +0x20, 0x140333920\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x27, 0x140333927\nmov     [rax+0E0h], rsi                                                ; +0x2d, 0x14033392d\nmov     ecx, 1E0h; Size                                                ; +0x34, 0x140333934\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x39, 0x140333939\nmov     rdi, rax                                                       ; +0x3e, 0x14033393e\nmov     [rsp+28h+arg_8], rax                                           ; +0x41, 0x140333941\nmov     rcx, rax                                                       ; +0x46, 0x140333946\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x49, 0x140333949\nlea     rax, ??_7MenuLayer@@6B@; const MenuLayer::`vftable'            ; +0x4f, 0x14033394f\nmov     [rdi], rax                                                     ; +0x56, 0x140333956\nlea     rax, ??_7MenuLayer@@6B@_0; const MenuLayer::`vftable'          ; +0x59, 0x140333959\nmov     [rdi+140h], rax                                                ; +0x60, 0x140333960\nlea     rax, ??_7MenuLayer@@6B@_1; const MenuLayer::`vftable'          ; +0x67, 0x140333967\nmov     [rdi+148h], rax                                                ; +0x6e, 0x14033396e\nlea     rax, ??_7MenuLayer@@6B@_2; const MenuLayer::`vftable'          ; +0x75, 0x140333975\nmov     [rdi+150h], rax                                                ; +0x7c, 0x14033397c\nlea     rax, ??_7MenuLayer@@6B@_3; const MenuLayer::`vftable'          ; +0x83, 0x140333983\nmov     [rdi+158h], rax                                                ; +0x8a, 0x14033398a\nlea     rax, ??_7MenuLayer@@6B@_4; const MenuLayer::`vftable'          ; +0x91, 0x140333991\nmov     [rdi+160h], rax                                                ; +0x98, 0x140333998\nlea     rax, ??_7MenuLayer@@6B@_5; const MenuLayer::`vftable'          ; +0x9f, 0x14033399f\nmov     [rdi+198h], rax                                                ; +0xa6, 0x1403339a6\nlea     rax, ??_7MenuLayer@@6B@_6; const MenuLayer::`vftable'          ; +0xad, 0x1403339ad\nmov     [rdi+1A0h], rax                                                ; +0xb4, 0x1403339b4\nmov     byte ptr [rdi+1A8h], 0                                         ; +0xbb, 0x1403339bb\nxor     ebp, ebp                                                       ; +0xc2, 0x1403339c2\nmov     [rdi+1B0h], rbp                                                ; +0xc4, 0x1403339c4\nmov     [rdi+1B8h], rbp                                                ; +0xcb, 0x1403339cb\nmov     [rdi+1C0h], rbp                                                ; +0xd2, 0x1403339d2\nmov     [rdi+1C8h], rbp                                                ; +0xd9, 0x1403339d9\nmov     [rdi+1D0h], rbp                                                ; +0xe0, 0x1403339e0\nmov     rax, cs:off_1405AAE88                                          ; +0xe7, 0x1403339e7\nlea     rcx, MenuLayer__init                                           ; +0xee, 0x1403339ee\ncmp     rax, rcx                                                       ; +0xf5, 0x1403339f5\nmov     rcx, rdi                                                       ; +0xf8, 0x1403339f8\njnz     short loc_140333A04                                            ; +0xfb, 0x1403339fb\ncall    MenuLayer__init                                                ; +0xfd, 0x1403339fd\njmp     short loc_140333A06                                            ; +0x102, 0x140333a02\ncall    rax ; MenuLayer__init                                          ; +0x104, 0x140333a04\nmov     rcx, rdi                                                       ; +0x106, 0x140333a06\ntest    al, al                                                         ; +0x109, 0x140333a09\njz      short loc_140333A15                                            ; +0x10b, 0x140333a0b\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x10d, 0x140333a0d\njmp     short loc_140333A23                                            ; +0x113, 0x140333a13\nmov     rax, [rdi]                                                     ; +0x115, 0x140333a15\nmov     edx, 1                                                         ; +0x118, 0x140333a18\ncall    qword ptr [rax+8]                                              ; +0x11d, 0x140333a1d\nmov     rdi, rbp                                                       ; +0x120, 0x140333a20\nmov     rax, [rsi]                                                     ; +0x123, 0x140333a23\nmov     rdx, rdi                                                       ; +0x126, 0x140333a26\nmov     rcx, rsi                                                       ; +0x129, 0x140333a29\ncall    qword ptr [rax+1C0h]                                           ; +0x12c, 0x140333a2c\ntest    bl, bl                                                         ; +0x132, 0x140333a32\njz      short loc_140333A6D                                            ; +0x134, 0x140333a34\nlea     rdx, MenuLayer__onOptionsInstant                               ; +0x136, 0x140333a36\nmov     rcx, rdi                                                       ; +0x13d, 0x140333a3d\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x140, 0x140333a40\nmov     rbx, rax                                                       ; +0x146, 0x140333a46\nxorps   xmm0, xmm0                                                     ; +0x149, 0x140333a49\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x14c, 0x140333a4c\nmov     rcx, rax                                                       ; +0x152, 0x140333a52\nxor     r8d, r8d                                                       ; +0x155, 0x140333a55\nmov     rdx, rbx                                                       ; +0x158, 0x140333a58\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x15b, 0x140333a5b\nmov     rdx, rax                                                       ; +0x161, 0x140333a61\nmov     rcx, rdi                                                       ; +0x164, 0x140333a64\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x167, 0x140333a67\nmov     rax, rsi                                                       ; +0x16d, 0x140333a6d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x170, 0x140333a70\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x175, 0x140333a75\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x17a, 0x140333a7a\nadd     rsp, 20h                                                       ; +0x17f, 0x140333a7f\npop     rdi                                                            ; +0x183, 0x140333a83\nretn                                                                   ; +0x184, 0x140333a84", "xrefs": ["CreatorLayer::onBack @ 0x14009f80f", "CreatorLayer::keyBackClicked @ 0x14009f9d3", "GameManager::returnToLastScene @ 0x14018a290", "GameManager::returnToLastScene @ 0x14018a29f", "GameManager::safePopScene @ 0x14018a37f", "GameManager::reloadMenu @ 0x14018a3e8", "GameManager::reloadAllStep5 @ 0x14018a7e8", "GJGarageLayer::onBack @ 0x1402790a2", "LevelSelectLayer::onBack @ 0x140319a43", "LevelSelectLayer::keyBackClicked @ 0x140319a9a", "LoadingLayer::loadAssets @ 0x14032f7a8", "LoadingLayer::loadAssets @ 0x14032f7c9", "SecretLayer::onBack @ 0x1403e1eeb", "<???> @ 0x1406d50f0"], "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"}