{"type": "func", "start": 9172496, "end": 9173096, "name": "GJEffectManager::colorForPulseEffect", "pseudocode": "// \n// GJEffectManager::colorForPulseEffect from 0x8bf610 to 0x8bf868 (600 bytes)\n// \n// 5 xrefs:\n// > GJEffectManager::colorForGroupID @ 0x8bf9c4\n// > GJEffectManager::processPulseActions @ 0x8bfd78\n// > GJEffectManager::calculateInheritedColor @ 0x8c0cc4\n// > GJEffectManager::processCopyColorPulseActions @ 0x8c14d4\n// > <???> @ 0x76050\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::colorForPulseEffect(\n        GJEffectManager *a1,\n        const cocos2d::ccColor3B *a2,\n        PulseEffectAction *a3)\n{\n  float m_currentValue; // s8\n  PulseEffectType m_pulseEffectType; // w1\n  GLubyte g; // w1\n  GLubyte b; // w0\n  GLubyte r; // w2\n  GLubyte v10; // w3\n  int m_colorIndex; // w1\n  unsigned __int64 v12; // x3\n  unsigned __int64 v13; // x4\n  unsigned __int64 v14; // x0\n  int v15; // w0\n  float s; // w4\n  bool absoluteSaturation; // w5\n  float v; // w3\n  float h; // w1\n  bool absoluteBrightness; // w2\n  PulseEffectAction *v21; // [xsp+38h] [xbp+38h]\n  cocos2d::ccColor3B v22; // [xsp+40h] [xbp+40h]\n  __int64 v23; // [xsp+48h] [xbp+48h] BYREF\n  __int64 v24; // [xsp+50h] [xbp+50h]\n  cocos2d::ccHSVValue v25; // [xsp+58h] [xbp+58h] BYREF\n  cocos2d::ccColor3B v26; // 0:w0.3\n  cocos2d::ccHSVValue MultipliedHSV; // 0:x0.16\n\n  m_currentValue = a3->m_currentValue;\n  if ( m_currentValue <= 0.0 )\n    goto LABEL_4;\n  m_pulseEffectType = a3->m_pulseEffectType;\n  if ( m_pulseEffectType != Hsv )\n  {\n    if ( m_pulseEffectType != 2 )\n    {\nLABEL_4:\n      v22 = *a2;\n      return (cocos2d::ccColor3B)(v22.r | (unsigned __int16)(v22.g << 8) | (v22.b << 16));\n    }\n    g = a3->m_color.g;\n    b = a3->m_color.b;\n    r = a3->m_color.r;\n    if ( m_currentValue == 1.0 )\n    {\n      v22.r = r;\n      v22.g = g;\n      v22.b = b;\n      return (cocos2d::ccColor3B)(v22.r | (unsigned __int16)(v22.g << 8) | (v22.b << 16));\n    }\n    BYTE2(v23) = b;\n    LOBYTE(v23) = r;\n    BYTE1(v23) = g;\n    *(cocos2d::ccColor3B *)&v15 = GameToolbox::multipliedColorValue(\n                                    (cocos2d::ccColor3B)*(_QWORD *)&a2->r,\n                                    (cocos2d::ccColor3B)v23,\n                                    m_currentValue);\nLABEL_15:\n    v22 = (cocos2d::ccColor3B)v15;\n    return (cocos2d::ccColor3B)(v22.r | (unsigned __int16)(v22.g << 8) | (v22.b << 16));\n  }\n  v10 = a2->b;\n  m_colorIndex = a3->m_colorIndex;\n  LOWORD(v23) = *(_WORD *)&a2->r;\n  BYTE2(v23) = v10;\n  if ( m_colorIndex )\n  {\n    v21 = a3;\n    v26 = GJEffectManager::activeColorForIndex(a1, m_colorIndex);\n    a3 = v21;\n    *(cocos2d::ccColor3B *)&v23 = v26;\n  }\n  if ( m_currentValue == 1.0 )\n  {\n    v15 = GameToolbox::transformColor(\n            (unsigned __int8 *)&v23,\n            LODWORD(a3->m_hsv.h) | ((unsigned __int64)LODWORD(a3->m_hsv.s) << 32),\n            LODWORD(a3->m_hsv.v)\n          | ((unsigned __int64)a3->m_hsv.absoluteSaturation << 32) & 0xFFFF00FFFFFFFFFFLL\n          | ((unsigned __int64)a3->m_hsv.absoluteBrightness << 40));\n    goto LABEL_15;\n  }\n  if ( a3->m_isDynamicHsv )\n  {\n    s = a3->m_hsv.s;\n    absoluteSaturation = a3->m_hsv.absoluteSaturation;\n    v = a3->m_hsv.v;\n    h = a3->m_hsv.h;\n    absoluteBrightness = a3->m_hsv.absoluteBrightness;\n    v25.absoluteSaturation = absoluteSaturation;\n    v25.s = s;\n    v25.absoluteBrightness = absoluteBrightness;\n    v25.v = v;\n    v25.h = h;\n    MultipliedHSV = GameToolbox::getMultipliedHSV(&v25, m_currentValue);\n    v13 = *(_QWORD *)&MultipliedHSV.h;\n    v12 = *(_QWORD *)&MultipliedHSV.v;\n  }\n  else\n  {\n    v12 = LODWORD(a3->m_hsv.v)\n        | ((unsigned __int64)a3->m_hsv.absoluteSaturation << 32) & 0xFFFF00FFFFFFFFFFLL\n        | ((unsigned __int64)a3->m_hsv.absoluteBrightness << 40);\n    v13 = LODWORD(a3->m_hsv.h) | ((unsigned __int64)LODWORD(a3->m_hsv.s) << 32);\n  }\n  v14 = GameToolbox::transformColor((unsigned __int8 *)&v23, v13, v12);\n  LOWORD(v24) = v14;\n  BYTE2(v24) = BYTE2(v14);\n  v22 = GameToolbox::multipliedColorValue(\n          (cocos2d::ccColor3B)*(_QWORD *)&a2->r,\n          (cocos2d::ccColor3B)v24,\n          m_currentValue);\n  return (cocos2d::ccColor3B)(v22.r | (unsigned __int16)(v22.g << 8) | (v22.b << 16));\n}", "assembly": "; \n; GJEffectManager::colorForPulseEffect from 0x8bf610 to 0x8bf868 (600 bytes)\n; \n; 5 xrefs:\n; > GJEffectManager::colorForGroupID @ 0x8bf9c4\n; > GJEffectManager::processPulseActions @ 0x8bfd78\n; > GJEffectManager::calculateInheritedColor @ 0x8c0cc4\n; > GJEffectManager::processCopyColorPulseActions @ 0x8c14d4\n; > <???> @ 0x76050\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, 0x8bf610\nMOV             X29, SP                                                ; +0x4, 0x8bf614\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0x8bf618\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8bf61c\nMOV             X20, X1                                                ; +0x10, 0x8bf620\nSTR             D8, [SP,#0x70+var_50]                                  ; +0x14, 0x8bf624\nLDR             S8, [X2,#0x18]                                         ; +0x18, 0x8bf628\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x8bf62c\nFCMPE           S8, #0.0                                               ; +0x20, 0x8bf630\nLDR             X1, [X1]                                               ; +0x24, 0x8bf634\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x28, 0x8bf638\nB.LS            loc_8BF654                                             ; +0x2c, 0x8bf63c\nLDR             W1, [X2,#0x20]                                         ; +0x30, 0x8bf640\nCMP             W1, #1                                                 ; +0x34, 0x8bf644\nB.EQ            loc_8BF6CC                                             ; +0x38, 0x8bf648\nCMP             W1, #2                                                 ; +0x3c, 0x8bf64c\nB.EQ            loc_8BF6A4                                             ; +0x40, 0x8bf650\nLDRH            W1, [X20]                                              ; +0x44, 0x8bf654\nLDRB            W0, [X20,#2]                                           ; +0x48, 0x8bf658\nSTRH            W1, [X29,#0x70+var_30]                                 ; +0x4c, 0x8bf65c\nSTRB            W0, [X29,#0x70+var_2E]                                 ; +0x50, 0x8bf660\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x54, 0x8bf664\nMOV             X0, #0                                                 ; +0x58, 0x8bf668\nLDRB            W1, [X29,#0x70+var_30]                                 ; +0x5c, 0x8bf66c\nLDR             X3, [X29,#0x70+var_8]                                  ; +0x60, 0x8bf670\nLDR             X2, [X19]                                              ; +0x64, 0x8bf674\nBFXIL           X0, X1, #0, #8                                         ; +0x68, 0x8bf678\nLDRB            W4, [X29,#0x70+var_30+1]                               ; +0x6c, 0x8bf67c\nLDRB            W1, [X29,#0x70+var_2E]                                 ; +0x70, 0x8bf680\nCMP             X3, X2                                                 ; +0x74, 0x8bf684\nBFI             X0, X4, #8, #8                                         ; +0x78, 0x8bf688\nBFI             X0, X1, #0x10, #8                                      ; +0x7c, 0x8bf68c\nB.NE            loc_8BF85C                                             ; +0x80, 0x8bf690\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x84, 0x8bf694\nLDR             D8, [SP,#0x70+var_50]                                  ; +0x88, 0x8bf698\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x8c, 0x8bf69c\nRET                                                                    ; +0x90, 0x8bf6a0\nFMOV            S0, #1.0                                               ; +0x94, 0x8bf6a4\nLDRB            W1, [X2,#0x1D]                                         ; +0x98, 0x8bf6a8\nLDRB            W0, [X2,#0x1E]                                         ; +0x9c, 0x8bf6ac\nFCMP            S8, S0                                                 ; +0xa0, 0x8bf6b0\nLDRB            W2, [X2,#0x1C]                                         ; +0xa4, 0x8bf6b4\nB.NE            loc_8BF7FC                                             ; +0xa8, 0x8bf6b8\nSTRB            W2, [X29,#0x70+var_30]                                 ; +0xac, 0x8bf6bc\nSTRB            W1, [X29,#0x70+var_30+1]                               ; +0xb0, 0x8bf6c0\nSTRB            W0, [X29,#0x70+var_2E]                                 ; +0xb4, 0x8bf6c4\nB               loc_8BF664                                             ; +0xb8, 0x8bf6c8\nLDRH            W4, [X20]                                              ; +0xbc, 0x8bf6cc\nLDRB            W3, [X20,#2]                                           ; +0xc0, 0x8bf6d0\nLDR             W1, [X2,#0x34]; int                                    ; +0xc4, 0x8bf6d4\nSTRH            W4, [X29,#0x70+var_28]                                 ; +0xc8, 0x8bf6d8\nSTRB            W3, [X29,#0x70+var_28+2]                               ; +0xcc, 0x8bf6dc\nCBNZ            W1, loc_8BF7D4                                         ; +0xd0, 0x8bf6e0\nFMOV            S0, #1.0                                               ; +0xd4, 0x8bf6e4\nFCMP            S8, S0                                                 ; +0xd8, 0x8bf6e8\nB.EQ            loc_8BF77C                                             ; +0xdc, 0x8bf6ec\nLDRB            W0, [X2,#0x3A]                                         ; +0xe0, 0x8bf6f0\nCBNZ            W0, loc_8BF81C                                         ; +0xe4, 0x8bf6f4\nLDR             W1, [X2,#0x2C]                                         ; +0xe8, 0x8bf6f8\nMOV             X3, #0                                                 ; +0xec, 0x8bf6fc\nLDRB            W0, [X2,#0x30]                                         ; +0xf0, 0x8bf700\nMOV             X4, #0                                                 ; +0xf4, 0x8bf704\nBFXIL           X3, X1, #0, #0x20 ; ' '                                ; +0xf8, 0x8bf708\nLDR             W5, [X2,#0x24]                                         ; +0xfc, 0x8bf70c\nBFI             X3, X0, #0x20, #8 ; ' '                                ; +0x100, 0x8bf710\nLDRB            W1, [X2,#0x31]                                         ; +0x104, 0x8bf714\nLDR             W0, [X2,#0x28]                                         ; +0x108, 0x8bf718\nBFXIL           X4, X5, #0, #0x20 ; ' '                                ; +0x10c, 0x8bf71c\nBFI             X3, X1, #0x28, #8 ; '('                                ; +0x110, 0x8bf720\nBFI             X4, X0, #0x20, #0x20 ; ' '                             ; +0x114, 0x8bf724\nADD             X0, X29, #0x70+var_28                                  ; +0x118, 0x8bf728\nMOV             X1, X4                                                 ; +0x11c, 0x8bf72c\nMOV             X2, X3                                                 ; +0x120, 0x8bf730\nBL              _ZN11GameToolbox14transformColorERKN7cocos2d10_ccColor3BENS0_11_ccHSVValueE; GameToolbox::transformColor(cocos2d::_ccColor3B const&,cocos2d::_ccHSVValue) ; +0x124, 0x8bf734\nSXTW            X0, W0                                                 ; +0x128, 0x8bf738\nSTRB            W0, [X29,#0x70+var_20]                                 ; +0x12c, 0x8bf73c\nUBFX            X1, X0, #8, #8                                         ; +0x130, 0x8bf740\nUBFX            X0, X0, #0x10, #8                                      ; +0x134, 0x8bf744\nSTRB            W1, [X29,#0x70+var_20+1]                               ; +0x138, 0x8bf748\nSTRB            W0, [X29,#0x70+var_20+2]                               ; +0x13c, 0x8bf74c\nFMOV            S0, S8                                                 ; +0x140, 0x8bf750\nLDR             X0, [X20]                                              ; +0x144, 0x8bf754\nLDR             X1, [X29,#0x70+var_20]                                 ; +0x148, 0x8bf758\nBL              _ZN11GameToolbox20multipliedColorValueEN7cocos2d10_ccColor3BES1_f; GameToolbox::multipliedColorValue(cocos2d::_ccColor3B,cocos2d::_ccColor3B,float) ; +0x14c, 0x8bf75c\nSXTW            X0, W0                                                 ; +0x150, 0x8bf760\nSTRB            W0, [X29,#0x70+var_30]                                 ; +0x154, 0x8bf764\nUBFX            X1, X0, #8, #8                                         ; +0x158, 0x8bf768\nUBFX            X0, X0, #0x10, #8                                      ; +0x15c, 0x8bf76c\nSTRB            W1, [X29,#0x70+var_30+1]                               ; +0x160, 0x8bf770\nSTRB            W0, [X29,#0x70+var_2E]                                 ; +0x164, 0x8bf774\nB               loc_8BF664                                             ; +0x168, 0x8bf778\nLDR             W0, [X2,#0x2C]                                         ; +0x16c, 0x8bf77c\nMOV             X3, #0                                                 ; +0x170, 0x8bf780\nLDRB            W5, [X2,#0x30]                                         ; +0x174, 0x8bf784\nMOV             X1, #0                                                 ; +0x178, 0x8bf788\nLDR             W4, [X2,#0x24]                                         ; +0x17c, 0x8bf78c\nBFXIL           X3, X0, #0, #0x20 ; ' '                                ; +0x180, 0x8bf790\nLDRB            W0, [X2,#0x31]                                         ; +0x184, 0x8bf794\nBFI             X3, X5, #0x20, #8 ; ' '                                ; +0x188, 0x8bf798\nLDR             W2, [X2,#0x28]                                         ; +0x18c, 0x8bf79c\nBFXIL           X1, X4, #0, #0x20 ; ' '                                ; +0x190, 0x8bf7a0\nBFI             X3, X0, #0x28, #8 ; '('                                ; +0x194, 0x8bf7a4\nADD             X0, X29, #0x70+var_28                                  ; +0x198, 0x8bf7a8\nBFI             X1, X2, #0x20, #0x20 ; ' '                             ; +0x19c, 0x8bf7ac\nMOV             X2, X3                                                 ; +0x1a0, 0x8bf7b0\nBL              _ZN11GameToolbox14transformColorERKN7cocos2d10_ccColor3BENS0_11_ccHSVValueE; GameToolbox::transformColor(cocos2d::_ccColor3B const&,cocos2d::_ccHSVValue) ; +0x1a4, 0x8bf7b4\nSXTW            X0, W0; this                                           ; +0x1a8, 0x8bf7b8\nSTRB            W0, [X29,#0x70+var_30]                                 ; +0x1ac, 0x8bf7bc\nUBFX            X2, X0, #8, #8                                         ; +0x1b0, 0x8bf7c0\nUBFX            X1, X0, #0x10, #8                                      ; +0x1b4, 0x8bf7c4\nSTRB            W2, [X29,#0x70+var_30+1]                               ; +0x1b8, 0x8bf7c8\nSTRB            W1, [X29,#0x70+var_2E]                                 ; +0x1bc, 0x8bf7cc\nB               loc_8BF664                                             ; +0x1c0, 0x8bf7d0\nSTR             X2, [X29,#0x70+var_38]                                 ; +0x1c4, 0x8bf7d4\nBL              _ZN15GJEffectManager19activeColorForIndexEi; GJEffectManager::activeColorForIndex(int) ; +0x1c8, 0x8bf7d8\nSXTW            X0, W0                                                 ; +0x1cc, 0x8bf7dc\nLDR             X2, [X29,#0x70+var_38]                                 ; +0x1d0, 0x8bf7e0\nUBFX            X3, X0, #8, #8                                         ; +0x1d4, 0x8bf7e4\nUBFX            X1, X0, #0x10, #8                                      ; +0x1d8, 0x8bf7e8\nSTRB            W0, [X29,#0x70+var_28]                                 ; +0x1dc, 0x8bf7ec\nSTRB            W3, [X29,#0x70+var_28+1]                               ; +0x1e0, 0x8bf7f0\nSTRB            W1, [X29,#0x70+var_28+2]                               ; +0x1e4, 0x8bf7f4\nB               loc_8BF6E4                                             ; +0x1e8, 0x8bf7f8\nSTRB            W0, [X29,#0x70+var_28+2]                               ; +0x1ec, 0x8bf7fc\nSTRB            W2, [X29,#0x70+var_28]                                 ; +0x1f0, 0x8bf800\nSTRB            W1, [X29,#0x70+var_28+1]                               ; +0x1f4, 0x8bf804\nFMOV            S0, S8                                                 ; +0x1f8, 0x8bf808\nLDR             X0, [X20]                                              ; +0x1fc, 0x8bf80c\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x200, 0x8bf810\nBL              _ZN11GameToolbox20multipliedColorValueEN7cocos2d10_ccColor3BES1_f; GameToolbox::multipliedColorValue(cocos2d::_ccColor3B,cocos2d::_ccColor3B,float) ; +0x204, 0x8bf814\nB               loc_8BF7B8                                             ; +0x208, 0x8bf818\nLDR             W4, [X2,#0x28]                                         ; +0x20c, 0x8bf81c\nLDRB            W5, [X2,#0x30]                                         ; +0x210, 0x8bf820\nLDR             W3, [X2,#0x2C]                                         ; +0x214, 0x8bf824\nADD             X0, X29, #0x70+var_18                                  ; +0x218, 0x8bf828\nLDR             W1, [X2,#0x24]                                         ; +0x21c, 0x8bf82c\nLDRB            W2, [X2,#0x31]                                         ; +0x220, 0x8bf830\nFMOV            S0, S8                                                 ; +0x224, 0x8bf834\nSTRB            W5, [X29,#0x70+var_C]                                  ; +0x228, 0x8bf838\nSTR             W4, [X29,#0x70+var_14]                                 ; +0x22c, 0x8bf83c\nSTRB            W2, [X29,#0x70+var_B]                                  ; +0x230, 0x8bf840\nSTR             W3, [X29,#0x70+var_10]                                 ; +0x234, 0x8bf844\nSTR             W1, [X29,#0x70+var_18]                                 ; +0x238, 0x8bf848\nBL              _ZN11GameToolbox16getMultipliedHSVERKN7cocos2d11_ccHSVValueEf; GameToolbox::getMultipliedHSV(cocos2d::_ccHSVValue const&,float) ; +0x23c, 0x8bf84c\nMOV             X4, X0                                                 ; +0x240, 0x8bf850\nMOV             X3, X1                                                 ; +0x244, 0x8bf854\nB               loc_8BF728                                             ; +0x248, 0x8bf858\nBL              .__stack_chk_fail                                      ; +0x24c, 0x8bf85c\nBL              _Unwind_Resume                                         ; +0x250, 0x8bf860\nB               loc_8BF860                                             ; +0x254, 0x8bf864", "xrefs": ["GJEffectManager::colorForGroupID @ 0x8bf9c4", "GJEffectManager::processPulseActions @ 0x8bfd78", "GJEffectManager::calculateInheritedColor @ 0x8c0cc4", "GJEffectManager::processCopyColorPulseActions @ 0x8c14d4", "<???> @ 0x76050"], "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"}