{"type": "func", "start": 5371462256, "end": 5371462628, "name": "GameOptionsLayer::onPracticeMusicSync", "pseudocode": "// \n// GameOptionsLayer::onPracticeMusicSync from 0x1402a0270 to 0x1402a03e4 (372 bytes)\n// \n// 3 xrefs:\n// > GameOptionsLayer::setupOptions @ 0x14029f542\n// > <???> @ 0x1406d1f34\n// > <???> @ 0x1406d1f40\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=4\nvoid GameOptionsLayer::onPracticeMusicSync(GameOptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  GameStatsManager *v3; // rcx\n  __int64 v4; // rbx\n  __int64 v5; // rcx\n  bool v6; // bl\n  cocos2d::CCString *v7; // rax\n  bool v8; // bl\n  GameStatsManager *v9; // rcx\n  void *v10; // [rsp+20h] [rbp-38h]\n  void *v11; // [rsp+20h] [rbp-38h]\n  void *v12; // [rsp+20h] [rbp-38h]\n  _QWORD v13[4]; // [rsp+28h] [rbp-30h] BYREF\n\n  if ( !qword_1406C2EE8 )\n  {\n    v10 = operator new(0x3E0u);\n    qword_1406C2EE8 = sub_1401D0AE0((__int64)v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n  }\n  if ( GameStatsManager::isItemUnlocked((GameStatsManager *)a1, GJItem, 17) )\n  {\n    v4 = qword_1406C2EE8;\n    if ( !qword_1406C2EE8 )\n    {\n      v11 = operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0((__int64)v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n      v4 = qword_1406C2EE8;\n    }\n    if ( GameStatsManager::isItemUnlocked(v3, GJItem, 17) )\n    {\n      GameStatsManager::getItemKey(v5, v13, 0x11u, 0xCu);\n      v7 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v4 + 888), v13);\n      v6 = cocos2d::CCString::boolValue(v7);\n      sub_14003A830((__int64)v13);\n    }\n    else\n    {\n      v6 = 0;\n    }\n    v8 = !v6;\n    v9 = (GameStatsManager *)qword_1406C2EE8;\n    if ( !qword_1406C2EE8 )\n    {\n      v12 = operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0((__int64)v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n      v9 = (GameStatsManager *)qword_1406C2EE8;\n    }\n    GameStatsManager::toggleEnableItem(v9, GJItem, 17, v8);\n    a1->m_baseGameLayer->toggleMusicInPractice(a1->m_baseGameLayer);\n  }\n  else\n  {\n    GameOptionsLayer::showPracticeMusicSyncUnlockInfo(a1);\n  }\n}", "assembly": "; \n; GameOptionsLayer::onPracticeMusicSync from 0x1402a0270 to 0x1402a03e4 (372 bytes)\n; \n; 3 xrefs:\n; > GameOptionsLayer::setupOptions @ 0x14029f542\n; > <???> @ 0x1406d1f34\n; > <???> @ 0x1406d1f40\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, 0x1402a0270\npush    rdi                                                            ; +0x5, 0x1402a0275\nsub     rsp, 50h                                                       ; +0x6, 0x1402a0276\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1402a027a\nxor     rax, rsp                                                       ; +0x11, 0x1402a0281\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x1402a0284\nmov     rdi, rcx                                                       ; +0x19, 0x1402a0289\ncmp     cs:qword_1406C2EE8, 0                                          ; +0x1c, 0x1402a028c\njnz     short loc_1402A02BE                                            ; +0x24, 0x1402a0294\nmov     ecx, 3E0h; Size                                                ; +0x26, 0x1402a0296\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2b, 0x1402a029b\nmov     [rsp+58h+var_38], rax                                          ; +0x30, 0x1402a02a0\nmov     rcx, rax                                                       ; +0x35, 0x1402a02a5\ncall    sub_1401D0AE0                                                  ; +0x38, 0x1402a02a8\nnop                                                                    ; +0x3d, 0x1402a02ad\nmov     cs:qword_1406C2EE8, rax                                        ; +0x3e, 0x1402a02ae\nmov     rdx, [rax]                                                     ; +0x45, 0x1402a02b5\nmov     rcx, rax                                                       ; +0x48, 0x1402a02b8\ncall    qword ptr [rdx+48h]                                            ; +0x4b, 0x1402a02bb\nmov     edx, 0Ch                                                       ; +0x4e, 0x1402a02be\nlea     r8d, [rdx+5]                                                   ; +0x53, 0x1402a02c3\ncall    GameStatsManager__isItemUnlocked                               ; +0x57, 0x1402a02c7\ntest    al, al                                                         ; +0x5c, 0x1402a02cc\njnz     short loc_1402A02DD                                            ; +0x5e, 0x1402a02ce\nmov     rcx, rdi                                                       ; +0x60, 0x1402a02d0\ncall    GameOptionsLayer__showPracticeMusicSyncUnlockInfo              ; +0x63, 0x1402a02d3\njmp     loc_1402A03CC                                                  ; +0x68, 0x1402a02d8\nmov     rbx, cs:qword_1406C2EE8                                        ; +0x6d, 0x1402a02dd\ntest    rbx, rbx                                                       ; +0x74, 0x1402a02e4\njnz     short loc_1402A0318                                            ; +0x77, 0x1402a02e7\nmov     ecx, 3E0h; Size                                                ; +0x79, 0x1402a02e9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7e, 0x1402a02ee\nmov     [rsp+58h+var_38], rax                                          ; +0x83, 0x1402a02f3\nmov     rcx, rax                                                       ; +0x88, 0x1402a02f8\ncall    sub_1401D0AE0                                                  ; +0x8b, 0x1402a02fb\nnop                                                                    ; +0x90, 0x1402a0300\nmov     cs:qword_1406C2EE8, rax                                        ; +0x91, 0x1402a0301\nmov     rdx, [rax]                                                     ; +0x98, 0x1402a0308\nmov     rcx, rax                                                       ; +0x9b, 0x1402a030b\ncall    qword ptr [rdx+48h]                                            ; +0x9e, 0x1402a030e\nmov     rbx, cs:qword_1406C2EE8                                        ; +0xa1, 0x1402a0311\nmov     edx, 0Ch                                                       ; +0xa8, 0x1402a0318\nlea     r8d, [rdx+5]                                                   ; +0xad, 0x1402a031d\ncall    GameStatsManager__isItemUnlocked                               ; +0xb1, 0x1402a0321\ntest    al, al                                                         ; +0xb6, 0x1402a0326\njnz     short loc_1402A032E                                            ; +0xb8, 0x1402a0328\nxor     bl, bl                                                         ; +0xba, 0x1402a032a\njmp     short loc_1402A036B                                            ; +0xbc, 0x1402a032c\nmov     r9d, 0Ch                                                       ; +0xbe, 0x1402a032e\nlea     r8d, [r9+5]                                                    ; +0xc4, 0x1402a0334\nlea     rdx, [rsp+58h+var_30]                                          ; +0xc8, 0x1402a0338\ncall    GameStatsManager__getItemKey                                   ; +0xcd, 0x1402a033d\nnop                                                                    ; +0xd2, 0x1402a0342\nlea     rdx, [rsp+58h+var_30]                                          ; +0xd3, 0x1402a0343\nmov     rcx, [rbx+378h]                                                ; +0xd8, 0x1402a0348\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 &) ; +0xdf, 0x1402a034f\nmov     rcx, rax                                                       ; +0xe5, 0x1402a0355\ncall    cs:?boolValue@CCString@cocos2d@@QEBA_NXZ; cocos2d::CCString::boolValue(void) ; +0xe8, 0x1402a0358\nmovzx   ebx, al                                                        ; +0xee, 0x1402a035e\nlea     rcx, [rsp+58h+var_30]                                          ; +0xf1, 0x1402a0361\ncall    sub_14003A830                                                  ; +0xf6, 0x1402a0366\nxor     bl, 1                                                          ; +0xfb, 0x1402a036b\nmov     rcx, cs:qword_1406C2EE8                                        ; +0xfe, 0x1402a036e\ntest    rcx, rcx                                                       ; +0x105, 0x1402a0375\njnz     short loc_1402A03AA                                            ; +0x108, 0x1402a0378\nmov     ecx, 3E0h; Size                                                ; +0x10a, 0x1402a037a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10f, 0x1402a037f\nmov     [rsp+58h+var_38], rax                                          ; +0x114, 0x1402a0384\nmov     rcx, rax                                                       ; +0x119, 0x1402a0389\ncall    sub_1401D0AE0                                                  ; +0x11c, 0x1402a038c\nnop                                                                    ; +0x121, 0x1402a0391\nmov     cs:qword_1406C2EE8, rax                                        ; +0x122, 0x1402a0392\nmov     r10, [rax]                                                     ; +0x129, 0x1402a0399\nmov     rcx, rax                                                       ; +0x12c, 0x1402a039c\ncall    qword ptr [r10+48h]                                            ; +0x12f, 0x1402a039f\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x133, 0x1402a03a3\nmovzx   r9d, bl                                                        ; +0x13a, 0x1402a03aa\nmov     edx, 0Ch                                                       ; +0x13e, 0x1402a03ae\nlea     r8d, [rdx+5]                                                   ; +0x143, 0x1402a03b3\ncall    GameStatsManager__toggleEnableItem                             ; +0x147, 0x1402a03b7\nmov     rcx, [rdi+3F0h]                                                ; +0x14c, 0x1402a03bc\nmov     rax, [rcx]                                                     ; +0x153, 0x1402a03c3\ncall    qword ptr [rax+570h]                                           ; +0x156, 0x1402a03c6\nmov     rcx, [rsp+58h+var_10]                                          ; +0x15c, 0x1402a03cc\nxor     rcx, rsp; StackCookie                                          ; +0x161, 0x1402a03d1\ncall    __security_check_cookie                                        ; +0x164, 0x1402a03d4\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x169, 0x1402a03d9\nadd     rsp, 50h                                                       ; +0x16e, 0x1402a03de\npop     rdi                                                            ; +0x172, 0x1402a03e2\nretn                                                                   ; +0x173, 0x1402a03e3", "xrefs": ["GameOptionsLayer::setupOptions @ 0x14029f542", "<???> @ 0x1406d1f34", "<???> @ 0x1406d1f40"], "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"}