{"type": "func", "start": 4823860, "end": 4824042, "name": "GJEffectManager::calculateBaseActiveColors", "pseudocode": "// \n// GJEffectManager::calculateBaseActiveColors from 0x499b34 to 0x499bea (182 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::loadDefaultColors @ 0x31b002\n// > GJEffectManager::processColors @ 0x49c93c\n// > GJEffectManager::loadFromState @ 0x4a6c44\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\nvoid GJEffectManager::calculateBaseActiveColors(GJEffectManager *a1)\n{\n  cocos2d::CCDictionary *m_unkDict150; // r3\n  cocos2d::CCDictElement *m_pElements; // r3\n  cocos2d::CCDictElement *next; // r6\n  cocos2d::CCObject *m_pObject; // r7\n  int m_nLuaID; // r3\n  cocos2d::CCObjectType m_eObjType; // r4\n  char v7; // r3\n  cocos2d::CCDictElement *v8; // r2\n  int v9; // r4\n  float v10; // r1\n  float v11; // r2\n  int v12; // r3\n  int v13; // r0\n  __int16 v14; // [sp+8h] [bp-18h] BYREF\n  char v15; // [sp+Ah] [bp-16h]\n  float v16; // [sp+Ch] [bp-14h]\n  float v17; // [sp+10h] [bp-10h]\n  float v18; // [sp+14h] [bp-Ch]\n  int v19; // [sp+18h] [bp-8h]\n\n  m_unkDict150 = a1->m_unkDict150;\n  if ( m_unkDict150 )\n  {\n    m_pElements = m_unkDict150->m_pElements;\n    if ( m_pElements )\n      next = (cocos2d::CCDictElement *)m_pElements->hh.next;\n    else\n      next = nullptr;\n    while ( m_pElements )\n    {\n      m_pObject = m_pElements->m_pObject;\n      m_nLuaID = m_pObject[5].m_nLuaID;\n      m_eObjType = m_pObject[5].m_eObjType;\n      v14 = m_nLuaID;\n      v15 = BYTE2(m_nLuaID);\n      if ( m_eObjType && *(int *)(m_eObjType + 116) > 0 && !*(_BYTE *)(m_eObjType + 122) )\n      {\n        v9 = m_eObjType + 100;\n        v10 = *(float *)(v9 + 4);\n        v11 = *(float *)(v9 + 8);\n        v12 = *(_DWORD *)(v9 + 12);\n        v16 = *(float *)v9;\n        v17 = v10;\n        v18 = v11;\n        v19 = v12;\n        v13 = GameToolbox::transformColor((unsigned __int8 *)&v14, v16, v10, v11, v12);\n        v14 = v13;\n        v15 = BYTE2(v13);\n      }\n      v7 = v15;\n      *(_WORD *)((char *)&m_pObject[5].m_nLuaID + 3) = v14;\n      BYTE1(m_pObject[5].m_nTag) = v7;\n      if ( next )\n        v8 = (cocos2d::CCDictElement *)next->hh.next;\n      else\n        v8 = nullptr;\n      m_pElements = next;\n      next = v8;\n    }\n  }\n}", "assembly": "; \n; GJEffectManager::calculateBaseActiveColors from 0x499b34 to 0x499bea (182 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::loadDefaultColors @ 0x31b002\n; > GJEffectManager::processColors @ 0x49c93c\n; > GJEffectManager::loadFromState @ 0x4a6c44\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.W          {R4-R8,LR}                                             ; +0x0, 0x499b34\nSUB             SP, SP, #0x20                                          ; +0x4, 0x499b38\nLDR             R5, =(__stack_chk_guard_ptr - 0x499B40)                ; +0x6, 0x499b3a\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x8, 0x499b3c\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xa, 0x499b3e\nLDR             R3, [R5]                                               ; +0xc, 0x499b40\nSTR             R3, [SP,#0x20+var_4]                                   ; +0xe, 0x499b42\nLDR.W           R3, [R0,#0x110]                                        ; +0x10, 0x499b44\nCMP             R3, #0                                                 ; +0x14, 0x499b48\nBEQ             loc_499BD8                                             ; +0x16, 0x499b4a\nLDR             R3, [R3,#0x34]                                         ; +0x18, 0x499b4c\nCBZ             R3, loc_499B56                                         ; +0x1a, 0x499b4e\nLDR.W           R6, [R3,#0x110]                                        ; +0x1c, 0x499b50\nB               loc_499B90                                             ; +0x20, 0x499b54\nMOV             R6, R3                                                 ; +0x22, 0x499b56\nB               loc_499B90                                             ; +0x24, 0x499b58\nLDR.W           R7, [R3,#0x104]                                        ; +0x26, 0x499b5a\nADD.W           R8, SP, #0x20+var_18                                   ; +0x2a, 0x499b5e\nLDR.W           R3, [R7,#0x10C]                                        ; +0x2e, 0x499b62\nLDR.W           R4, [R7,#0x11C]                                        ; +0x32, 0x499b66\nSTRH.W          R3, [SP,#0x20+var_18]                                  ; +0x36, 0x499b6a\nLSRS            R3, R3, #0x10                                          ; +0x3a, 0x499b6e\nSTRB.W          R3, [SP,#0x20+var_16]                                  ; +0x3c, 0x499b70\nCBNZ            R4, loc_499B96                                         ; +0x40, 0x499b74\nLDRH.W          R2, [R8]                                               ; +0x42, 0x499b76\nLDRB.W          R3, [R8,#2]                                            ; +0x46, 0x499b7a\nSTRH.W          R2, [R7,#0x10F]                                        ; +0x4a, 0x499b7e\nSTRB.W          R3, [R7,#0x111]                                        ; +0x4e, 0x499b82\nCBZ             R6, loc_499BD4                                         ; +0x52, 0x499b86\nLDR.W           R2, [R6,#0x110]                                        ; +0x54, 0x499b88\nMOV             R3, R6                                                 ; +0x58, 0x499b8c\nMOV             R6, R2                                                 ; +0x5a, 0x499b8e\nCMP             R3, #0                                                 ; +0x5c, 0x499b90\nBNE             loc_499B5A                                             ; +0x5e, 0x499b92\nB               loc_499BD8                                             ; +0x60, 0x499b94\nLDR             R3, [R4,#0x74]                                         ; +0x62, 0x499b96\nCMP             R3, #0                                                 ; +0x64, 0x499b98\nBLE             loc_499B76                                             ; +0x66, 0x499b9a\nLDRB.W          R3, [R4,#0x7A]                                         ; +0x68, 0x499b9c\nCMP             R3, #0                                                 ; +0x6c, 0x499ba0\nBNE             loc_499B76                                             ; +0x6e, 0x499ba2\nADDS            R4, #0x64 ; 'd'                                        ; +0x70, 0x499ba4\nLDM.W           R4, {R0-R3}                                            ; +0x72, 0x499ba6\nADD             R4, SP, #0x20+var_14                                   ; +0x76, 0x499baa\nSTM.W           R4, {R0-R3}                                            ; +0x78, 0x499bac\nMOV             R0, R8                                                 ; +0x7c, 0x499bb0\nLDR             R3, [SP,#0x20+var_8]                                   ; +0x7e, 0x499bb2\nSTR             R3, [SP,#0x20+var_20]                                  ; +0x80, 0x499bb4\nLDM.W           R4, {R1-R3}                                            ; +0x82, 0x499bb6\nBL              _ZN11GameToolbox14transformColorERKN7cocos2d10_ccColor3BENS0_11_ccHSVValueE; GameToolbox::transformColor(cocos2d::_ccColor3B const&,cocos2d::_ccHSVValue) ; +0x86, 0x499bba\nUBFX.W          R3, R0, #8, #8                                         ; +0x8a, 0x499bbe\nSTRB.W          R0, [SP,#0x20+var_18]                                  ; +0x8e, 0x499bc2\nSTRB.W          R3, [SP,#0x20+var_18+1]                                ; +0x92, 0x499bc6\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x96, 0x499bca\nSTRB.W          R0, [SP,#0x20+var_16]                                  ; +0x9a, 0x499bce\nB               loc_499B76                                             ; +0x9e, 0x499bd2\nMOV             R2, R6                                                 ; +0xa0, 0x499bd4\nB               loc_499B8C                                             ; +0xa2, 0x499bd6\nLDR             R2, [SP,#0x20+var_4]                                   ; +0xa4, 0x499bd8\nLDR             R3, [R5]                                               ; +0xa6, 0x499bda\nCMP             R2, R3                                                 ; +0xa8, 0x499bdc\nBEQ             loc_499BE4                                             ; +0xaa, 0x499bde\nBLX             __stack_chk_fail                                       ; +0xac, 0x499be0\nADD             SP, SP, #0x20 ; ' '                                    ; +0xb0, 0x499be4\nPOP.W           {R4-R8,PC}                                             ; +0xb2, 0x499be6", "xrefs": ["PlayLayer::loadDefaultColors @ 0x31b002", "GJEffectManager::processColors @ 0x49c93c", "GJEffectManager::loadFromState @ 0x4a6c44"], "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"}