{"type": "func", "start": 5369841008, "end": 5369841272, "name": "EditorUI::onPasteColor", "pseudocode": "// \n// EditorUI::onPasteColor from 0x140114570 to 0x140114678 (264 bytes)\n// \n// 2 xrefs:\n// > EditorUI::init @ 0x1400e110c\n// > <???> @ 0x1406c90f0\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=1\nvoid EditorUI::onPasteColor(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // rbp\n  cocos2d::CCArray *m_selectedObjects; // rax\n  GameObject *m_selectedObject; // rbx\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  GameObject **arr; // rbx\n  GameObject **i; // rsi\n  GameObject *v10; // rdi\n  void *v11; // [rsp+40h] [rbp+8h]\n\n  if ( a1->m_selectedObject || cocos2d::CCArray::count(a1->m_selectedObjects) )\n  {\n    v3 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v11 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = qword_1406C2ED8;\n    }\n    m_selectedObjects = a1->m_selectedObjects;\n    m_selectedObject = a1->m_selectedObject;\n    if ( *(_QWORD *)(*(_QWORD *)(v3 + 528) + 14368LL) )\n    {\n      if ( m_selectedObject )\n      {\n        GameObject::duplicateColorMode(a1->m_selectedObject);\n        m_selectedObject->m_updateParents = 1;\n      }\n      else if ( m_selectedObjects )\n      {\n        data = m_selectedObjects->data;\n        num = data->num;\n        if ( (_DWORD)num )\n        {\n          arr = (GameObject **)data->arr;\n          for ( i = &arr[num - 1]; arr <= i; ++arr )\n          {\n            v10 = *arr;\n            if ( !*arr )\n              break;\n            GameObject::duplicateColorMode(*arr);\n            v10->m_updateParents = 1;\n          }\n        }\n      }\n    }\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::onPasteColor from 0x140114570 to 0x140114678 (264 bytes)\n; \n; 2 xrefs:\n; > EditorUI::init @ 0x1400e110c\n; > <???> @ 0x1406c90f0\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, 0x140114570\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140114575\npush    rsi                                                            ; +0xa, 0x14011457a\npush    rdi                                                            ; +0xb, 0x14011457b\npush    r14                                                            ; +0xc, 0x14011457c\nsub     rsp, 20h                                                       ; +0xe, 0x14011457e\nmov     r14, rcx                                                       ; +0x12, 0x140114582\ncmp     qword ptr [rcx+538h], 0                                        ; +0x15, 0x140114585\njnz     short loc_1401145A4                                            ; +0x1d, 0x14011458d\nmov     rcx, [rcx+340h]                                                ; +0x1f, 0x14011458f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x26, 0x140114596\ntest    eax, eax                                                       ; +0x2c, 0x14011459c\njz      loc_140114665                                                  ; +0x2e, 0x14011459e\nmov     rbp, cs:qword_1406C2ED8                                        ; +0x34, 0x1401145a4\ntest    rbp, rbp                                                       ; +0x3b, 0x1401145ab\njnz     short loc_1401145DF                                            ; +0x3e, 0x1401145ae\nmov     ecx, 668h; Size                                                ; +0x40, 0x1401145b0\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x45, 0x1401145b5\nmov     [rsp+38h+arg_0], rax                                           ; +0x4a, 0x1401145ba\nmov     rcx, rax                                                       ; +0x4f, 0x1401145bf\ncall    sub_14017AB00                                                  ; +0x52, 0x1401145c2\nnop                                                                    ; +0x57, 0x1401145c7\nmov     cs:qword_1406C2ED8, rax                                        ; +0x58, 0x1401145c8\nmov     rdx, [rax]                                                     ; +0x5f, 0x1401145cf\nmov     rcx, rax                                                       ; +0x62, 0x1401145d2\ncall    qword ptr [rdx+48h]                                            ; +0x65, 0x1401145d5\nmov     rbp, cs:qword_1406C2ED8                                        ; +0x68, 0x1401145d8\nmov     rax, [r14+340h]                                                ; +0x6f, 0x1401145df\nmov     rbx, [r14+538h]                                                ; +0x76, 0x1401145e6\nmov     rbp, [rbp+210h]                                                ; +0x7d, 0x1401145ed\nmov     rdx, [rbp+3820h]                                               ; +0x84, 0x1401145f4\ntest    rdx, rdx                                                       ; +0x8b, 0x1401145fb\njz      short loc_14011465D                                            ; +0x8e, 0x1401145fe\ntest    rbx, rbx                                                       ; +0x90, 0x140114600\njz      short loc_140114616                                            ; +0x93, 0x140114603\nmov     rcx, rbx                                                       ; +0x95, 0x140114605\ncall    GameObject__duplicateColorMode                                 ; +0x98, 0x140114608\nmov     byte ptr [rbx+484h], 1                                         ; +0x9d, 0x14011460d\njmp     short loc_14011465D                                            ; +0xa4, 0x140114614\ntest    rax, rax                                                       ; +0xa6, 0x140114616\njz      short loc_14011465D                                            ; +0xa9, 0x140114619\nmov     rbx, [rax+38h]                                                 ; +0xab, 0x14011461b\nmov     eax, [rbx]                                                     ; +0xaf, 0x14011461f\ntest    eax, eax                                                       ; +0xb1, 0x140114621\njz      short loc_14011465D                                            ; +0xb3, 0x140114623\nmov     rbx, [rbx+10h]                                                 ; +0xb5, 0x140114625\nlea     rsi, [rax-1]                                                   ; +0xb9, 0x140114629\nlea     rsi, [rbx+rsi*8]                                               ; +0xbd, 0x14011462d\ncmp     rbx, rsi                                                       ; +0xc1, 0x140114631\nja      short loc_14011465D                                            ; +0xc4, 0x140114634\nmov     rdi, [rbx]                                                     ; +0xc6, 0x140114636\ntest    rdi, rdi                                                       ; +0xc9, 0x140114639\njz      short loc_14011465D                                            ; +0xcc, 0x14011463c\nmov     rdx, [rbp+3820h]                                               ; +0xce, 0x14011463e\nmov     rcx, rdi                                                       ; +0xd5, 0x140114645\ncall    GameObject__duplicateColorMode                                 ; +0xd8, 0x140114648\nmov     byte ptr [rdi+484h], 1                                         ; +0xdd, 0x14011464d\nadd     rbx, 8                                                         ; +0xe4, 0x140114654\ncmp     rbx, rsi                                                       ; +0xe8, 0x140114658\njbe     short loc_140114636                                            ; +0xeb, 0x14011465b\nmov     rcx, r14                                                       ; +0xed, 0x14011465d\ncall    EditorUI__updateObjectInfoLabel                                ; +0xf0, 0x140114660\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xf5, 0x140114665\nmov     rbp, [rsp+38h+arg_10]                                          ; +0xfa, 0x14011466a\nadd     rsp, 20h                                                       ; +0xff, 0x14011466f\npop     r14                                                            ; +0x103, 0x140114673\npop     rdi                                                            ; +0x105, 0x140114675\npop     rsi                                                            ; +0x106, 0x140114676\nretn                                                                   ; +0x107, 0x140114677", "xrefs": ["EditorUI::init @ 0x1400e110c", "<???> @ 0x1406c90f0"], "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"}