{"type": "func", "start": 5373369792, "end": 5373370126, "name": "MenuLayer::dMenuLayer", "pseudocode": "// \n// MenuLayer::dMenuLayer from 0x140471dc0 to 0x140471f0e (334 bytes)\n// \n// 3 xrefs:\n// > sub_1404755D8 @ 0x1404755df\n// > <???> @ 0x1407b43f0\n// > <???> @ 0x1409281d8\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\ncocos2d::CCLayer *__fastcall MenuLayer::dMenuLayer(cocos2d::CCLayer *Block, char a2)\n{\n  __int64 v4; // rcx\n  void *v5; // rax\n  __int64 v6; // rax\n  void *v7; // rax\n\n  *(_QWORD *)Block = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 40) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 41) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 42) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 43) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 44) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 51) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 52) = &MenuLayer::`vftable';\n  *((_QWORD *)Block + 53) = &MenuLayer::`vftable';\n  v4 = qword_14090C070;\n  if ( !qword_14090C070 )\n  {\n    v5 = operator new(0x3D0u);\n    qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v5);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n    v4 = qword_14090C070;\n  }\n  MusicDownloadManager::removeMusicDownloadDelegate(v4, (char *)Block + 424);\n  v6 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v7 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v6 = qword_14090BFD0;\n  }\n  *(_QWORD *)(v6 + 592) = 0;\n  MenuLayer::willClose(Block);\n  cocos2d::CCLayer::~CCLayer(Block);\n  if ( (a2 & 1) != 0 )\n    j_j_free(Block);\n  return Block;\n}", "assembly": "; \n; MenuLayer::dMenuLayer from 0x140471dc0 to 0x140471f0e (334 bytes)\n; \n; 3 xrefs:\n; > sub_1404755D8 @ 0x1404755df\n; > <???> @ 0x1407b43f0\n; > <???> @ 0x1409281d8\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, 0x140471dc0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x140471dc5\npush    rdi                                                            ; +0xa, 0x140471dca\nsub     rsp, 20h                                                       ; +0xb, 0x140471dcb\nmov     esi, edx                                                       ; +0xf, 0x140471dcf\nmov     rbx, rcx                                                       ; +0x11, 0x140471dd1\nlea     rax, ??_7MenuLayer@@6B@; const MenuLayer::`vftable'            ; +0x14, 0x140471dd4\nmov     [rcx], rax                                                     ; +0x1b, 0x140471ddb\nlea     rax, ??_7MenuLayer@@6B@_0; const MenuLayer::`vftable'          ; +0x1e, 0x140471dde\nmov     [rcx+140h], rax                                                ; +0x25, 0x140471de5\nlea     rax, ??_7MenuLayer@@6B@_1; const MenuLayer::`vftable'          ; +0x2c, 0x140471dec\nmov     [rcx+148h], rax                                                ; +0x33, 0x140471df3\nlea     rax, ??_7MenuLayer@@6B@_2; const MenuLayer::`vftable'          ; +0x3a, 0x140471dfa\nmov     [rcx+150h], rax                                                ; +0x41, 0x140471e01\nlea     rax, ??_7MenuLayer@@6B@_3; const MenuLayer::`vftable'          ; +0x48, 0x140471e08\nmov     [rcx+158h], rax                                                ; +0x4f, 0x140471e0f\nlea     rax, ??_7MenuLayer@@6B@_4; const MenuLayer::`vftable'          ; +0x56, 0x140471e16\nmov     [rcx+160h], rax                                                ; +0x5d, 0x140471e1d\nlea     rax, ??_7MenuLayer@@6B@_5; const MenuLayer::`vftable'          ; +0x64, 0x140471e24\nmov     [rcx+198h], rax                                                ; +0x6b, 0x140471e2b\nlea     rax, ??_7MenuLayer@@6B@_6; const MenuLayer::`vftable'          ; +0x72, 0x140471e32\nmov     [rcx+1A0h], rax                                                ; +0x79, 0x140471e39\nlea     rax, ??_7MenuLayer@@6B@_7; const MenuLayer::`vftable'          ; +0x80, 0x140471e40\nmov     [rcx+1A8h], rax                                                ; +0x87, 0x140471e47\nmov     rcx, cs:qword_14090C070                                        ; +0x8e, 0x140471e4e\ntest    rcx, rcx                                                       ; +0x95, 0x140471e55\njnz     short loc_140471E87                                            ; +0x98, 0x140471e58\nmov     ecx, 3D0h; Size                                                ; +0x9a, 0x140471e5a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x9f, 0x140471e5f\nmov     rcx, rax                                                       ; +0xa4, 0x140471e64\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0xa7, 0x140471e67\nmov     cs:qword_14090C070, rax                                        ; +0xac, 0x140471e6c\nmov     rcx, [rax]                                                     ; +0xb3, 0x140471e73\nmov     r8, [rcx+48h]                                                  ; +0xb6, 0x140471e76\nmov     rcx, rax                                                       ; +0xba, 0x140471e7a\ncall    r8                                                             ; +0xbd, 0x140471e7d\nmov     rcx, cs:qword_14090C070                                        ; +0xc0, 0x140471e80\nlea     rdx, [rbx+1A8h]                                                ; +0xc7, 0x140471e87\ncall    MusicDownloadManager__removeMusicDownloadDelegate              ; +0xce, 0x140471e8e\nmov     rax, cs:qword_14090BFD0                                        ; +0xd3, 0x140471e93\ntest    rax, rax                                                       ; +0xda, 0x140471e9a\njnz     short loc_140471ECB                                            ; +0xdd, 0x140471e9d\nmov     ecx, 6E8h; Size                                                ; +0xdf, 0x140471e9f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xe4, 0x140471ea4\nmov     rcx, rax                                                       ; +0xe9, 0x140471ea9\ncall    GameManager__GameManager                                       ; +0xec, 0x140471eac\nmov     cs:qword_14090BFD0, rax                                        ; +0xf1, 0x140471eb1\nmov     rcx, [rax]                                                     ; +0xf8, 0x140471eb8\nmov     rdx, [rcx+48h]                                                 ; +0xfb, 0x140471ebb\nmov     rcx, rax                                                       ; +0xff, 0x140471ebf\ncall    rdx                                                            ; +0x102, 0x140471ec2\nmov     rax, cs:qword_14090BFD0                                        ; +0x104, 0x140471ec4\nmov     qword ptr [rax+250h], 0                                        ; +0x10b, 0x140471ecb\nmov     rcx, rbx                                                       ; +0x116, 0x140471ed6\ncall    MenuLayer__willClose                                           ; +0x119, 0x140471ed9\nmov     rcx, rbx                                                       ; +0x11e, 0x140471ede\ncall    cs:__imp_??1CCLayer@cocos2d@@UEAA@XZ; cocos2d::CCLayer::~CCLayer(void) ; +0x121, 0x140471ee1\nnop                                                                    ; +0x127, 0x140471ee7\ntest    sil, 1                                                         ; +0x128, 0x140471ee8\njz      short loc_140471EFB                                            ; +0x12c, 0x140471eec\nmov     edx, 200h                                                      ; +0x12e, 0x140471eee\nmov     rcx, rbx; Block                                                ; +0x133, 0x140471ef3\ncall    j_j_free                                                       ; +0x136, 0x140471ef6\nmov     rax, rbx                                                       ; +0x13b, 0x140471efb\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x13e, 0x140471efe\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x143, 0x140471f03\nadd     rsp, 20h                                                       ; +0x148, 0x140471f08\npop     rdi                                                            ; +0x14c, 0x140471f0c\nretn                                                                   ; +0x14d, 0x140471f0d", "xrefs": ["sub_1404755D8 @ 0x1404755df", "<???> @ 0x1407b43f0", "<???> @ 0x1409281d8"], "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"}