{"type": "func", "start": 3663668, "end": 3663870, "name": "EditorUI::toggleDuplicateButton", "pseudocode": "// \n// EditorUI::toggleDuplicateButton from 0x37e734 to 0x37e7fe (202 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateButtons @ 0x39caf6\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 EditorUI::toggleDuplicateButton(EditorUI *a1)\n{\n  _BOOL4 v2; // r5\n  CCMenuItemSpriteExtra *m_copyPasteBtn; // r0\n  CCMenuItemSpriteExtra_vtbl *v4; // r3\n  int v5; // r1\n  CCMenuItemSpriteExtra *m_copyBtn; // r0\n  CCMenuItemSpriteExtra_vtbl *v7; // r3\n  int v8; // r1\n  stl::StringData<char>::Internal *m_data; // r3\n  CCMenuItemSpriteExtra *m_pasteBtn; // r0\n  _BOOL4 v11; // r5\n  void (*setColor)(void); // r3\n  int v13; // r1\n\n  if ( a1->m_selectedObject )\n    v2 = 1;\n  else\n    v2 = cocos2d::CCArray::count(a1->m_selectedObjects) != 0;\n  m_copyPasteBtn = a1->m_copyPasteBtn;\n  v4 = m_copyPasteBtn->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  m_copyPasteBtn->m_animationEnabled = v2;\n  ((void (*)(void))v4->setColor)();\n  if ( v2 )\n    v5 = 255;\n  else\n    v5 = 175;\n  a1->m_copyPasteBtn->setOpacity(a1->m_copyPasteBtn, v5);\n  m_copyBtn = a1->m_copyBtn;\n  v7 = m_copyBtn->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  m_copyBtn->m_animationEnabled = v2;\n  ((void (*)(void))v7->setColor)();\n  if ( v2 )\n    v8 = 255;\n  else\n    v8 = 175;\n  a1->m_copyBtn->setOpacity(a1->m_copyBtn, v8);\n  m_data = GameManager::sharedState()->m_editorClipboard.m_data.m_data;\n  m_pasteBtn = a1->m_pasteBtn;\n  v11 = *((_DWORD *)m_data - 3) != 0;\n  setColor = (void (*)(void))m_pasteBtn->setColor;\n  m_pasteBtn->m_animationEnabled = v11;\n  setColor();\n  if ( v11 )\n    v13 = 255;\n  else\n    v13 = 175;\n  a1->m_pasteBtn->setOpacity(a1->m_pasteBtn, v13);\n}", "assembly": "; \n; EditorUI::toggleDuplicateButton from 0x37e734 to 0x37e7fe (202 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateButtons @ 0x39caf6\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\nLDR.W           R3, [R0,#0x374]                                        ; +0x0, 0x37e734\nPUSH            {R4-R6,LR}                                             ; +0x4, 0x37e738\nMOV             R4, R0                                                 ; +0x6, 0x37e73a\nCBNZ            R3, loc_37E74E                                         ; +0x8, 0x37e73c\nLDR.W           R0, [R0,#0x260]; this                                  ; +0xa, 0x37e73e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xe, 0x37e742\nMOVS            R5, R0                                                 ; +0x12, 0x37e746\nIT NE                                                                  ; +0x14, 0x37e748\nMOVNE           R5, #1                                                 ; +0x16, 0x37e74a\nB               loc_37E750                                             ; +0x18, 0x37e74c\nMOVS            R5, #1                                                 ; +0x1a, 0x37e74e\nLDR.W           R0, [R4,#0x2C4]                                        ; +0x1c, 0x37e750\nLDR             R3, [R0]                                               ; +0x20, 0x37e754\nSTRB.W          R5, [R0,#0x140]                                        ; +0x22, 0x37e756\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x26, 0x37e75a\nCBNZ            R5, loc_37E768                                         ; +0x2a, 0x37e75e\nLDR             R1, =(word_9AA83C - 0x37E766)                          ; +0x2c, 0x37e760\nADD             R1, PC; word_9AA83C                                    ; +0x2e, 0x37e762\nADDS            R1, #(word_9AA83F - 0x9AA83C)                          ; +0x30, 0x37e764\nB               loc_37E76C                                             ; +0x32, 0x37e766\nLDR             R1, =(word_9AA83C - 0x37E76E)                          ; +0x34, 0x37e768\nADD             R1, PC; word_9AA83C                                    ; +0x36, 0x37e76a\nBLX             R3                                                     ; +0x38, 0x37e76c\nLDR.W           R0, [R4,#0x2C4]                                        ; +0x3a, 0x37e76e\nCMP             R5, #0                                                 ; +0x3e, 0x37e772\nLDR             R3, [R0]                                               ; +0x40, 0x37e774\nITE NE                                                                 ; +0x42, 0x37e776\nMOVNE           R1, #0xFF                                              ; +0x44, 0x37e778\nMOVEQ           R1, #0xAF                                              ; +0x46, 0x37e77a\nLDR.W           R3, [R3,#0x1C0]                                        ; +0x48, 0x37e77c\nBLX             R3                                                     ; +0x4c, 0x37e780\nLDR.W           R0, [R4,#0x2C8]                                        ; +0x4e, 0x37e782\nLDR             R3, [R0]                                               ; +0x52, 0x37e786\nSTRB.W          R5, [R0,#0x140]                                        ; +0x54, 0x37e788\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x58, 0x37e78c\nCBNZ            R5, loc_37E79A                                         ; +0x5c, 0x37e790\nLDR             R1, =(word_9AA83C - 0x37E798)                          ; +0x5e, 0x37e792\nADD             R1, PC; word_9AA83C                                    ; +0x60, 0x37e794\nADDS            R1, #(word_9AA83F - 0x9AA83C)                          ; +0x62, 0x37e796\nB               loc_37E79E                                             ; +0x64, 0x37e798\nLDR             R1, =(word_9AA83C - 0x37E7A0)                          ; +0x66, 0x37e79a\nADD             R1, PC; word_9AA83C                                    ; +0x68, 0x37e79c\nBLX             R3                                                     ; +0x6a, 0x37e79e\nLDR.W           R0, [R4,#0x2C8]                                        ; +0x6c, 0x37e7a0\nCMP             R5, #0                                                 ; +0x70, 0x37e7a4\nLDR             R3, [R0]                                               ; +0x72, 0x37e7a6\nITE NE                                                                 ; +0x74, 0x37e7a8\nMOVNE           R1, #0xFF                                              ; +0x76, 0x37e7aa\nMOVEQ           R1, #0xAF                                              ; +0x78, 0x37e7ac\nLDR.W           R3, [R3,#0x1C0]                                        ; +0x7a, 0x37e7ae\nBLX             R3                                                     ; +0x7e, 0x37e7b2\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x80, 0x37e7b4\nLDR.W           R3, [R0,#0x164]                                        ; +0x84, 0x37e7b8\nLDR.W           R0, [R4,#0x2CC]                                        ; +0x88, 0x37e7bc\nLDR.W           R5, [R3,#-0xC]                                         ; +0x8c, 0x37e7c0\nLDR             R3, [R0]                                               ; +0x90, 0x37e7c4\nADDS            R5, #0                                                 ; +0x92, 0x37e7c6\nIT NE                                                                  ; +0x94, 0x37e7c8\nMOVNE           R5, #1                                                 ; +0x96, 0x37e7ca\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x98, 0x37e7cc\nSTRB.W          R5, [R0,#0x140]                                        ; +0x9c, 0x37e7d0\nCBNZ            R5, loc_37E7DE                                         ; +0xa0, 0x37e7d4\nLDR             R1, =(word_9AA83C - 0x37E7DC)                          ; +0xa2, 0x37e7d6\nADD             R1, PC; word_9AA83C                                    ; +0xa4, 0x37e7d8\nADDS            R1, #(word_9AA83F - 0x9AA83C)                          ; +0xa6, 0x37e7da\nB               loc_37E7E2                                             ; +0xa8, 0x37e7dc\nLDR             R1, =(word_9AA83C - 0x37E7E4)                          ; +0xaa, 0x37e7de\nADD             R1, PC; word_9AA83C                                    ; +0xac, 0x37e7e0\nBLX             R3                                                     ; +0xae, 0x37e7e2\nLDR.W           R0, [R4,#0x2CC]                                        ; +0xb0, 0x37e7e4\nCMP             R5, #0                                                 ; +0xb4, 0x37e7e8\nPOP.W           {R4-R6,LR}                                             ; +0xb6, 0x37e7ea\nIT NE                                                                  ; +0xba, 0x37e7ee\nMOVNE           R1, #0xFF                                              ; +0xbc, 0x37e7f0\nLDR             R3, [R0]                                               ; +0xbe, 0x37e7f2\nIT EQ                                                                  ; +0xc0, 0x37e7f4\nMOVEQ           R1, #0xAF                                              ; +0xc2, 0x37e7f6\nLDR.W           R3, [R3,#0x1C0]                                        ; +0xc4, 0x37e7f8\nBX              R3                                                     ; +0xc8, 0x37e7fc", "xrefs": ["EditorUI::updateButtons @ 0x39caf6"], "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"}