{"type": "func", "start": 5369397360, "end": 5369397696, "name": "CustomizeObjectLayer::onPaste", "pseudocode": "// \n// CustomizeObjectLayer::onPaste from 0x1400a8070 to 0x1400a81c0 (336 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x1400a7a3e\n// > <???> @ 0x1406c777c\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 CustomizeObjectLayer::onPaste(CustomizeObjectLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // r14\n  cocos2d::CCArray *m_targetObjects; // rax\n  GameObject *m_targetObject; // rbx\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  GameObject **arr; // rbx\n  GameObject **i; // rbp\n  GameObject *v10; // rdi\n  int ActiveMode; // eax\n  const char *CString; // rdx\n  cocos2d::CCString *v13; // rax\n  void *v14; // [rsp+40h] [rbp+8h]\n\n  v3 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v14 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = qword_1406C2ED8;\n  }\n  m_targetObjects = a1->m_targetObjects;\n  m_targetObject = a1->m_targetObject;\n  if ( *(_QWORD *)(*(_QWORD *)(v3 + 528) + 14368LL) )\n  {\n    if ( m_targetObject )\n    {\n      GameObject::duplicateColorMode(a1->m_targetObject);\n      m_targetObject->m_updateParents = 1;\n    }\n    else if ( m_targetObjects )\n    {\n      data = m_targetObjects->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  CustomizeObjectLayer::updateCurrentSelection(a1);\n  CustomizeObjectLayer::updateColorSprite(a1);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  if ( ActiveMode < 1000 )\n  {\n    if ( ActiveMode <= 0 )\n    {\n      CString = \" \";\n    }\n    else\n    {\n      v13 = cocos2d::CCString::createWithFormat(\"%i\", ActiveMode);\n      CString = cocos2d::CCString::getCString(v13);\n    }\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(ActiveMode);\n  }\n  a1->m_selectedColorLabel->setString(&a1->m_selectedColorLabel->cocos2d::CCLabelProtocol, CString);\n  CustomizeObjectLayer::updateHSVButtons(a1);\n}", "assembly": "; \n; CustomizeObjectLayer::onPaste from 0x1400a8070 to 0x1400a81c0 (336 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x1400a7a3e\n; > <???> @ 0x1406c777c\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, 0x1400a8070\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1400a8075\npush    rsi                                                            ; +0xa, 0x1400a807a\npush    rdi                                                            ; +0xb, 0x1400a807b\npush    r14                                                            ; +0xc, 0x1400a807c\nsub     rsp, 20h                                                       ; +0xe, 0x1400a807e\nmov     rsi, rcx                                                       ; +0x12, 0x1400a8082\nmov     r14, cs:qword_1406C2ED8                                        ; +0x15, 0x1400a8085\ntest    r14, r14                                                       ; +0x1c, 0x1400a808c\njnz     short loc_1400A80C0                                            ; +0x1f, 0x1400a808f\nmov     ecx, 668h; Size                                                ; +0x21, 0x1400a8091\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x26, 0x1400a8096\nmov     [rsp+38h+arg_0], rax                                           ; +0x2b, 0x1400a809b\nmov     rcx, rax                                                       ; +0x30, 0x1400a80a0\ncall    sub_14017AB00                                                  ; +0x33, 0x1400a80a3\nnop                                                                    ; +0x38, 0x1400a80a8\nmov     cs:qword_1406C2ED8, rax                                        ; +0x39, 0x1400a80a9\nmov     rdx, [rax]                                                     ; +0x40, 0x1400a80b0\nmov     rcx, rax                                                       ; +0x43, 0x1400a80b3\ncall    qword ptr [rdx+48h]                                            ; +0x46, 0x1400a80b6\nmov     r14, cs:qword_1406C2ED8                                        ; +0x49, 0x1400a80b9\nmov     rax, [rsi+2A0h]                                                ; +0x50, 0x1400a80c0\nmov     rbx, [rsi+298h]                                                ; +0x57, 0x1400a80c7\nmov     r14, [r14+210h]                                                ; +0x5e, 0x1400a80ce\nmov     rdx, [r14+3820h]                                               ; +0x65, 0x1400a80d5\ntest    rdx, rdx                                                       ; +0x6c, 0x1400a80dc\njz      short loc_1400A813E                                            ; +0x6f, 0x1400a80df\ntest    rbx, rbx                                                       ; +0x71, 0x1400a80e1\njz      short loc_1400A80F7                                            ; +0x74, 0x1400a80e4\nmov     rcx, rbx                                                       ; +0x76, 0x1400a80e6\ncall    GameObject__duplicateColorMode                                 ; +0x79, 0x1400a80e9\nmov     byte ptr [rbx+484h], 1                                         ; +0x7e, 0x1400a80ee\njmp     short loc_1400A813E                                            ; +0x85, 0x1400a80f5\ntest    rax, rax                                                       ; +0x87, 0x1400a80f7\njz      short loc_1400A813E                                            ; +0x8a, 0x1400a80fa\nmov     rbx, [rax+38h]                                                 ; +0x8c, 0x1400a80fc\nmov     eax, [rbx]                                                     ; +0x90, 0x1400a8100\ntest    eax, eax                                                       ; +0x92, 0x1400a8102\njz      short loc_1400A813E                                            ; +0x94, 0x1400a8104\nmov     rbx, [rbx+10h]                                                 ; +0x96, 0x1400a8106\nlea     rbp, [rax-1]                                                   ; +0x9a, 0x1400a810a\nlea     rbp, [rbx+rbp*8]                                               ; +0x9e, 0x1400a810e\ncmp     rbx, rbp                                                       ; +0xa2, 0x1400a8112\nja      short loc_1400A813E                                            ; +0xa5, 0x1400a8115\nmov     rdi, [rbx]                                                     ; +0xa7, 0x1400a8117\ntest    rdi, rdi                                                       ; +0xaa, 0x1400a811a\njz      short loc_1400A813E                                            ; +0xad, 0x1400a811d\nmov     rdx, [r14+3820h]                                               ; +0xaf, 0x1400a811f\nmov     rcx, rdi                                                       ; +0xb6, 0x1400a8126\ncall    GameObject__duplicateColorMode                                 ; +0xb9, 0x1400a8129\nmov     byte ptr [rdi+484h], 1                                         ; +0xbe, 0x1400a812e\nadd     rbx, 8                                                         ; +0xc5, 0x1400a8135\ncmp     rbx, rbp                                                       ; +0xc9, 0x1400a8139\njbe     short loc_1400A8117                                            ; +0xcc, 0x1400a813c\nmov     rcx, rsi                                                       ; +0xce, 0x1400a813e\ncall    CustomizeObjectLayer__updateCurrentSelection                   ; +0xd1, 0x1400a8141\nmov     rcx, rsi                                                       ; +0xd6, 0x1400a8146\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0xd9, 0x1400a8149\nmov     dl, 1                                                          ; +0xde, 0x1400a814e\nmov     rcx, rsi                                                       ; +0xe0, 0x1400a8150\ncall    CustomizeObjectLayer__getActiveMode                            ; +0xe3, 0x1400a8153\ncmp     eax, 3E8h                                                      ; +0xe8, 0x1400a8158\njl      short loc_1400A816B                                            ; +0xed, 0x1400a815d\nmov     ecx, eax                                                       ; +0xef, 0x1400a815f\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0xf1, 0x1400a8161\nmov     rdx, rax                                                       ; +0xf6, 0x1400a8166\njmp     short loc_1400A8193                                            ; +0xf9, 0x1400a8169\ntest    eax, eax                                                       ; +0xfb, 0x1400a816b\njle     short loc_1400A818C                                            ; +0xfd, 0x1400a816d\nmov     edx, eax                                                       ; +0xff, 0x1400a816f\nlea     rcx, aI_11; \"%i\"                                               ; +0x101, 0x1400a8171\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x108, 0x1400a8178\nmov     rcx, rax                                                       ; +0x10e, 0x1400a817e\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x111, 0x1400a8181\nmov     rdx, rax                                                       ; +0x117, 0x1400a8187\njmp     short loc_1400A8193                                            ; +0x11a, 0x1400a818a\nlea     rdx, asc_140518984; \" \"                                        ; +0x11c, 0x1400a818c\nmov     rcx, [rsi+310h]                                                ; +0x123, 0x1400a8193\nadd     rcx, 168h                                                      ; +0x12a, 0x1400a819a\nmov     rax, [rcx]                                                     ; +0x131, 0x1400a81a1\ncall    qword ptr [rax]                                                ; +0x134, 0x1400a81a4\nmov     rcx, rsi                                                       ; +0x136, 0x1400a81a6\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x139, 0x1400a81a9\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x13e, 0x1400a81ae\nadd     rsp, 20h                                                       ; +0x143, 0x1400a81b3\npop     r14                                                            ; +0x147, 0x1400a81b7\npop     rdi                                                            ; +0x149, 0x1400a81b9\npop     rsi                                                            ; +0x14a, 0x1400a81ba\njmp     CustomizeObjectLayer__updateHSVButtons                         ; +0x14b, 0x1400a81bb", "xrefs": ["CustomizeObjectLayer::init @ 0x1400a7a3e", "<???> @ 0x1406c777c"], "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"}