{"type": "func", "start": 4297032304, "end": 4297032459, "name": "CustomizeObjectLayer::onPaste", "pseudocode": "// \n// CustomizeObjectLayer::onPaste from 0x1001f8270 to 0x1001f830b (155 bytes)\n// \n// 1 xrefs:\n// > CustomizeObjectLayer::init @ 0x1001f7046\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 CustomizeObjectLayer::onPaste(CustomizeObjectLayer *a1, cocos2d::CCObject *a2)\n{\n  char v2; // al\n  GameManager *v3; // rax\n  int ActiveMode; // eax\n  const char *CString; // rax\n  cocos2d::CCString *v6; // rax\n  const std::string::value_type *v7; // rsi\n  char v8; // [rsp-8h] [rbp-10h]\n\n  v8 = v2;\n  v3 = GameManager::sharedState();\n  LevelEditorLayer::pasteColorState(v3->m_levelEditorLayer, a1->m_targetObject, a1->m_targetObjects);\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      v7 = \" \";\n      goto LABEL_6;\n    }\n    v6 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v8);\n    CString = cocos2d::CCString::getCString(v6);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(ActiveMode);\n  }\n  v7 = CString;\nLABEL_6:\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const std::string::value_type *))a1->m_selectedColorLabel->setString)(\n    a1->m_selectedColorLabel,\n    v7);\n  CustomizeObjectLayer::updateHSVButtons(a1);\n}", "assembly": "; \n; CustomizeObjectLayer::onPaste from 0x1001f8270 to 0x1001f830b (155 bytes)\n; \n; 1 xrefs:\n; > CustomizeObjectLayer::init @ 0x1001f7046\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, 0x1001f8270\nmov     rbp, rsp                                                       ; +0x1, 0x1001f8271\npush    rbx                                                            ; +0x4, 0x1001f8274\npush    rax; char                                                      ; +0x5, 0x1001f8275\nmov     rbx, rdi                                                       ; +0x6, 0x1001f8276\ncall    GameManager__sharedState                                       ; +0x9, 0x1001f8279\nmov     rdi, [rax+200h]                                                ; +0xe, 0x1001f827e\nmov     rsi, [rbx+298h]                                                ; +0x15, 0x1001f8285\nmov     rdx, [rbx+2A0h]                                                ; +0x1c, 0x1001f828c\ncall    LevelEditorLayer__pasteColorState                              ; +0x23, 0x1001f8293\nmov     rdi, rbx                                                       ; +0x28, 0x1001f8298\ncall    CustomizeObjectLayer__updateCurrentSelection                   ; +0x2b, 0x1001f829b\nmov     rdi, rbx                                                       ; +0x30, 0x1001f82a0\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x33, 0x1001f82a3\nmov     rdi, rbx                                                       ; +0x38, 0x1001f82a8\nmov     esi, 1                                                         ; +0x3b, 0x1001f82ab\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x40, 0x1001f82b0\ncmp     eax, 3E8h                                                      ; +0x45, 0x1001f82b5\njl      short loc_1001F82C5                                            ; +0x4a, 0x1001f82ba\nmov     edi, eax                                                       ; +0x4c, 0x1001f82bc\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x4e, 0x1001f82be\njmp     short loc_1001F82E1                                            ; +0x53, 0x1001f82c3\ntest    eax, eax                                                       ; +0x55, 0x1001f82c5\njle     short loc_1001F8302                                            ; +0x57, 0x1001f82c7\nlea     rdi, aI; \"%i\"                                                  ; +0x59, 0x1001f82c9\nmov     esi, eax                                                       ; +0x60, 0x1001f82d0\nxor     eax, eax                                                       ; +0x62, 0x1001f82d2\ncall    sub_1007AB580                                                  ; +0x64, 0x1001f82d4\nmov     rdi, rax                                                       ; +0x69, 0x1001f82d9\ncall    cocos2d__CCString__getCString                                  ; +0x6c, 0x1001f82dc\nmov     rsi, rax                                                       ; +0x71, 0x1001f82e1\nmov     rdi, [rbx+310h]                                                ; +0x74, 0x1001f82e4\nmov     rax, [rdi]                                                     ; +0x7b, 0x1001f82eb\ncall    qword ptr [rax+390h]                                           ; +0x7e, 0x1001f82ee\nmov     rdi, rbx                                                       ; +0x84, 0x1001f82f4\nadd     rsp, 8                                                         ; +0x87, 0x1001f82f7\npop     rbx                                                            ; +0x8b, 0x1001f82fb\npop     rbp                                                            ; +0x8c, 0x1001f82fc\njmp     CustomizeObjectLayer__updateHSVButtons                         ; +0x8d, 0x1001f82fd\nlea     rsi, asc_100823F54; \" \"                                        ; +0x92, 0x1001f8302\njmp     short loc_1001F82E4                                            ; +0x99, 0x1001f8309", "xrefs": ["CustomizeObjectLayer::init @ 0x1001f7046"], "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"}