{"type": "func", "start": 4302484192, "end": 4302484411, "name": "ColorSelectPopup::updateCopyColor", "pseudocode": "// \n// ColorSelectPopup::updateCopyColor from 0x10072b2e0 to 0x10072b3bb (219 bytes)\n// \n// 4 xrefs:\n// > ColorSelectPopup::onToggleHSVMode @ 0x1007282a2\n// > ColorSelectPopup::onUpdateCustomColor @ 0x100728769\n// > ColorSelectPopup::textChanged @ 0x10072b02c\n// > ColorSelectPopup::colorSelectClosed @ 0x10072b6b2\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 __fastcall ColorSelectPopup::updateCopyColor(ColorSelectPopup *a1)\n{\n  EffectGameObject *m_gameObject; // rdi\n  int m_copyColorID; // r14d\n  int TargetColorIndex; // eax\n  int v5; // ecx\n  cocos2d::CCArray *m_gameObjects; // rdi\n  unsigned int v7; // r14d\n  EffectGameObject *v8; // r15\n  int v9; // r13d\n  ColorAction *m_colorAction; // rax\n  int v11; // edx\n\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_copyColorID = a1->m_copyColorID;\n    TargetColorIndex = EffectGameObject::getTargetColorIndex(m_gameObject);\n    v5 = 0;\n    if ( TargetColorIndex != m_copyColorID )\n      v5 = m_copyColorID;\n    a1->m_gameObject->m_copyColorID = v5;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects )\n    {\n      if ( (unsigned int)sub_100720070((__int64)m_gameObjects) )\n      {\n        v7 = 0;\n        do\n        {\n          v8 = (EffectGameObject *)sub_1007200C0((__int64)a1->m_gameObjects, v7);\n          v9 = a1->m_copyColorID;\n          if ( EffectGameObject::getTargetColorIndex(v8) == v9 )\n            v9 = 0;\n          v8->m_copyColorID = v9;\n          ++v7;\n        }\n        while ( v7 < (unsigned int)sub_100720070((__int64)a1->m_gameObjects) );\n      }\n    }\n    else\n    {\n      m_colorAction = a1->m_colorAction;\n      if ( m_colorAction )\n      {\n        v11 = 0;\n        if ( m_colorAction->m_colorID != a1->m_copyColorID )\n          v11 = a1->m_copyColorID;\n        m_colorAction->m_copyID = v11;\n      }\n    }\n  }\n}", "assembly": "; \n; ColorSelectPopup::updateCopyColor from 0x10072b2e0 to 0x10072b3bb (219 bytes)\n; \n; 4 xrefs:\n; > ColorSelectPopup::onToggleHSVMode @ 0x1007282a2\n; > ColorSelectPopup::onUpdateCustomColor @ 0x100728769\n; > ColorSelectPopup::textChanged @ 0x10072b02c\n; > ColorSelectPopup::colorSelectClosed @ 0x10072b6b2\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    rbp                                                            ; +0x0, 0x10072b2e0\nmov     rbp, rsp                                                       ; +0x1, 0x10072b2e1\npush    r15                                                            ; +0x4, 0x10072b2e4\npush    r14                                                            ; +0x6, 0x10072b2e6\npush    r13                                                            ; +0x8, 0x10072b2e8\npush    r12                                                            ; +0xa, 0x10072b2ea\npush    rbx                                                            ; +0xc, 0x10072b2ec\npush    rax                                                            ; +0xd, 0x10072b2ed\nmov     rbx, rdi                                                       ; +0xe, 0x10072b2ee\nmov     rdi, [rdi+290h]                                                ; +0x11, 0x10072b2f1\ntest    rdi, rdi                                                       ; +0x18, 0x10072b2f8\njz      short loc_10072B32E                                            ; +0x1b, 0x10072b2fb\nmov     r14d, [rbx+450h]                                               ; +0x1d, 0x10072b2fd\ncall    EffectGameObject__getTargetColorIndex                          ; +0x24, 0x10072b304\nxor     ecx, ecx                                                       ; +0x29, 0x10072b309\ncmp     eax, r14d                                                      ; +0x2b, 0x10072b30b\ncmovnz  ecx, r14d                                                      ; +0x2e, 0x10072b30e\nmov     rax, [rbx+290h]                                                ; +0x32, 0x10072b312\nmov     [rax+65Ch], ecx                                                ; +0x39, 0x10072b319\nadd     rsp, 8                                                         ; +0x3f, 0x10072b31f\npop     rbx                                                            ; +0x43, 0x10072b323\npop     r12                                                            ; +0x44, 0x10072b324\npop     r13                                                            ; +0x46, 0x10072b326\npop     r14                                                            ; +0x48, 0x10072b328\npop     r15                                                            ; +0x4a, 0x10072b32a\npop     rbp                                                            ; +0x4c, 0x10072b32c\nretn                                                                   ; +0x4d, 0x10072b32d\nmov     rdi, [rbx+298h]                                                ; +0x4e, 0x10072b32e\ntest    rdi, rdi                                                       ; +0x55, 0x10072b335\njz      short loc_10072B395                                            ; +0x58, 0x10072b338\ncall    sub_100720070                                                  ; +0x5a, 0x10072b33a\ntest    eax, eax                                                       ; +0x5f, 0x10072b33f\njz      short loc_10072B31F                                            ; +0x61, 0x10072b341\nxor     r12d, r12d                                                     ; +0x63, 0x10072b343\nxor     r14d, r14d                                                     ; +0x66, 0x10072b346\nnop     dword ptr [rax+00000000h]                                      ; +0x69, 0x10072b349\nmov     rdi, [rbx+298h]                                                ; +0x70, 0x10072b350\nmov     esi, r14d                                                      ; +0x77, 0x10072b357\ncall    sub_1007200C0                                                  ; +0x7a, 0x10072b35a\nmov     r15, rax                                                       ; +0x7f, 0x10072b35f\nmov     r13d, [rbx+450h]                                               ; +0x82, 0x10072b362\nmov     rdi, rax                                                       ; +0x89, 0x10072b369\ncall    EffectGameObject__getTargetColorIndex                          ; +0x8c, 0x10072b36c\ncmp     eax, r13d                                                      ; +0x91, 0x10072b371\ncmovz   r13d, r12d                                                     ; +0x94, 0x10072b374\nmov     [r15+65Ch], r13d                                               ; +0x98, 0x10072b378\ninc     r14d                                                           ; +0x9f, 0x10072b37f\nmov     rdi, [rbx+298h]                                                ; +0xa2, 0x10072b382\ncall    sub_100720070                                                  ; +0xa9, 0x10072b389\ncmp     r14d, eax                                                      ; +0xae, 0x10072b38e\njb      short loc_10072B350                                            ; +0xb1, 0x10072b391\njmp     short loc_10072B31F                                            ; +0xb3, 0x10072b393\nmov     rax, [rbx+430h]                                                ; +0xb5, 0x10072b395\ntest    rax, rax                                                       ; +0xbc, 0x10072b39c\njz      loc_10072B31F                                                  ; +0xbf, 0x10072b39f\nmov     ecx, [rbx+450h]                                                ; +0xc5, 0x10072b3a5\nxor     edx, edx                                                       ; +0xcb, 0x10072b3ab\ncmp     [rax+5Ch], ecx                                                 ; +0xcd, 0x10072b3ad\ncmovnz  edx, ecx                                                       ; +0xd0, 0x10072b3b0\nmov     [rax+78h], edx                                                 ; +0xd3, 0x10072b3b3\njmp     loc_10072B31F                                                  ; +0xd6, 0x10072b3b6", "xrefs": ["ColorSelectPopup::onToggleHSVMode @ 0x1007282a2", "ColorSelectPopup::onUpdateCustomColor @ 0x100728769", "ColorSelectPopup::textChanged @ 0x10072b02c", "ColorSelectPopup::colorSelectClosed @ 0x10072b6b2"], "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"}