{"type": "func", "start": 9173096, "end": 9173528, "name": "GJEffectManager::colorForGroupID", "pseudocode": "// \n// GJEffectManager::colorForGroupID from 0x8bf868 to 0x8bfa18 (432 bytes)\n// \n// 6 xrefs:\n// > GameObject::groupColor @ 0x64a698\n// > LevelEditorLayer::updateObjectColors @ 0x65f8a0\n// > LevelEditorLayer::updateObjectColors @ 0x65fa90\n// > LevelEditorLayer::updateVisibility @ 0x662f24\n// > LevelEditorLayer::updateVisibility @ 0x66344c\n// > <???> @ 0x2b500\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\ncocos2d::ccColor3B GJEffectManager::colorForGroupID(GJEffectManager *a1, int a2, const cocos2d::ccColor3B *a3, bool a4)\n{\n  unsigned int v4; // w22\n  int v6; // w19\n  unsigned __int64 v7; // x3\n  GLubyte v8; // w0\n  std::uintptr_t *m_bitptr; // x1\n  std::_Hashtable<int, std::pair<const int, std::vector<PulseEffectAction>>, std::allocator<std::pair<const int, std::vector<PulseEffectAction>>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::size_type M_bucket_count; // x1\n  GLubyte b; // w5\n  __int64 *v13; // x0\n  __int64 v14; // x0\n  PulseEffectAction *v15; // x19\n  PulseEffectAction *v16; // x24\n  _BOOL4 m_detailOnly; // w0\n  int v18[3]; // [xsp+4Ch] [xbp+4Ch] BYREF\n  cocos2d::ccColor3B v19; // [xsp+58h] [xbp+58h] BYREF\n  cocos2d::ccColor3B v20; // [xsp+60h] [xbp+60h]\n\n  v4 = a4;\n  v18[0] = a2;\n  v6 = a2;\n  if ( a2 <= 9998 )\n  {\n    if ( a2 < 0 )\n      v6 = 0;\n    v18[0] = v6;\n    v7 = v6;\n    if ( ((1LL << (v6 & 0x3F)) & a1->m_unkVector2f0.m_start.m_bitptr[(unsigned __int64)v6 >> 6]) == 0 )\n      goto LABEL_5;\n    goto LABEL_8;\n  }\n  m_bitptr = a1->m_unkVector2f0.m_start.m_bitptr;\n  v7 = 9999;\n  v18[0] = 9999;\n  if ( (m_bitptr[156] & 0x8000) != 0 )\n  {\nLABEL_8:\n    M_bucket_count = a1->m_pulseEffectMap._M_h._M_bucket_count;\n    b = a3->b;\n    *(_WORD *)&v19.r = *(_WORD *)&a3->r;\n    v19.b = b;\n    v13 = sub_8A2B20(&a1->m_pulseEffectMap._M_h._M_buckets, v7 % M_bucket_count, v18);\n    if ( !v13\n      || (v14 = *v13) == 0\n      || (v15 = *(PulseEffectAction **)(v14 + 16), v16 = *(PulseEffectAction **)(v14 + 24), v16 == v15) )\n    {\nLABEL_20:\n      v20 = v19;\n      return (cocos2d::ccColor3B)(v20.r | (unsigned __int16)(v20.g << 8) | (v20.b << 16));\n    }\n    while ( 1 )\n    {\n      if ( v15->m_mainOnly )\n      {\n        if ( v4 )\n          goto LABEL_15;\n        m_detailOnly = v15->m_detailOnly;\n      }\n      else\n      {\n        m_detailOnly = v15->m_detailOnly;\n        if ( !v15->m_detailOnly )\n        {\nLABEL_15:\n          v19 = GJEffectManager::colorForPulseEffect(a1, &v19, v15);\n          goto LABEL_16;\n        }\n      }\n      if ( v4 < m_detailOnly )\n        goto LABEL_15;\nLABEL_16:\n      if ( v16 == ++v15 )\n        goto LABEL_20;\n    }\n  }\nLABEL_5:\n  v8 = a3->b;\n  *(_WORD *)&v20.r = *(_WORD *)&a3->r;\n  v20.b = v8;\n  return (cocos2d::ccColor3B)(v20.r | (unsigned __int16)(v20.g << 8) | (v20.b << 16));\n}", "assembly": "; \n; GJEffectManager::colorForGroupID from 0x8bf868 to 0x8bfa18 (432 bytes)\n; \n; 6 xrefs:\n; > GameObject::groupColor @ 0x64a698\n; > LevelEditorLayer::updateObjectColors @ 0x65f8a0\n; > LevelEditorLayer::updateObjectColors @ 0x65fa90\n; > LevelEditorLayer::updateVisibility @ 0x662f24\n; > LevelEditorLayer::updateVisibility @ 0x66344c\n; > <???> @ 0x2b500\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\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x8bf868\nMOV             X4, X2                                                 ; +0x4, 0x8bf86c\nMOV             X29, SP                                                ; +0x8, 0x8bf870\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0xc, 0x8bf874\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x8bf878\nUXTB            W22, W3                                                ; +0x14, 0x8bf87c\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x18, 0x8bf880\nMOV             X23, X0                                                ; +0x1c, 0x8bf884\nSTR             W1, [X29,#0x70+var_24]                                 ; +0x20, 0x8bf888\nLDR             X0, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x8bf88c\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x28, 0x8bf890\nMOV             W19, W1                                                ; +0x2c, 0x8bf894\nMOV             W1, #0x270E                                            ; +0x30, 0x8bf898\nLDR             X0, [X0]                                               ; +0x34, 0x8bf89c\nCMP             W19, W1                                                ; +0x38, 0x8bf8a0\nSTR             X0, [X29,#0x70+var_8]                                  ; +0x3c, 0x8bf8a4\nB.GT            loc_8BF934                                             ; +0x40, 0x8bf8a8\nCMP             W19, WZR                                               ; +0x44, 0x8bf8ac\nMOV             X0, #1                                                 ; +0x48, 0x8bf8b0\nCSEL            W19, W19, WZR, GE                                      ; +0x4c, 0x8bf8b4\nSTR             W19, [X29,#0x70+var_24]                                ; +0x50, 0x8bf8b8\nAND             W1, W19, #0x3F ; '?'                                   ; +0x54, 0x8bf8bc\nSXTW            X3, W19                                                ; +0x58, 0x8bf8c0\nLSL             X0, X0, X1                                             ; +0x5c, 0x8bf8c4\nLSR             X2, X3, #6                                             ; +0x60, 0x8bf8c8\nLDR             X1, [X23,#0x2F0]                                       ; +0x64, 0x8bf8cc\nLSL             X2, X2, #3                                             ; +0x68, 0x8bf8d0\nLDR             X1, [X1,X2]                                            ; +0x6c, 0x8bf8d4\nTST             X0, X1                                                 ; +0x70, 0x8bf8d8\nB.NE            loc_8BF958                                             ; +0x74, 0x8bf8dc\nLDRH            W1, [X4]                                               ; +0x78, 0x8bf8e0\nLDRB            W0, [X4,#2]                                            ; +0x7c, 0x8bf8e4\nSTRH            W1, [X29,#0x70+var_10]                                 ; +0x80, 0x8bf8e8\nSTRB            W0, [X29,#0x70+var_E]                                  ; +0x84, 0x8bf8ec\nLDR             X21, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x88, 0x8bf8f0\nMOV             X0, #0                                                 ; +0x8c, 0x8bf8f4\nLDRB            W1, [X29,#0x70+var_10]                                 ; +0x90, 0x8bf8f8\nLDR             X19, [X29,#0x70+var_8]                                 ; +0x94, 0x8bf8fc\nLDR             X2, [X21]                                              ; +0x98, 0x8bf900\nBFXIL           X0, X1, #0, #8                                         ; +0x9c, 0x8bf904\nLDRB            W20, [X29,#0x70+var_10+1]                              ; +0xa0, 0x8bf908\nLDRB            W1, [X29,#0x70+var_E]                                  ; +0xa4, 0x8bf90c\nCMP             X19, X2                                                ; +0xa8, 0x8bf910\nBFI             X0, X20, #8, #8                                        ; +0xac, 0x8bf914\nBFI             X0, X1, #0x10, #8                                      ; +0xb0, 0x8bf918\nB.NE            loc_8BFA14                                             ; +0xb4, 0x8bf91c\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0xb8, 0x8bf920\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0xbc, 0x8bf924\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0xc0, 0x8bf928\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0xc4, 0x8bf92c\nRET                                                                    ; +0xc8, 0x8bf930\nMOV             X2, #0x4E0                                             ; +0xcc, 0x8bf934\nLDR             X1, [X23,#0x2F0]                                       ; +0xd0, 0x8bf938\nMOV             X3, #0x270F                                            ; +0xd4, 0x8bf93c\nMOV             X0, #0x8000                                            ; +0xd8, 0x8bf940\nMOV             W19, W3                                                ; +0xdc, 0x8bf944\nSTR             W19, [X29,#0x70+var_24]                                ; +0xe0, 0x8bf948\nLDR             X1, [X1,X2]                                            ; +0xe4, 0x8bf94c\nTST             X0, X1                                                 ; +0xe8, 0x8bf950\nB.EQ            loc_8BF8E0                                             ; +0xec, 0x8bf954\nLDR             X1, [X23,#0x178]                                       ; +0xf0, 0x8bf958\nADD             X0, X23, #0x170                                        ; +0xf4, 0x8bf95c\nLDRH            W6, [X4]                                               ; +0xf8, 0x8bf960\nADD             X2, X29, #0x70+var_24                                  ; +0xfc, 0x8bf964\nLDRB            W5, [X4,#2]                                            ; +0x100, 0x8bf968\nUDIV            X4, X3, X1                                             ; +0x104, 0x8bf96c\nSTRH            W6, [X29,#0x70+var_18]                                 ; +0x108, 0x8bf970\nSTRB            W5, [X29,#0x70+var_16]                                 ; +0x10c, 0x8bf974\nNOP                                                                    ; +0x110, 0x8bf978\nMSUB            X1, X4, X1, X3                                         ; +0x114, 0x8bf97c\nBL              sub_8A2B20                                             ; +0x118, 0x8bf980\nCBZ             X0, loc_8BFA00                                         ; +0x11c, 0x8bf984\nLDR             X0, [X0]                                               ; +0x120, 0x8bf988\nCBZ             X0, loc_8BFA00                                         ; +0x124, 0x8bf98c\nLDR             X19, [X0,#0x10]                                        ; +0x128, 0x8bf990\nLDR             X24, [X0,#0x18]                                        ; +0x12c, 0x8bf994\nCMP             X24, X19                                               ; +0x130, 0x8bf998\nB.EQ            loc_8BFA00                                             ; +0x134, 0x8bf99c\nADD             X20, X29, #0x70+var_18                                 ; +0x138, 0x8bf9a0\nB               loc_8BF9EC                                             ; +0x13c, 0x8bf9a4\nCBNZ            W22, loc_8BF9B8                                        ; +0x140, 0x8bf9a8\nLDRB            W0, [X19,#0x39]                                        ; +0x144, 0x8bf9ac\nCMP             W22, W0                                                ; +0x148, 0x8bf9b0\nB.CS            loc_8BF9E0                                             ; +0x14c, 0x8bf9b4\nMOV             X1, X20                                                ; +0x150, 0x8bf9b8\nMOV             X2, X19                                                ; +0x154, 0x8bf9bc\nMOV             X0, X23                                                ; +0x158, 0x8bf9c0\nBL              _ZN15GJEffectManager19colorForPulseEffectERKN7cocos2d10_ccColor3BEP17PulseEffectAction; GJEffectManager::colorForPulseEffect(cocos2d::_ccColor3B const&,PulseEffectAction *) ; +0x15c, 0x8bf9c4\nSXTW            X0, W0                                                 ; +0x160, 0x8bf9c8\nUBFX            X2, X0, #8, #8                                         ; +0x164, 0x8bf9cc\nUBFX            X1, X0, #0x10, #8                                      ; +0x168, 0x8bf9d0\nSTRB            W0, [X20]                                              ; +0x16c, 0x8bf9d4\nSTRB            W2, [X20,#1]                                           ; +0x170, 0x8bf9d8\nSTRB            W1, [X20,#2]                                           ; +0x174, 0x8bf9dc\nADD             X19, X19, #0x48 ; 'H'                                  ; +0x178, 0x8bf9e0\nCMP             X24, X19                                               ; +0x17c, 0x8bf9e4\nB.EQ            loc_8BFA00                                             ; +0x180, 0x8bf9e8\nLDRB            W0, [X19,#0x38]                                        ; +0x184, 0x8bf9ec\nCBNZ            W0, loc_8BF9A8                                         ; +0x188, 0x8bf9f0\nLDRB            W0, [X19,#0x39]                                        ; +0x18c, 0x8bf9f4\nCBNZ            W0, loc_8BF9B0                                         ; +0x190, 0x8bf9f8\nB               loc_8BF9B8                                             ; +0x194, 0x8bf9fc\nLDRH            W0, [X29,#0x70+var_18]                                 ; +0x198, 0x8bfa00\nSTRH            W0, [X29,#0x70+var_10]                                 ; +0x19c, 0x8bfa04\nLDRB            W0, [X29,#0x70+var_16]                                 ; +0x1a0, 0x8bfa08\nSTRB            W0, [X29,#0x70+var_E]                                  ; +0x1a4, 0x8bfa0c\nB               loc_8BF8F0                                             ; +0x1a8, 0x8bfa10\nBL              .__stack_chk_fail                                      ; +0x1ac, 0x8bfa14", "xrefs": ["GameObject::groupColor @ 0x64a698", "LevelEditorLayer::updateObjectColors @ 0x65f8a0", "LevelEditorLayer::updateObjectColors @ 0x65fa90", "LevelEditorLayer::updateVisibility @ 0x662f24", "LevelEditorLayer::updateVisibility @ 0x66344c", "<???> @ 0x2b500"], "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"}