{"type": "func", "start": 5373370128, "end": 5373370552, "name": "MenuLayer::scene", "pseudocode": "// \n// MenuLayer::scene from 0x140471f10 to 0x1404720b8 (424 bytes)\n// \n// 14 xrefs:\n// > CreatorLayer::onBack @ 0x14013978f\n// > CreatorLayer::keyBackClicked @ 0x140139973\n// > GameManager::returnToLastScene @ 0x1402875a8\n// > GameManager::returnToLastScene @ 0x1402875b7\n// > GameManager::safePopScene @ 0x14028769f\n// > GameManager::reloadMenu @ 0x140287784\n// > GameManager::reloadAllStep5 @ 0x140287ba8\n// > GJGarageLayer::onBack @ 0x140381a15\n// > LevelSelectLayer::onBack @ 0x140442e33\n// > LevelSelectLayer::keyBackClicked @ 0x140442e8a\n// > LoadingLayer::loadAssets @ 0x14046a43c\n// > LoadingLayer::loadAssets @ 0x14046a45d\n// > SecretLayer::onBack @ 0x140577a2e\n// > <???> @ 0x1409281e4\n// \n// This function is hookable on this platform (idp: pc, 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 11:32:39 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n_DWORD *__fastcall MenuLayer::scene(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n  char v4; // bl\n  _DWORD *v5; // rsi\n  __int64 v6; // rcx\n  cocos2d::CCLayer *v7; // rdi\n  __int64 v8; // rbx\n  struct cocos2d::CCFiniteTimeAction *v9; // rax\n  struct cocos2d::CCAction *v10; // rax\n\n  v4 = a1;\n  v5 = (_DWORD *)cocos2d::CCScene::create(a1, a2, a3, a4);\n  v5[7] = 15;\n  *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v6) + 232) = v5;\n  v7 = (cocos2d::CCLayer *)operator new(0x200u);\n  cocos2d::CCLayer::CCLayer(v7);\n  *(_QWORD *)v7 = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 40) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 41) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 42) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 43) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 44) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 51) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 52) = &MenuLayer::`vftable';\n  *((_QWORD *)v7 + 53) = &MenuLayer::`vftable';\n  *((_BYTE *)v7 + 432) = 0;\n  *((_QWORD *)v7 + 55) = 0;\n  *((_QWORD *)v7 + 56) = 0;\n  *((_QWORD *)v7 + 57) = 0;\n  *((_QWORD *)v7 + 58) = 0;\n  *((_QWORD *)v7 + 59) = 0;\n  *((_QWORD *)v7 + 60) = 0;\n  *((_QWORD *)v7 + 61) = 0;\n  *((_QWORD *)v7 + 62) = 0;\n  if ( (unsigned __int8)MenuLayer::init(v7) )\n  {\n    cocos2d::CCObject::autorelease(v7);\n  }\n  else\n  {\n    (*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v7 + 8LL))(v7, 1);\n    v7 = nullptr;\n  }\n  (*(void (__fastcall **)(_DWORD *, cocos2d::CCLayer *))(*(_QWORD *)v5 + 464LL))(v5, v7);\n  if ( v4 )\n  {\n    v8 = cocos2d::CCCallFunc::create(v7, MenuLayer::onOptionsInstant);\n    v9 = cocos2d::CCDelayTime::create(0.0);\n    v10 = cocos2d::CCSequence::create(v9, v8, 0);\n    cocos2d::CCNode::runAction(v7, v10);\n  }\n  return v5;\n}", "assembly": "; \n; MenuLayer::scene from 0x140471f10 to 0x1404720b8 (424 bytes)\n; \n; 14 xrefs:\n; > CreatorLayer::onBack @ 0x14013978f\n; > CreatorLayer::keyBackClicked @ 0x140139973\n; > GameManager::returnToLastScene @ 0x1402875a8\n; > GameManager::returnToLastScene @ 0x1402875b7\n; > GameManager::safePopScene @ 0x14028769f\n; > GameManager::reloadMenu @ 0x140287784\n; > GameManager::reloadAllStep5 @ 0x140287ba8\n; > GJGarageLayer::onBack @ 0x140381a15\n; > LevelSelectLayer::onBack @ 0x140442e33\n; > LevelSelectLayer::keyBackClicked @ 0x140442e8a\n; > LoadingLayer::loadAssets @ 0x14046a43c\n; > LoadingLayer::loadAssets @ 0x14046a45d\n; > SecretLayer::onBack @ 0x140577a2e\n; > <???> @ 0x1409281e4\n; \n; This function is hookable on this platform (idp: pc, 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 11:32:39 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140471f10\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140471f15\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140471f1a\npush    rdi                                                            ; +0xf, 0x140471f1f\nsub     rsp, 20h                                                       ; +0x10, 0x140471f20\nmovzx   ebx, cl                                                        ; +0x14, 0x140471f24\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0x17, 0x140471f27\nmov     rsi, rax                                                       ; +0x1d, 0x140471f2d\nmov     dword ptr [rax+1Ch], 0Fh                                       ; +0x20, 0x140471f30\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x27, 0x140471f37\nmov     [rax+0E8h], rsi                                                ; +0x2d, 0x140471f3d\nmov     ecx, 200h; Size                                                ; +0x34, 0x140471f44\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x39, 0x140471f49\nmov     rdi, rax                                                       ; +0x3e, 0x140471f4e\nmov     [rsp+28h+arg_8], rax                                           ; +0x41, 0x140471f51\nmov     rcx, rax                                                       ; +0x46, 0x140471f56\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x49, 0x140471f59\nlea     rax, ??_7MenuLayer@@6B@; const MenuLayer::`vftable'            ; +0x4f, 0x140471f5f\nmov     [rdi], rax                                                     ; +0x56, 0x140471f66\nlea     rax, ??_7MenuLayer@@6B@_0; const MenuLayer::`vftable'          ; +0x59, 0x140471f69\nmov     [rdi+140h], rax                                                ; +0x60, 0x140471f70\nlea     rax, ??_7MenuLayer@@6B@_1; const MenuLayer::`vftable'          ; +0x67, 0x140471f77\nmov     [rdi+148h], rax                                                ; +0x6e, 0x140471f7e\nlea     rax, ??_7MenuLayer@@6B@_2; const MenuLayer::`vftable'          ; +0x75, 0x140471f85\nmov     [rdi+150h], rax                                                ; +0x7c, 0x140471f8c\nlea     rax, ??_7MenuLayer@@6B@_3; const MenuLayer::`vftable'          ; +0x83, 0x140471f93\nmov     [rdi+158h], rax                                                ; +0x8a, 0x140471f9a\nlea     rax, ??_7MenuLayer@@6B@_4; const MenuLayer::`vftable'          ; +0x91, 0x140471fa1\nmov     [rdi+160h], rax                                                ; +0x98, 0x140471fa8\nlea     rax, ??_7MenuLayer@@6B@_5; const MenuLayer::`vftable'          ; +0x9f, 0x140471faf\nmov     [rdi+198h], rax                                                ; +0xa6, 0x140471fb6\nlea     rax, ??_7MenuLayer@@6B@_6; const MenuLayer::`vftable'          ; +0xad, 0x140471fbd\nmov     [rdi+1A0h], rax                                                ; +0xb4, 0x140471fc4\nlea     rax, ??_7MenuLayer@@6B@_7; const MenuLayer::`vftable'          ; +0xbb, 0x140471fcb\nmov     [rdi+1A8h], rax                                                ; +0xc2, 0x140471fd2\nmov     byte ptr [rdi+1B0h], 0                                         ; +0xc9, 0x140471fd9\nxor     ebp, ebp                                                       ; +0xd0, 0x140471fe0\nmov     [rdi+1B8h], rbp                                                ; +0xd2, 0x140471fe2\nmov     [rdi+1C0h], rbp                                                ; +0xd9, 0x140471fe9\nmov     [rdi+1C8h], rbp                                                ; +0xe0, 0x140471ff0\nmov     [rdi+1D0h], rbp                                                ; +0xe7, 0x140471ff7\nmov     [rdi+1D8h], rbp                                                ; +0xee, 0x140471ffe\nmov     [rdi+1E0h], rbp                                                ; +0xf5, 0x140472005\nmov     [rdi+1E8h], rbp                                                ; +0xfc, 0x14047200c\nmov     [rdi+1F0h], rbp                                                ; +0x103, 0x140472013\nmov     rax, cs:off_1407B4430                                          ; +0x10a, 0x14047201a\nlea     rcx, MenuLayer__init                                           ; +0x111, 0x140472021\ncmp     rax, rcx                                                       ; +0x118, 0x140472028\nmov     rcx, rdi                                                       ; +0x11b, 0x14047202b\njnz     short loc_140472037                                            ; +0x11e, 0x14047202e\ncall    MenuLayer__init                                                ; +0x120, 0x140472030\njmp     short loc_140472039                                            ; +0x125, 0x140472035\ncall    rax ; MenuLayer__init                                          ; +0x127, 0x140472037\nmov     rcx, rdi                                                       ; +0x129, 0x140472039\ntest    al, al                                                         ; +0x12c, 0x14047203c\njz      short loc_140472048                                            ; +0x12e, 0x14047203e\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x130, 0x140472040\njmp     short loc_140472056                                            ; +0x136, 0x140472046\nmov     rax, [rdi]                                                     ; +0x138, 0x140472048\nmov     edx, 1                                                         ; +0x13b, 0x14047204b\ncall    qword ptr [rax+8]                                              ; +0x140, 0x140472050\nmov     rdi, rbp                                                       ; +0x143, 0x140472053\nmov     rax, [rsi]                                                     ; +0x146, 0x140472056\nmov     rdx, rdi                                                       ; +0x149, 0x140472059\nmov     rcx, rsi                                                       ; +0x14c, 0x14047205c\ncall    qword ptr [rax+1D0h]                                           ; +0x14f, 0x14047205f\ntest    bl, bl                                                         ; +0x155, 0x140472065\njz      short loc_1404720A0                                            ; +0x157, 0x140472067\nlea     rdx, MenuLayer__onOptionsInstant                               ; +0x159, 0x140472069\nmov     rcx, rdi                                                       ; +0x160, 0x140472070\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x163, 0x140472073\nmov     rbx, rax                                                       ; +0x169, 0x140472079\nxorps   xmm0, xmm0                                                     ; +0x16c, 0x14047207c\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x16f, 0x14047207f\nmov     rcx, rax                                                       ; +0x175, 0x140472085\nxor     r8d, r8d                                                       ; +0x178, 0x140472088\nmov     rdx, rbx                                                       ; +0x17b, 0x14047208b\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x17e, 0x14047208e\nmov     rdx, rax                                                       ; +0x184, 0x140472094\nmov     rcx, rdi                                                       ; +0x187, 0x140472097\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x18a, 0x14047209a\nmov     rax, rsi                                                       ; +0x190, 0x1404720a0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x193, 0x1404720a3\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x198, 0x1404720a8\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x19d, 0x1404720ad\nadd     rsp, 20h                                                       ; +0x1a2, 0x1404720b2\npop     rdi                                                            ; +0x1a6, 0x1404720b6\nretn                                                                   ; +0x1a7, 0x1404720b7", "xrefs": ["CreatorLayer::onBack @ 0x14013978f", "CreatorLayer::keyBackClicked @ 0x140139973", "GameManager::returnToLastScene @ 0x1402875a8", "GameManager::returnToLastScene @ 0x1402875b7", "GameManager::safePopScene @ 0x14028769f", "GameManager::reloadMenu @ 0x140287784", "GameManager::reloadAllStep5 @ 0x140287ba8", "GJGarageLayer::onBack @ 0x140381a15", "LevelSelectLayer::onBack @ 0x140442e33", "LevelSelectLayer::keyBackClicked @ 0x140442e8a", "LoadingLayer::loadAssets @ 0x14046a43c", "LoadingLayer::loadAssets @ 0x14046a45d", "SecretLayer::onBack @ 0x140577a2e", "<???> @ 0x1409281e4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}