{"type": "func", "start": 4824496, "end": 4824576, "name": "GJEffectManager::colorForIndex", "pseudocode": "// \n// GJEffectManager::colorForIndex from 0x499db0 to 0x499e00 (80 bytes)\n// \n// 0 xrefs:\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::colorForIndex(GJEffectManager *a1, int a2)\n{\n  ColorAction *ColorAction; // r0\n  unsigned __int8 b; // r3\n  __int16 v6; // [sp+4h] [bp-8h]\n\n  ColorAction = GJEffectManager::getColorAction(a1, a2);\n  if ( ColorAction )\n  {\n    b = ColorAction->m_fromColor.b;\n    v6 = *(_WORD *)&ColorAction->m_fromColor.r;\n  }\n  else\n  {\n    b = -1;\n    v6 = -1;\n  }\n  return (cocos2d::ccColor3B)((unsigned __int8)v6 | (unsigned __int16)(HIBYTE(v6) << 8) | (b << 16));\n}", "assembly": "; \n; GJEffectManager::colorForIndex from 0x499db0 to 0x499e00 (80 bytes)\n; \n; 0 xrefs:\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            {R0-R2,LR}                                             ; +0x0, 0x499db0\nBL              _ZN15GJEffectManager14getColorActionEi; GJEffectManager::getColorAction(int) ; +0x2, 0x499db2\nCBZ             R0, loc_499DCE                                         ; +0x6, 0x499db6\nLDRB.W          R2, [R0,#0x45]                                         ; +0x8, 0x499db8\nLDRB.W          R1, [R0,#0x44]                                         ; +0xc, 0x499dbc\nLDRB.W          R3, [R0,#0x46]                                         ; +0x10, 0x499dc0\nSTRB.W          R2, [SP,#0xC+var_8+1]                                  ; +0x14, 0x499dc4\nSTRB.W          R1, [SP,#0xC+var_8]                                    ; +0x18, 0x499dc8\nB               loc_499DDC                                             ; +0x1c, 0x499dcc\nLDR             R3, =(unk_9AC080 - 0x499DD4)                           ; +0x1e, 0x499dce\nADD             R3, PC; unk_9AC080                                     ; +0x20, 0x499dd0\nLDRH.W          R2, [R3,#(word_9AC083 - 0x9AC080)]!                    ; +0x22, 0x499dd2\nLDRB            R3, [R3,#(byte_9AC085 - 0x9AC083)]                     ; +0x26, 0x499dd6\nSTRH.W          R2, [SP,#0xC+var_8]                                    ; +0x28, 0x499dd8\nSTRB.W          R3, [SP,#0xC+var_6]                                    ; +0x2c, 0x499ddc\nMOVS            R0, #0                                                 ; +0x30, 0x499de0\nLDRB.W          R3, [SP,#0xC+var_8]                                    ; +0x32, 0x499de2\nBFI.W           R0, R3, #0, #8                                         ; +0x36, 0x499de6\nLDRB.W          R3, [SP,#0xC+var_8+1]                                  ; +0x3a, 0x499dea\nBFI.W           R0, R3, #8, #8                                         ; +0x3e, 0x499dee\nLDRB.W          R3, [SP,#0xC+var_6]                                    ; +0x42, 0x499df2\nBFI.W           R0, R3, #0x10, #8                                      ; +0x46, 0x499df6\nADD             SP, SP, #0xC                                           ; +0x4a, 0x499dfa\nPOP.W           {PC}                                                   ; +0x4c, 0x499dfc", "xrefs": [], "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"}