{"type": "func", "start": 5369398576, "end": 5369399092, "name": "CustomizeObjectLayer::updateColorSprite", "pseudocode": "// \n// CustomizeObjectLayer::updateColorSprite from 0x1400a8530 to 0x1400a8734 (516 bytes)\n// \n// 9 xrefs:\n// > CustomizeObjectLayer::onPaste @ 0x1400a8149\n// > CustomizeObjectLayer::colorSetupClosed @ 0x1400a8417\n// > CustomizeObjectLayer::colorSelectClosed @ 0x1400a8747\n// > CustomizeObjectLayer::onNextColorChannel @ 0x1400a8f8b\n// > CustomizeObjectLayer::onSelectMode @ 0x1400a9184\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x1400a9619\n// > CustomizeObjectLayer::textChanged @ 0x1400a9931\n// > CustomizeObjectLayer::onSelectColor @ 0x1400a9cfa\n// > <???> @ 0x1406c77b8\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\n// Hidden C++ exception states: #wind=2\nvoid CustomizeObjectLayer::updateColorSprite(CustomizeObjectLayer *a1)\n{\n  _BOOL8 v1; // rdx\n  int ActiveMode; // edi\n  __int64 v4; // rax\n  int v5; // edx\n  GJEffectManager *v6; // rcx\n  ColorAction *ColorAction; // rax\n  ColorAction *v8; // rbp\n  ColorChannelSprite *m_colorSprite; // rbx\n  void *v10; // [rsp+30h] [rbp+8h] BYREF\n\n  ActiveMode = 0;\n  if ( a1->m_selectedMode == 3 )\n    goto LABEL_18;\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  if ( ActiveMode <= 0 )\n    goto LABEL_13;\n  v4 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v10 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v4 = qword_1406C2ED8;\n  }\n  v5 = ActiveMode;\n  if ( ActiveMode > 1101 )\n    v5 = 1101;\n  v6 = *(GJEffectManager **)(*(_QWORD *)(*(_QWORD *)(v4 + 528) + 3504LL) + 320LL);\n  if ( v6->m_colorActionVector._Mypair._Myval2._Myfirst[v5] )\n  {\n    ColorAction = GJEffectManager::getColorAction(v6, ActiveMode);\n    v8 = ColorAction;\n    m_colorSprite = a1->m_colorSprite;\n    if ( ColorAction )\n    {\n      ColorChannelSprite::updateCopyLabel(a1->m_colorSprite, ColorAction->m_copyID, ColorAction->m_copyColorLoop);\n      ColorChannelSprite::updateOpacity(m_colorSprite, v8->m_fromOpacity);\n      ColorChannelSprite::updateBlending(m_colorSprite, v8->m_blending);\n      LOWORD(v10) = *(_WORD *)&v8->m_fromColor.r;\n      BYTE2(v10) = v8->m_fromColor.b;\n      if ( v8->m_copyID && !v8->m_copyColorLoop )\n      {\n        LOWORD(v10) = -22874;\n        BYTE2(v10) = -90;\n      }\n      m_colorSprite->setColor(&m_colorSprite->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v10);\n      goto LABEL_18;\n    }\n  }\n  else\n  {\nLABEL_13:\n    m_colorSprite = a1->m_colorSprite;\n  }\n  m_colorSprite->setColor(&m_colorSprite->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&word_140529AB0);\n  if ( m_colorSprite->m_copyLabel )\n    m_colorSprite->m_copyLabel->setVisible(m_colorSprite->m_copyLabel, 0);\n  ColorChannelSprite::updateOpacity(m_colorSprite, 1.0);\n  if ( m_colorSprite->m_blendingLabel )\n    m_colorSprite->m_blendingLabel->setVisible(m_colorSprite->m_blendingLabel, 0);\nLABEL_18:\n  LOBYTE(v1) = ActiveMode < 1;\n  switch ( ActiveMode )\n  {\n    case 1005:\n    case 1006:\n    case 1007:\n    case 1010:\n    case 1011:\n    case 1012:\n      LOBYTE(v1) = 1;\n      break;\n    default:\n      break;\n  }\n  LOBYTE(v1) = !v1;\n  a1->m_colorSpriteButton->setVisible(a1->m_colorSpriteButton, v1);\n}", "assembly": "; \n; CustomizeObjectLayer::updateColorSprite from 0x1400a8530 to 0x1400a8734 (516 bytes)\n; \n; 9 xrefs:\n; > CustomizeObjectLayer::onPaste @ 0x1400a8149\n; > CustomizeObjectLayer::colorSetupClosed @ 0x1400a8417\n; > CustomizeObjectLayer::colorSelectClosed @ 0x1400a8747\n; > CustomizeObjectLayer::onNextColorChannel @ 0x1400a8f8b\n; > CustomizeObjectLayer::onSelectMode @ 0x1400a9184\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x1400a9619\n; > CustomizeObjectLayer::textChanged @ 0x1400a9931\n; > CustomizeObjectLayer::onSelectColor @ 0x1400a9cfa\n; > <???> @ 0x1406c77b8\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     [rsp+arg_8], rbx                                               ; +0x0, 0x1400a8530\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1400a8535\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1400a853a\npush    rdi                                                            ; +0xf, 0x1400a853f\nsub     rsp, 20h                                                       ; +0x10, 0x1400a8540\nmov     rsi, rcx                                                       ; +0x14, 0x1400a8544\nxor     edi, edi                                                       ; +0x17, 0x1400a8547\ncmp     dword ptr [rcx+2D0h], 3                                        ; +0x19, 0x1400a8549\njz      loc_1400A86C0                                                  ; +0x20, 0x1400a8550\nmov     dl, 1                                                          ; +0x26, 0x1400a8556\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x28, 0x1400a8558\nmov     edi, eax                                                       ; +0x2d, 0x1400a855d\ntest    eax, eax                                                       ; +0x2f, 0x1400a855f\njle     loc_1400A865E                                                  ; +0x31, 0x1400a8561\nmov     rax, cs:qword_1406C2ED8                                        ; +0x37, 0x1400a8567\ntest    rax, rax                                                       ; +0x3e, 0x1400a856e\njnz     short loc_1400A85A2                                            ; +0x41, 0x1400a8571\nmov     ecx, 668h; Size                                                ; +0x43, 0x1400a8573\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x48, 0x1400a8578\nmov     [rsp+28h+arg_0], rax                                           ; +0x4d, 0x1400a857d\nmov     rcx, rax                                                       ; +0x52, 0x1400a8582\ncall    sub_14017AB00                                                  ; +0x55, 0x1400a8585\nnop                                                                    ; +0x5a, 0x1400a858a\nmov     cs:qword_1406C2ED8, rax                                        ; +0x5b, 0x1400a858b\nmov     rdx, [rax]                                                     ; +0x62, 0x1400a8592\nmov     rcx, rax                                                       ; +0x65, 0x1400a8595\ncall    qword ptr [rdx+48h]                                            ; +0x68, 0x1400a8598\nmov     rax, cs:qword_1406C2ED8                                        ; +0x6b, 0x1400a859b\nmov     edx, edi                                                       ; +0x72, 0x1400a85a2\nmov     ecx, 44Dh                                                      ; +0x74, 0x1400a85a4\ncmp     edi, ecx                                                       ; +0x79, 0x1400a85a9\ncmovg   edx, ecx                                                       ; +0x7b, 0x1400a85ab\nmov     rax, [rax+210h]                                                ; +0x7e, 0x1400a85ae\nmov     rcx, [rax+0DB0h]                                               ; +0x85, 0x1400a85b5\nmov     rcx, [rcx+140h]                                                ; +0x8c, 0x1400a85bc\nmovsxd  rdx, edx                                                       ; +0x93, 0x1400a85c3\nmov     rax, [rcx+2E0h]                                                ; +0x96, 0x1400a85c6\ncmp     qword ptr [rax+rdx*8], 0                                       ; +0x9d, 0x1400a85cd\njz      loc_1400A865E                                                  ; +0xa2, 0x1400a85d2\nmov     edx, edi                                                       ; +0xa8, 0x1400a85d8\ncall    GJEffectManager__getColorAction                                ; +0xaa, 0x1400a85da\nmov     rbp, rax                                                       ; +0xaf, 0x1400a85df\nmov     rbx, [rsi+368h]                                                ; +0xb2, 0x1400a85e2\ntest    rax, rax                                                       ; +0xb9, 0x1400a85e9\njz      short loc_1400A8665                                            ; +0xbc, 0x1400a85ec\nmovzx   r8d, byte ptr [rax+7Eh]                                        ; +0xbe, 0x1400a85ee\nmov     edx, [rax+78h]                                                 ; +0xc3, 0x1400a85f3\nmov     rcx, rbx                                                       ; +0xc6, 0x1400a85f6\ncall    ColorChannelSprite__updateCopyLabel                            ; +0xc9, 0x1400a85f9\nmovss   xmm1, dword ptr [rbp+60h]                                      ; +0xce, 0x1400a85fe\nmov     rcx, rbx                                                       ; +0xd3, 0x1400a8603\ncall    ColorChannelSprite__updateOpacity                              ; +0xd6, 0x1400a8606\nmovzx   edx, byte ptr [rbp+54h]                                        ; +0xdb, 0x1400a860b\nmov     rcx, rbx                                                       ; +0xdf, 0x1400a860f\ncall    ColorChannelSprite__updateBlending                             ; +0xe2, 0x1400a8612\nmovzx   eax, word ptr [rbp+48h]                                        ; +0xe7, 0x1400a8617\nmov     word ptr [rsp+28h+arg_0], ax                                   ; +0xeb, 0x1400a861b\nmovzx   eax, byte ptr [rbp+4Ah]                                        ; +0xf0, 0x1400a8620\nmov     byte ptr [rsp+28h+arg_0+2], al                                 ; +0xf4, 0x1400a8624\ncmp     dword ptr [rbp+78h], 0                                         ; +0xf8, 0x1400a8628\njz      short loc_1400A864B                                            ; +0xfc, 0x1400a862c\ncmp     byte ptr [rbp+7Eh], 0                                          ; +0xfe, 0x1400a862e\njnz     short loc_1400A864B                                            ; +0x102, 0x1400a8632\nmovzx   eax, cs:word_140529AA4                                         ; +0x104, 0x1400a8634\nmov     word ptr [rsp+28h+arg_0], ax                                   ; +0x10b, 0x1400a863b\nmovzx   eax, cs:byte_140529AA6                                         ; +0x110, 0x1400a8640\nmov     byte ptr [rsp+28h+arg_0+2], al                                 ; +0x117, 0x1400a8647\nlea     rcx, [rbx+140h]                                                ; +0x11b, 0x1400a864b\nmov     rax, [rcx]                                                     ; +0x122, 0x1400a8652\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x125, 0x1400a8655\ncall    qword ptr [rax]                                                ; +0x12a, 0x1400a865a\njmp     short loc_1400A86C0                                            ; +0x12c, 0x1400a865c\nmov     rbx, [rsi+368h]                                                ; +0x12e, 0x1400a865e\nlea     rcx, [rbx+140h]                                                ; +0x135, 0x1400a8665\nmov     rax, [rcx]                                                     ; +0x13c, 0x1400a866c\nlea     rdx, word_140529AB0                                            ; +0x13f, 0x1400a866f\ncall    qword ptr [rax]                                                ; +0x146, 0x1400a8676\ncmp     qword ptr [rbx+258h], 0                                        ; +0x148, 0x1400a8678\njz      short loc_1400A8694                                            ; +0x150, 0x1400a8680\nmov     rcx, [rbx+258h]                                                ; +0x152, 0x1400a8682\nmov     rax, [rcx]                                                     ; +0x159, 0x1400a8689\nxor     edx, edx                                                       ; +0x15c, 0x1400a868c\ncall    qword ptr [rax+140h]                                           ; +0x15e, 0x1400a868e\nmovss   xmm1, cs:flt_140622C24                                         ; +0x164, 0x1400a8694\nmov     rcx, rbx                                                       ; +0x16c, 0x1400a869c\ncall    ColorChannelSprite__updateOpacity                              ; +0x16f, 0x1400a869f\ncmp     qword ptr [rbx+268h], 0                                        ; +0x174, 0x1400a86a4\njz      short loc_1400A86C0                                            ; +0x17c, 0x1400a86ac\nmov     rcx, [rbx+268h]                                                ; +0x17e, 0x1400a86ae\nmov     rax, [rcx]                                                     ; +0x185, 0x1400a86b5\nxor     edx, edx                                                       ; +0x188, 0x1400a86b8\ncall    qword ptr [rax+140h]                                           ; +0x18a, 0x1400a86ba\ncmp     edi, 1                                                         ; +0x190, 0x1400a86c0\nsetl    dl                                                             ; +0x193, 0x1400a86c3\nadd     edi, 0FFFFFC13h; switch 8 cases                                ; +0x196, 0x1400a86c6\ncmp     edi, 7                                                         ; +0x19c, 0x1400a86cc\nja      short def_1400A86E6; jumptable 00000001400A86E6 default case, cases 1008,1009 ; +0x19f, 0x1400a86cf\nmovsxd  rax, edi                                                       ; +0x1a1, 0x1400a86d1\nlea     r8, cs:140000000h                                              ; +0x1a4, 0x1400a86d4\nmov     ecx, ds:(jpt_1400A86E6 - 140000000h)[r8+rax*4]                 ; +0x1ab, 0x1400a86db\nadd     rcx, r8                                                        ; +0x1b3, 0x1400a86e3\njmp     rcx; switch jump                                               ; +0x1b6, 0x1400a86e6\nmov     dl, 1; jumptable 00000001400A86E6 cases 1005-1007,1010-1012    ; +0x1b8, 0x1400a86e8\nmov     rcx, [rsi+370h]; jumptable 00000001400A86E6 default case, cases 1008,1009 ; +0x1ba, 0x1400a86ea\nmov     rax, [rcx]                                                     ; +0x1c1, 0x1400a86f1\nxor     dl, 1                                                          ; +0x1c4, 0x1400a86f4\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1c7, 0x1400a86f7\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x1cc, 0x1400a86fc\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x1d1, 0x1400a8701\nadd     rsp, 20h                                                       ; +0x1d6, 0x1400a8706\npop     rdi                                                            ; +0x1da, 0x1400a870a\njmp     qword ptr [rax+140h]                                           ; +0x1db, 0x1400a870b\nalign 4                                                                ; +0x1e2, 0x1400a8712\ndd offset loc_1400A86E8 - 140000000h; jump table for switch statement  ; +0x1e4, 0x1400a8714", "xrefs": ["CustomizeObjectLayer::onPaste @ 0x1400a8149", "CustomizeObjectLayer::colorSetupClosed @ 0x1400a8417", "CustomizeObjectLayer::colorSelectClosed @ 0x1400a8747", "CustomizeObjectLayer::onNextColorChannel @ 0x1400a8f8b", "CustomizeObjectLayer::onSelectMode @ 0x1400a9184", "CustomizeObjectLayer::onUpdateCustomColor @ 0x1400a9619", "CustomizeObjectLayer::textChanged @ 0x1400a9931", "CustomizeObjectLayer::onSelectColor @ 0x1400a9cfa", "<???> @ 0x1406c77b8"], "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"}