{"type": "func", "start": 5372586240, "end": 5372586541, "name": "PlayLayer::toggleMusicInPractice", "pseudocode": "// \n// PlayLayer::toggleMusicInPractice from 0x1403b2900 to 0x1403b2a2d (301 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405c9d00\n// > <???> @ 0x1406d6e60\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=3\nvoid PlayLayer::toggleMusicInPractice(PlayLayer *a1)\n{\n  __int64 v2; // rbx\n  __int64 v3; // rcx\n  cocos2d::CCString *v4; // rax\n  bool v5; // bl\n  GameManager *v6; // rcx\n  void *v7; // [rsp+20h] [rbp-38h]\n  void *v8; // [rsp+20h] [rbp-38h]\n  _QWORD v9[4]; // [rsp+28h] [rbp-30h] BYREF\n\n  v2 = qword_1406C2EE8;\n  if ( !qword_1406C2EE8 )\n  {\n    v7 = operator new(0x3E0u);\n    qword_1406C2EE8 = sub_1401D0AE0((__int64)v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n    v2 = qword_1406C2EE8;\n  }\n  if ( GameStatsManager::isItemUnlocked((GameStatsManager *)a1, GJItem, 17) )\n  {\n    GameStatsManager::getItemKey(v3, v9, 0x11u, 0xCu);\n    v4 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 888), v9);\n    v5 = cocos2d::CCString::boolValue(v4);\n    sub_14003A830((__int64)v9);\n    if ( v5 )\n      goto LABEL_9;\n  }\n  v6 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v8 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v6 = (GameManager *)qword_1406C2ED8;\n  }\n  if ( GameManager::getGameVariable(v6, \"0125\") && a1->m_level->m_levelType == Editor )\nLABEL_9:\n    a1->m_practiceMusicSync = 1;\n  else\n    a1->m_practiceMusicSync = 0;\n}", "assembly": "; \n; PlayLayer::toggleMusicInPractice from 0x1403b2900 to 0x1403b2a2d (301 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405c9d00\n; > <???> @ 0x1406d6e60\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_8], rbx                                               ; +0x0, 0x1403b2900\npush    rdi                                                            ; +0x5, 0x1403b2905\nsub     rsp, 50h                                                       ; +0x6, 0x1403b2906\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1403b290a\nxor     rax, rsp                                                       ; +0x11, 0x1403b2911\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x1403b2914\nmov     rdi, rcx                                                       ; +0x19, 0x1403b2919\nmov     rbx, cs:qword_1406C2EE8                                        ; +0x1c, 0x1403b291c\ntest    rbx, rbx                                                       ; +0x23, 0x1403b2923\njnz     short loc_1403B2957                                            ; +0x26, 0x1403b2926\nmov     ecx, 3E0h; Size                                                ; +0x28, 0x1403b2928\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2d, 0x1403b292d\nmov     [rsp+58h+var_38], rax                                          ; +0x32, 0x1403b2932\nmov     rcx, rax                                                       ; +0x37, 0x1403b2937\ncall    sub_1401D0AE0                                                  ; +0x3a, 0x1403b293a\nnop                                                                    ; +0x3f, 0x1403b293f\nmov     cs:qword_1406C2EE8, rax                                        ; +0x40, 0x1403b2940\nmov     rdx, [rax]                                                     ; +0x47, 0x1403b2947\nmov     rcx, rax                                                       ; +0x4a, 0x1403b294a\ncall    qword ptr [rdx+48h]                                            ; +0x4d, 0x1403b294d\nmov     rbx, cs:qword_1406C2EE8                                        ; +0x50, 0x1403b2950\nmov     edx, 0Ch                                                       ; +0x57, 0x1403b2957\nlea     r8d, [rdx+5]                                                   ; +0x5c, 0x1403b295c\ncall    GameStatsManager__isItemUnlocked                               ; +0x60, 0x1403b2960\ntest    al, al                                                         ; +0x65, 0x1403b2965\njz      short loc_1403B29AA                                            ; +0x67, 0x1403b2967\nmov     r9d, 0Ch                                                       ; +0x69, 0x1403b2969\nlea     r8d, [r9+5]                                                    ; +0x6f, 0x1403b296f\nlea     rdx, [rsp+58h+var_30]                                          ; +0x73, 0x1403b2973\ncall    GameStatsManager__getItemKey                                   ; +0x78, 0x1403b2978\nnop                                                                    ; +0x7d, 0x1403b297d\nlea     rdx, [rsp+58h+var_30]                                          ; +0x7e, 0x1403b297e\nmov     rcx, [rbx+378h]                                                ; +0x83, 0x1403b2983\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x8a, 0x1403b298a\nmov     rcx, rax                                                       ; +0x90, 0x1403b2990\ncall    cs:?boolValue@CCString@cocos2d@@QEBA_NXZ; cocos2d::CCString::boolValue(void) ; +0x93, 0x1403b2993\nmovzx   ebx, al                                                        ; +0x99, 0x1403b2999\nlea     rcx, [rsp+58h+var_30]                                          ; +0x9c, 0x1403b299c\ncall    sub_14003A830                                                  ; +0xa1, 0x1403b29a1\ntest    bl, bl                                                         ; +0xa6, 0x1403b29a6\njnz     short loc_1403B2A05                                            ; +0xa8, 0x1403b29a8\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xaa, 0x1403b29aa\ntest    rcx, rcx                                                       ; +0xb1, 0x1403b29b1\njnz     short loc_1403B29E5                                            ; +0xb4, 0x1403b29b4\nmov     ecx, 668h; Size                                                ; +0xb6, 0x1403b29b6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xbb, 0x1403b29bb\nmov     [rsp+58h+var_38], rax                                          ; +0xc0, 0x1403b29c0\nmov     rcx, rax                                                       ; +0xc5, 0x1403b29c5\ncall    sub_14017AB00                                                  ; +0xc8, 0x1403b29c8\nnop                                                                    ; +0xcd, 0x1403b29cd\nmov     cs:qword_1406C2ED8, rax                                        ; +0xce, 0x1403b29ce\nmov     rdx, [rax]                                                     ; +0xd5, 0x1403b29d5\nmov     rcx, rax                                                       ; +0xd8, 0x1403b29d8\ncall    qword ptr [rdx+48h]                                            ; +0xdb, 0x1403b29db\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xde, 0x1403b29de\nlea     rdx, a0125; \"0125\"                                             ; +0xe5, 0x1403b29e5\ncall    GameManager__getGameVariable                                   ; +0xec, 0x1403b29ec\ntest    al, al                                                         ; +0xf1, 0x1403b29f1\njz      short loc_1403B2A0E                                            ; +0xf3, 0x1403b29f3\nmov     rax, [rdi+878h]                                                ; +0xf5, 0x1403b29f5\ncmp     dword ptr [rax+454h], 2                                        ; +0xfc, 0x1403b29fc\njnz     short loc_1403B2A0E                                            ; +0x103, 0x1403b2a03\nmov     byte ptr [rdi+31F1h], 1                                        ; +0x105, 0x1403b2a05\njmp     short loc_1403B2A15                                            ; +0x10c, 0x1403b2a0c\nmov     byte ptr [rdi+31F1h], 0                                        ; +0x10e, 0x1403b2a0e\nmov     rcx, [rsp+58h+var_10]                                          ; +0x115, 0x1403b2a15\nxor     rcx, rsp; StackCookie                                          ; +0x11a, 0x1403b2a1a\ncall    __security_check_cookie                                        ; +0x11d, 0x1403b2a1d\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x122, 0x1403b2a22\nadd     rsp, 50h                                                       ; +0x127, 0x1403b2a27\npop     rdi                                                            ; +0x12b, 0x1403b2a2b\nretn                                                                   ; +0x12c, 0x1403b2a2c", "xrefs": ["<???> @ 0x1405c9d00", "<???> @ 0x1406d6e60"], "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"}