{"type": "func", "start": 5373510320, "end": 5373510517, "name": "SongInfoLayer::onMenuMusic", "pseudocode": "// \n// SongInfoLayer::onMenuMusic from 0x1404942b0 to 0x140494375 (197 bytes)\n// \n// 3 xrefs:\n// > SongInfoLayer::init @ 0x1404938ce\n// > <???> @ 0x1406dc134\n// > <???> @ 0x1406dc140\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// Hidden C++ exception states: #wind=5\nvoid SongInfoLayer::onMenuMusic(SongInfoLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  int m_songID; // eax\n  void *v5; // [rsp+40h] [rbp+18h]\n  void *v6; // [rsp+40h] [rbp+18h]\n\n  if ( !qword_1406C2EE8 )\n  {\n    v5 = operator new(0x3E0u);\n    qword_1406C2EE8 = sub_1401D0AE0((__int64)v5);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n  }\n  if ( GameStatsManager::isItemUnlocked((GameStatsManager *)a1, GJItem, 16) )\n  {\n    if ( a1->m_songID > 0 )\n    {\n      v3 = (GameManager *)qword_1406C2ED8;\n      if ( !qword_1406C2ED8 )\n      {\n        v6 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00((__int64)v6);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v3 = (GameManager *)qword_1406C2ED8;\n      }\n      m_songID = a1->m_songID;\n      if ( v3->m_customMenuSongID == m_songID )\n        m_songID = 0;\n      v3->m_customMenuSongID = m_songID;\n      GameManager::fadeInMenuMusic(v3);\n    }\n  }\n  else\n  {\n    SongInfoLayer::showCustomMusicUnlockInfo(a1);\n  }\n}", "assembly": "; \n; SongInfoLayer::onMenuMusic from 0x1404942b0 to 0x140494375 (197 bytes)\n; \n; 3 xrefs:\n; > SongInfoLayer::init @ 0x1404938ce\n; > <???> @ 0x1406dc134\n; > <???> @ 0x1406dc140\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\npush    rbx                                                            ; +0x0, 0x1404942b0\nsub     rsp, 20h                                                       ; +0x2, 0x1404942b2\nmov     rbx, rcx                                                       ; +0x6, 0x1404942b6\ncmp     cs:qword_1406C2EE8, 0                                          ; +0x9, 0x1404942b9\njnz     short loc_1404942EB                                            ; +0x11, 0x1404942c1\nmov     ecx, 3E0h; Size                                                ; +0x13, 0x1404942c3\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x18, 0x1404942c8\nmov     [rsp+28h+arg_10], rax                                          ; +0x1d, 0x1404942cd\nmov     rcx, rax                                                       ; +0x22, 0x1404942d2\ncall    sub_1401D0AE0                                                  ; +0x25, 0x1404942d5\nnop                                                                    ; +0x2a, 0x1404942da\nmov     cs:qword_1406C2EE8, rax                                        ; +0x2b, 0x1404942db\nmov     rdx, [rax]                                                     ; +0x32, 0x1404942e2\nmov     rcx, rax                                                       ; +0x35, 0x1404942e5\ncall    qword ptr [rdx+48h]                                            ; +0x38, 0x1404942e8\nmov     edx, 0Ch                                                       ; +0x3b, 0x1404942eb\nlea     r8d, [rdx+4]                                                   ; +0x40, 0x1404942f0\ncall    GameStatsManager__isItemUnlocked                               ; +0x44, 0x1404942f4\ntest    al, al                                                         ; +0x49, 0x1404942f9\njnz     short loc_14049430A                                            ; +0x4b, 0x1404942fb\nmov     rcx, rbx                                                       ; +0x4d, 0x1404942fd\nadd     rsp, 20h                                                       ; +0x50, 0x140494300\npop     rbx                                                            ; +0x54, 0x140494304\njmp     SongInfoLayer__showCustomMusicUnlockInfo                       ; +0x55, 0x140494305\ncmp     dword ptr [rbx+2F8h], 0                                        ; +0x5a, 0x14049430a\njle     short loc_14049436F                                            ; +0x61, 0x140494311\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x63, 0x140494313\ntest    rcx, rcx                                                       ; +0x6a, 0x14049431a\njnz     short loc_14049434E                                            ; +0x6d, 0x14049431d\nmov     ecx, 668h; Size                                                ; +0x6f, 0x14049431f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x74, 0x140494324\nmov     [rsp+28h+arg_10], rax                                          ; +0x79, 0x140494329\nmov     rcx, rax                                                       ; +0x7e, 0x14049432e\ncall    sub_14017AB00                                                  ; +0x81, 0x140494331\nnop                                                                    ; +0x86, 0x140494336\nmov     cs:qword_1406C2ED8, rax                                        ; +0x87, 0x140494337\nmov     rdx, [rax]                                                     ; +0x8e, 0x14049433e\nmov     rcx, rax                                                       ; +0x91, 0x140494341\ncall    qword ptr [rdx+48h]                                            ; +0x94, 0x140494344\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x97, 0x140494347\nmov     eax, [rbx+2F8h]                                                ; +0x9e, 0x14049434e\nxor     edx, edx                                                       ; +0xa4, 0x140494354\ncmp     [rcx+438h], eax                                                ; +0xa6, 0x140494356\ncmovz   eax, edx                                                       ; +0xac, 0x14049435c\nmov     [rcx+438h], eax                                                ; +0xaf, 0x14049435f\nadd     rsp, 20h                                                       ; +0xb5, 0x140494365\npop     rbx                                                            ; +0xb9, 0x140494369\njmp     GameManager__fadeInMenuMusic                                   ; +0xba, 0x14049436a\nadd     rsp, 20h                                                       ; +0xbf, 0x14049436f\npop     rbx                                                            ; +0xc3, 0x140494373\nretn                                                                   ; +0xc4, 0x140494374", "xrefs": ["SongInfoLayer::init @ 0x1404938ce", "<???> @ 0x1406dc134", "<???> @ 0x1406dc140"], "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"}