{"type": "func", "start": 5370573472, "end": 5370573808, "name": "EditorUI::onPasteColor", "pseudocode": "// \n// EditorUI::onPasteColor from 0x1401c72a0 to 0x1401c73f0 (336 bytes)\n// \n// 3 xrefs:\n// > EditorUI::handleEditorAction @ 0x1401c4483\n// > EditorUI::init @ 0x1401ababd\n// > <???> @ 0x14091a7a4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:28:05 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditorUI::onPasteColor(__int64 a1)\n{\n  _QWORD *v2; // r15\n  _QWORD *v3; // rbp\n  _QWORD *v4; // rdi\n  int v5; // ebx\n  __int64 v6; // rcx\n  __int64 v7; // rax\n  __int64 v8; // rbx\n  __int64 v9; // rbp\n  __int64 v10; // rdx\n  unsigned int *v11; // rbx\n  __int64 v12; // rax\n  _QWORD *v13; // rbx\n  _QWORD *i; // rsi\n  __int64 v15; // rdi\n  void *v16; // [rsp+40h] [rbp+8h]\n\n  v2 = (_QWORD *)(a1 + 1568);\n  if ( *(_QWORD *)(a1 + 1568) )\n  {\n    v3 = (_QWORD *)(a1 + 1568);\n  }\n  else\n  {\n    if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )\n      return;\n    v3 = (_QWORD *)(a1 + 1568);\n  }\n  v4 = (_QWORD *)EditorSFXManager::sharedState();\n  v5 = 114;\n  if ( !EditorSFXManager::hasSoundsForAction(v4, 114) )\n    v5 = 111;\n  EditorSFXManager::playAction((__int64)v4, v5);\n  v6 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v16 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = v3;\n    v6 = qword_14090BFD0;\n  }\n  v7 = *(_QWORD *)(a1 + 944);\n  v8 = *v2;\n  v9 = *(_QWORD *)(v6 + 568);\n  v10 = *(_QWORD *)(v9 + 14776);\n  if ( v10 )\n  {\n    if ( v8 )\n    {\n      GameObject::duplicateColorMode(*v2, v10);\n      *(_BYTE *)(v8 + 1156) = 1;\n    }\n    else if ( v7 )\n    {\n      v11 = *(unsigned int **)(v7 + 56);\n      v12 = *v11;\n      if ( (_DWORD)v12 )\n      {\n        v13 = *((_QWORD **)v11 + 2);\n        for ( i = &v13[v12 - 1]; v13 <= i; ++v13 )\n        {\n          v15 = *v13;\n          if ( !*v13 )\n            break;\n          GameObject::duplicateColorMode(*v13, *(_QWORD *)(v9 + 14776));\n          *(_BYTE *)(v15 + 1156) = 1;\n        }\n      }\n    }\n  }\n  EditorUI::updateObjectInfoLabel(a1);\n}", "assembly": "; \n; EditorUI::onPasteColor from 0x1401c72a0 to 0x1401c73f0 (336 bytes)\n; \n; 3 xrefs:\n; > EditorUI::handleEditorAction @ 0x1401c4483\n; > EditorUI::init @ 0x1401ababd\n; > <???> @ 0x14091a7a4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:28:05 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401c72a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1401c72a5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1401c72aa\npush    rdi                                                            ; +0xf, 0x1401c72af\npush    r14                                                            ; +0x10, 0x1401c72b0\npush    r15                                                            ; +0x12, 0x1401c72b2\nsub     rsp, 20h                                                       ; +0x14, 0x1401c72b4\nmov     r14, rcx                                                       ; +0x18, 0x1401c72b8\nlea     r15, [rcx+620h]                                                ; +0x1b, 0x1401c72bb\ncmp     qword ptr [r15], 0                                             ; +0x22, 0x1401c72c2\njnz     short loc_1401C72E6                                            ; +0x26, 0x1401c72c6\nmov     rcx, [rcx+3B0h]                                                ; +0x28, 0x1401c72c8\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2f, 0x1401c72cf\ntest    eax, eax                                                       ; +0x35, 0x1401c72d5\njz      loc_1401C73D7                                                  ; +0x37, 0x1401c72d7\nlea     rbp, [r14+620h]                                                ; +0x3d, 0x1401c72dd\njmp     short loc_1401C72E9                                            ; +0x44, 0x1401c72e4\nmov     rbp, r15                                                       ; +0x46, 0x1401c72e6\ncall    EditorSFXManager__sharedState                                  ; +0x49, 0x1401c72e9\nmov     rdi, rax                                                       ; +0x4e, 0x1401c72ee\nmov     ebx, 72h ; 'r'                                                 ; +0x51, 0x1401c72f1\nmov     edx, ebx                                                       ; +0x56, 0x1401c72f6\nmov     rcx, rax                                                       ; +0x58, 0x1401c72f8\ncall    EditorSFXManager__hasSoundsForAction                           ; +0x5b, 0x1401c72fb\nmov     ecx, 6Fh ; 'o'                                                 ; +0x60, 0x1401c7300\ntest    al, al                                                         ; +0x65, 0x1401c7305\ncmovz   ebx, ecx                                                       ; +0x67, 0x1401c7307\nmov     edx, ebx                                                       ; +0x6a, 0x1401c730a\nmov     rcx, rdi                                                       ; +0x6c, 0x1401c730c\ncall    EditorSFXManager__playAction                                   ; +0x6f, 0x1401c730f\nmov     rcx, cs:qword_14090BFD0                                        ; +0x74, 0x1401c7314\ntest    rcx, rcx                                                       ; +0x7b, 0x1401c731b\njnz     short loc_1401C7355                                            ; +0x7e, 0x1401c731e\nmov     ecx, 6E8h; Size                                                ; +0x80, 0x1401c7320\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x85, 0x1401c7325\nmov     [rsp+38h+arg_0], rax                                           ; +0x8a, 0x1401c732a\nmov     rcx, rax                                                       ; +0x8f, 0x1401c732f\ncall    GameManager__GameManager                                       ; +0x92, 0x1401c7332\nnop                                                                    ; +0x97, 0x1401c7337\nmov     cs:qword_14090BFD0, rax                                        ; +0x98, 0x1401c7338\nmov     rcx, [rax]                                                     ; +0x9f, 0x1401c733f\nmov     rdx, [rcx+48h]                                                 ; +0xa2, 0x1401c7342\nmov     rcx, rax                                                       ; +0xa6, 0x1401c7346\ncall    rdx                                                            ; +0xa9, 0x1401c7349\nmov     r15, rbp                                                       ; +0xab, 0x1401c734b\nmov     rcx, cs:qword_14090BFD0                                        ; +0xae, 0x1401c734e\nmov     rax, [r14+3B0h]                                                ; +0xb5, 0x1401c7355\nmov     rbx, [r15]                                                     ; +0xbc, 0x1401c735c\nmov     rbp, [rcx+238h]                                                ; +0xbf, 0x1401c735f\nmov     rdx, [rbp+39B8h]                                               ; +0xc6, 0x1401c7366\ntest    rdx, rdx                                                       ; +0xcd, 0x1401c736d\njz      short loc_1401C73CF                                            ; +0xd0, 0x1401c7370\ntest    rbx, rbx                                                       ; +0xd2, 0x1401c7372\njz      short loc_1401C7388                                            ; +0xd5, 0x1401c7375\nmov     rcx, rbx                                                       ; +0xd7, 0x1401c7377\ncall    GameObject__duplicateColorMode                                 ; +0xda, 0x1401c737a\nmov     byte ptr [rbx+484h], 1                                         ; +0xdf, 0x1401c737f\njmp     short loc_1401C73CF                                            ; +0xe6, 0x1401c7386\ntest    rax, rax                                                       ; +0xe8, 0x1401c7388\njz      short loc_1401C73CF                                            ; +0xeb, 0x1401c738b\nmov     rbx, [rax+38h]                                                 ; +0xed, 0x1401c738d\nmov     eax, [rbx]                                                     ; +0xf1, 0x1401c7391\ntest    eax, eax                                                       ; +0xf3, 0x1401c7393\njz      short loc_1401C73CF                                            ; +0xf5, 0x1401c7395\nmov     rbx, [rbx+10h]                                                 ; +0xf7, 0x1401c7397\nlea     rsi, [rax-1]                                                   ; +0xfb, 0x1401c739b\nlea     rsi, [rbx+rsi*8]                                               ; +0xff, 0x1401c739f\ncmp     rbx, rsi                                                       ; +0x103, 0x1401c73a3\nja      short loc_1401C73CF                                            ; +0x106, 0x1401c73a6\nmov     rdi, [rbx]                                                     ; +0x108, 0x1401c73a8\ntest    rdi, rdi                                                       ; +0x10b, 0x1401c73ab\njz      short loc_1401C73CF                                            ; +0x10e, 0x1401c73ae\nmov     rdx, [rbp+39B8h]                                               ; +0x110, 0x1401c73b0\nmov     rcx, rdi                                                       ; +0x117, 0x1401c73b7\ncall    GameObject__duplicateColorMode                                 ; +0x11a, 0x1401c73ba\nmov     byte ptr [rdi+484h], 1                                         ; +0x11f, 0x1401c73bf\nadd     rbx, 8                                                         ; +0x126, 0x1401c73c6\ncmp     rbx, rsi                                                       ; +0x12a, 0x1401c73ca\njbe     short loc_1401C73A8                                            ; +0x12d, 0x1401c73cd\nmov     rcx, r14                                                       ; +0x12f, 0x1401c73cf\ncall    EditorUI__updateObjectInfoLabel                                ; +0x132, 0x1401c73d2\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x137, 0x1401c73d7\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x13c, 0x1401c73dc\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x141, 0x1401c73e1\nadd     rsp, 20h                                                       ; +0x146, 0x1401c73e6\npop     r15                                                            ; +0x14a, 0x1401c73ea\npop     r14                                                            ; +0x14c, 0x1401c73ec\npop     rdi                                                            ; +0x14e, 0x1401c73ee\nretn                                                                   ; +0x14f, 0x1401c73ef", "xrefs": ["EditorUI::handleEditorAction @ 0x1401c4483", "EditorUI::init @ 0x1401ababd", "<???> @ 0x14091a7a4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}