{"type": "func", "start": 5370952048, "end": 5370952517, "name": "GJBaseGameLayer::updateColor", "pseudocode": "// \n// GJBaseGameLayer::updateColor from 0x140223970 to 0x140223b45 (469 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::updateColor @ 0x1402ddaf3\n// > PlayLayer::updateColor @ 0x1403b2009\n// > <???> @ 0x140566ff0\n// > <???> @ 0x1406cd5cc\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 GJBaseGameLayer::updateColor(\n        GJBaseGameLayer *a1,\n        cocos2d::ccColor3B *a2,\n        float a3,\n        int a4,\n        bool a5,\n        float a6,\n        cocos2d::ccHSVValue *a7,\n        int a8,\n        bool a9,\n        EffectGameObject *a10,\n        int a11,\n        int a12)\n{\n  int v12; // ebx\n  ColorActionSprite *ColorSprite; // rdi\n  ColorAction *ColorAction; // rbx\n  float v17; // xmm0_4\n  char m_legacyHSV; // al\n  cocos2d::CCDictionary *m_colorActionDict; // rcx\n  ColorActionSprite *m_colorSprite; // rcx\n\n  v12 = a4;\n  if ( (unsigned int)a4 > 0x44D )\n    v12 = 0;\n  ColorSprite = GJEffectManager::getColorSprite(a1->m_effectManager, v12);\n  ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, v12);\n  ColorAction->m_uniqueID = a11;\n  a1->m_blending = ColorAction->m_blending;\n  ColorAction->m_fromColor = ColorSprite->m_color;\n  ColorAction->m_toColor = *a2;\n  ColorAction->m_blending = a5;\n  ColorAction->m_duration = a3;\n  v17 = ColorSprite->m_opacity / 255.0;\n  ColorAction->m_toOpacity = a6;\n  ColorAction->m_fromOpacity = v17;\n  m_legacyHSV = (char)a10;\n  ColorAction->m_copyHSV = *a7;\n  if ( a10 )\n    m_legacyHSV = a10->m_legacyHSV;\n  ColorAction->m_legacyHSV = m_legacyHSV;\n  ColorAction->m_copyID = a8;\n  ColorAction->m_copyOpacity = a9;\n  ColorAction->m_deltaTime = 0.0;\n  *(_WORD *)&ColorAction->m_stepFinished = 0;\n  ColorAction::step(ColorAction, 0.0);\n  m_colorActionDict = a1->m_effectManager->m_colorActionDict;\n  if ( ColorAction->m_copyID <= 0 )\n    cocos2d::CCDictionary::removeObjectForKey(m_colorActionDict, ColorAction->m_colorID);\n  else\n    cocos2d::CCDictionary::setObject(m_colorActionDict, ColorAction, ColorAction->m_colorID);\n  if ( a3 <= 0.0 )\n  {\n    m_colorSprite = ColorAction->m_colorSprite;\n    if ( ColorAction->m_copyID )\n    {\n      if ( !ColorAction->m_copyOpacity )\n        m_colorSprite->m_opacity = a6 * 255.0;\n    }\n    else\n    {\n      *(_WORD *)&m_colorSprite->m_color.r = *(_WORD *)&a2->r;\n      m_colorSprite->m_color.b = a2->b;\n      m_colorSprite->m_opacity = a6 * 255.0;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateColor from 0x140223970 to 0x140223b45 (469 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::updateColor @ 0x1402ddaf3\n; > PlayLayer::updateColor @ 0x1403b2009\n; > <???> @ 0x140566ff0\n; > <???> @ 0x1406cd5cc\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\nmov     rax, rsp                                                       ; +0x0, 0x140223970\nmov     [rax+8], rbx                                                   ; +0x3, 0x140223973\nmov     [rax+10h], rbp                                                 ; +0x7, 0x140223977\nmov     [rax+18h], rsi                                                 ; +0xb, 0x14022397b\nmov     [rax+20h], rdi                                                 ; +0xf, 0x14022397f\npush    r14                                                            ; +0x13, 0x140223983\nsub     rsp, 50h                                                       ; +0x15, 0x140223985\nmovaps  xmmword ptr [rax-18h], xmm6                                    ; +0x19, 0x140223989\nxor     r14d, r14d                                                     ; +0x1d, 0x14022398d\ncmp     r9d, 44Dh                                                      ; +0x20, 0x140223990\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x27, 0x140223997\nmov     ebx, r9d                                                       ; +0x2b, 0x14022399b\nmovaps  xmmword ptr [rax-38h], xmm9                                    ; +0x2e, 0x14022399e\ncmova   ebx, r14d                                                      ; +0x33, 0x1402239a3\nmov     rsi, rdx                                                       ; +0x37, 0x1402239a7\nmov     rbp, rcx                                                       ; +0x3a, 0x1402239aa\nmov     edx, ebx                                                       ; +0x3d, 0x1402239ad\nmov     rcx, [rcx+950h]                                                ; +0x3f, 0x1402239af\nmovaps  xmm9, xmm2                                                     ; +0x46, 0x1402239b6\ncall    GJEffectManager__getColorSprite                                ; +0x4a, 0x1402239ba\nmov     rcx, [rbp+950h]                                                ; +0x4f, 0x1402239bf\nmov     edx, ebx                                                       ; +0x56, 0x1402239c6\nmov     rdi, rax                                                       ; +0x58, 0x1402239c8\ncall    GJEffectManager__getColorAction                                ; +0x5b, 0x1402239cb\nmov     ecx, [rsp+58h+arg_50]                                          ; +0x60, 0x1402239d0\nmov     rbx, rax                                                       ; +0x67, 0x1402239d7\nmovss   xmm6, [rsp+58h+arg_28]                                         ; +0x6a, 0x1402239da\nmov     [rax+80h], ecx                                                 ; +0x73, 0x1402239e3\nmovzx   ecx, byte ptr [rax+54h]                                        ; +0x79, 0x1402239e9\nmov     [rbp+309Dh], cl                                                ; +0x7d, 0x1402239ed\nmovzx   ecx, word ptr [rdi+144h]                                       ; +0x83, 0x1402239f3\nmov     [rax+48h], cx                                                  ; +0x8a, 0x1402239fa\nmovzx   ecx, byte ptr [rdi+146h]                                       ; +0x8e, 0x1402239fe\nmov     [rax+4Ah], cl                                                  ; +0x95, 0x140223a05\nmovzx   ecx, word ptr [rsi]                                            ; +0x98, 0x140223a08\nmov     [rax+4Bh], cx                                                  ; +0x9b, 0x140223a0b\nmovzx   eax, byte ptr [rsi+2]                                          ; +0x9f, 0x140223a0f\nmov     [rbx+4Dh], al                                                  ; +0xa3, 0x140223a13\nmovzx   eax, [rsp+58h+arg_20]                                          ; +0xa6, 0x140223a16\nmov     [rbx+54h], al                                                  ; +0xae, 0x140223a1e\nmov     rax, [rsp+58h+arg_30]                                          ; +0xb1, 0x140223a21\nmovss   dword ptr [rbx+50h], xmm9                                      ; +0xb9, 0x140223a29\nmovss   xmm0, dword ptr [rdi+140h]                                     ; +0xbf, 0x140223a2f\ndivss   xmm0, cs:dword_140623418                                       ; +0xc7, 0x140223a37\nmovss   dword ptr [rbx+64h], xmm6                                      ; +0xcf, 0x140223a3f\nmovss   dword ptr [rbx+60h], xmm0                                      ; +0xd4, 0x140223a44\nmovups  xmm0, xmmword ptr [rax]                                        ; +0xd9, 0x140223a49\nmov     rax, [rsp+58h+arg_48]                                          ; +0xdc, 0x140223a4c\nmovups  xmmword ptr [rbx+68h], xmm0                                    ; +0xe4, 0x140223a54\ntest    rax, rax                                                       ; +0xe8, 0x140223a58\njz      short loc_140223A64                                            ; +0xeb, 0x140223a5b\nmovzx   eax, byte ptr [rax+674h]                                       ; +0xed, 0x140223a5d\nmov     [rbx+88h], al                                                  ; +0xf4, 0x140223a64\nxorps   xmm1, xmm1                                                     ; +0xfa, 0x140223a6a\nmov     eax, [rsp+58h+arg_38]                                          ; +0xfd, 0x140223a6d\nmov     rcx, rbx                                                       ; +0x104, 0x140223a74\nmov     [rbx+78h], eax                                                 ; +0x107, 0x140223a77\nxorps   xmm7, xmm7                                                     ; +0x10a, 0x140223a7a\nmovzx   eax, [rsp+58h+arg_40]                                          ; +0x10d, 0x140223a7d\nmov     [rbx+7Dh], al                                                  ; +0x115, 0x140223a85\nmov     [rbx+44h], r14d                                                ; +0x118, 0x140223a88\nmov     [rbx+38h], r14w                                                ; +0x11c, 0x140223a8c\ncall    ColorAction__step                                              ; +0x121, 0x140223a91\nmov     rax, [rbp+950h]                                                ; +0x126, 0x140223a96\nmovsxd  r10, dword ptr [rbx+5Ch]                                       ; +0x12d, 0x140223a9d\nmov     rcx, [rax+278h]                                                ; +0x131, 0x140223aa1\ncmp     [rbx+78h], r14d                                                ; +0x138, 0x140223aa8\njle     short loc_140223ABC                                            ; +0x13c, 0x140223aac\nmov     r8, r10                                                        ; +0x13e, 0x140223aae\nmov     rdx, rbx                                                       ; +0x141, 0x140223ab1\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x144, 0x140223ab4\njmp     short loc_140223AC5                                            ; +0x14a, 0x140223aba\nmov     rdx, r10                                                       ; +0x14c, 0x140223abc\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAX_J@Z; cocos2d::CCDictionary::removeObjectForKey(__int64) ; +0x14f, 0x140223abf\ncomiss  xmm7, xmm9                                                     ; +0x155, 0x140223ac5\njb      short loc_140223AFC                                            ; +0x159, 0x140223ac9\nmov     rcx, [rbx+90h]                                                 ; +0x15b, 0x140223acb\ncmp     [rbx+78h], r14d                                                ; +0x162, 0x140223ad2\njnz     short loc_140223B2A                                            ; +0x166, 0x140223ad6\nmovzx   eax, word ptr [rsi]                                            ; +0x168, 0x140223ad8\nmulss   xmm6, cs:dword_140623418                                       ; +0x16b, 0x140223adb\nmov     [rcx+144h], ax                                                 ; +0x173, 0x140223ae3\nmovzx   eax, byte ptr [rsi+2]                                          ; +0x17a, 0x140223aea\nmov     [rcx+146h], al                                                 ; +0x17e, 0x140223aee\nmovss   dword ptr [rcx+140h], xmm6                                     ; +0x184, 0x140223af4\nmov     rax, rbx                                                       ; +0x18c, 0x140223afc\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x18f, 0x140223aff\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x194, 0x140223b04\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x199, 0x140223b09\nmov     rdi, [rsp+58h+arg_18]                                          ; +0x19e, 0x140223b0e\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x1a3, 0x140223b13\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x1a8, 0x140223b18\nmovaps  xmm9, [rsp+58h+var_38]                                         ; +0x1ad, 0x140223b1d\nadd     rsp, 50h                                                       ; +0x1b3, 0x140223b23\npop     r14                                                            ; +0x1b7, 0x140223b27\nretn                                                                   ; +0x1b9, 0x140223b29\nmov     rax, rbx                                                       ; +0x1ba, 0x140223b2a\ncmp     [rbx+7Dh], r14b                                                ; +0x1bd, 0x140223b2d\njnz     short loc_140223AFF                                            ; +0x1c1, 0x140223b31\nmulss   xmm6, cs:dword_140623418                                       ; +0x1c3, 0x140223b33\nmovss   dword ptr [rcx+140h], xmm6                                     ; +0x1cb, 0x140223b3b\njmp     short loc_140223AFF                                            ; +0x1d3, 0x140223b43", "xrefs": ["LevelEditorLayer::updateColor @ 0x1402ddaf3", "PlayLayer::updateColor @ 0x1403b2009", "<???> @ 0x140566ff0", "<???> @ 0x1406cd5cc"], "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"}