{"type": "func", "start": 5370267872, "end": 5370268059, "name": "GameManager::isColorUnlocked", "pseudocode": "// \n// GameManager::isColorUnlocked from 0x14017c8e0 to 0x14017c99b (187 bytes)\n// \n// 6 xrefs:\n// > CharacterColorPage::updateColorMode @ 0x140089a13\n// > CharacterColorPage::onPlayerColor @ 0x140089e1d\n// > GameManager::checkUsedIcons @ 0x140184237\n// > GameManager::checkUsedIcons @ 0x1401842cf\n// > GameManager::checkUsedIcons @ 0x14018435a\n// > <???> @ 0x1406cb3ac\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=2\nbool GameManager::isColorUnlocked(GameManager *a1, int a2, UnlockType a3)\n{\n  _QWORD *v7; // rax\n  cocos2d::CCString *v8; // rax\n  bool v9; // bl\n  GameStatsManager *v10; // rcx\n  void *v11; // [rsp+20h] [rbp-48h]\n  _QWORD v12[4]; // [rsp+28h] [rbp-40h] BYREF\n\n  if ( a2 < 4 )\n    return 1;\n  v7 = GameManager::colorKey((__int64)a1, v12, a2, a3);\n  v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(a1->m_valueKeeper, v7);\n  v9 = cocos2d::CCString::boolValue(v8);\n  sub_14003A830((__int64)v12);\n  if ( !v9 )\n  {\n    if ( !qword_1406C2EE8 )\n    {\n      v11 = operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0(v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n    }\n    return GameStatsManager::isItemUnlocked(v10, a3, a2);\n  }\n  return v9;\n}", "assembly": "; \n; GameManager::isColorUnlocked from 0x14017c8e0 to 0x14017c99b (187 bytes)\n; \n; 6 xrefs:\n; > CharacterColorPage::updateColorMode @ 0x140089a13\n; > CharacterColorPage::onPlayerColor @ 0x140089e1d\n; > GameManager::checkUsedIcons @ 0x140184237\n; > GameManager::checkUsedIcons @ 0x1401842cf\n; > GameManager::checkUsedIcons @ 0x14018435a\n; > <???> @ 0x1406cb3ac\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, 0x14017c8e0\npush    rsi                                                            ; +0x2, 0x14017c8e2\npush    rdi                                                            ; +0x3, 0x14017c8e3\nsub     rsp, 50h                                                       ; +0x4, 0x14017c8e4\nmov     rax, cs:__security_cookie                                      ; +0x8, 0x14017c8e8\nxor     rax, rsp                                                       ; +0xf, 0x14017c8ef\nmov     [rsp+68h+var_20], rax                                          ; +0x12, 0x14017c8f2\nmov     esi, r8d                                                       ; +0x17, 0x14017c8f7\nmov     edi, edx                                                       ; +0x1a, 0x14017c8fa\nmov     rbx, rcx                                                       ; +0x1c, 0x14017c8fc\ncmp     edx, 4                                                         ; +0x1f, 0x14017c8ff\njge     short loc_14017C908                                            ; +0x22, 0x14017c902\nmov     al, 1                                                          ; +0x24, 0x14017c904\njmp     short loc_14017C986                                            ; +0x26, 0x14017c906\nmov     r9d, esi                                                       ; +0x28, 0x14017c908\nmov     r8d, edi                                                       ; +0x2b, 0x14017c90b\nlea     rdx, [rsp+68h+var_40]                                          ; +0x2e, 0x14017c90e\ncall    GameManager__colorKey                                          ; +0x33, 0x14017c913\nnop                                                                    ; +0x38, 0x14017c918\nmov     rdx, rax                                                       ; +0x39, 0x14017c919\nmov     rcx, [rbx+198h]                                                ; +0x3c, 0x14017c91c\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 &) ; +0x43, 0x14017c923\nmov     rcx, rax                                                       ; +0x49, 0x14017c929\ncall    cs:?boolValue@CCString@cocos2d@@QEBA_NXZ; cocos2d::CCString::boolValue(void) ; +0x4c, 0x14017c92c\nmovzx   ebx, al                                                        ; +0x52, 0x14017c932\nlea     rcx, [rsp+68h+var_40]                                          ; +0x55, 0x14017c935\ncall    sub_14003A830                                                  ; +0x5a, 0x14017c93a\ntest    bl, bl                                                         ; +0x5f, 0x14017c93f\njnz     short loc_14017C983                                            ; +0x61, 0x14017c941\ncmp     cs:qword_1406C2EE8, 0                                          ; +0x63, 0x14017c943\njnz     short loc_14017C976                                            ; +0x6b, 0x14017c94b\nmov     ecx, 3E0h; Size                                                ; +0x6d, 0x14017c94d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x72, 0x14017c952\nmov     [rsp+68h+var_48], rax                                          ; +0x77, 0x14017c957\nmov     rcx, rax                                                       ; +0x7c, 0x14017c95c\ncall    sub_1401D0AE0                                                  ; +0x7f, 0x14017c95f\nnop                                                                    ; +0x84, 0x14017c964\nmov     cs:qword_1406C2EE8, rax                                        ; +0x85, 0x14017c965\nmov     r9, [rax]                                                      ; +0x8c, 0x14017c96c\nmov     rcx, rax                                                       ; +0x8f, 0x14017c96f\ncall    qword ptr [r9+48h]                                             ; +0x92, 0x14017c972\nmov     r8d, edi                                                       ; +0x96, 0x14017c976\nmov     edx, esi                                                       ; +0x99, 0x14017c979\ncall    GameStatsManager__isItemUnlocked                               ; +0x9b, 0x14017c97b\nmovzx   ebx, al                                                        ; +0xa0, 0x14017c980\nmovzx   eax, bl                                                        ; +0xa3, 0x14017c983\nmov     rcx, [rsp+68h+var_20]                                          ; +0xa6, 0x14017c986\nxor     rcx, rsp; StackCookie                                          ; +0xab, 0x14017c98b\ncall    __security_check_cookie                                        ; +0xae, 0x14017c98e\nadd     rsp, 50h                                                       ; +0xb3, 0x14017c993\npop     rdi                                                            ; +0xb7, 0x14017c997\npop     rsi                                                            ; +0xb8, 0x14017c998\npop     rbx                                                            ; +0xb9, 0x14017c999\nretn                                                                   ; +0xba, 0x14017c99a", "xrefs": ["CharacterColorPage::updateColorMode @ 0x140089a13", "CharacterColorPage::onPlayerColor @ 0x140089e1d", "GameManager::checkUsedIcons @ 0x140184237", "GameManager::checkUsedIcons @ 0x1401842cf", "GameManager::checkUsedIcons @ 0x14018435a", "<???> @ 0x1406cb3ac"], "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"}