{"type": "func", "start": 4731500, "end": 4731720, "name": "EditorUI::toggleDuplicateButton", "pseudocode": "// \n// EditorUI::toggleDuplicateButton from 0x48326c to 0x483348 (220 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateButtons @ 0x485fee\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n// \n\nint __fastcall EditorUI::toggleDuplicateButton(cocos2d::CCArray **this)\n{\n  _BOOL4 v2; // r5\n  __int16 *v3; // r1\n  int v4; // r1\n  __int16 *v5; // r1\n  int v6; // r1\n  GameManager *v7; // r0\n  int v8; // r0\n  int v9; // r5\n  int v10; // r5\n  _BOOL4 v11; // r5\n  __int16 *v12; // r1\n  int v13; // r1\n\n  if ( *(this + 249) )\n    v2 = 1;\n  else\n    v2 = cocos2d::CCArray::count(*(this + 167)) != 0;\n  *((_BYTE *)*(this + 196) + 320) = v2;\n  if ( v2 )\n    v3 = word_BEBDD8;\n  else\n    v3 = (__int16 *)&byte_BEBE3C;\n  (*(void (__fastcall **)(_DWORD, __int16 *))(*(_DWORD *)*(this + 196) + 480))(*(this + 196), v3);\n  if ( v2 )\n    v4 = 255;\n  else\n    v4 = 175;\n  (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 196) + 456))(*(this + 196), v4);\n  *((_BYTE *)*(this + 197) + 320) = v2;\n  if ( v2 )\n    v5 = word_BEBDD8;\n  else\n    v5 = (__int16 *)&byte_BEBE3C;\n  (*(void (__fastcall **)(_DWORD, __int16 *))(*(_DWORD *)*(this + 197) + 480))(*(this + 197), v5);\n  if ( v2 )\n    v6 = 255;\n  else\n    v6 = 175;\n  v7 = (GameManager *)(*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 197) + 456))(*(this + 197), v6);\n  v8 = GameManager::sharedState(v7);\n  v9 = *(unsigned __int8 *)(v8 + 388);\n  if ( (v9 & 1) != 0 )\n    v10 = *(_DWORD *)(v8 + 392);\n  else\n    v10 = v9 >> 1;\n  v11 = v10 != 0;\n  *((_BYTE *)*(this + 198) + 320) = v11;\n  if ( v11 )\n    v12 = word_BEBDD8;\n  else\n    v12 = (__int16 *)&byte_BEBE3C;\n  (*(void (__fastcall **)(_DWORD, __int16 *))(*(_DWORD *)*(this + 198) + 480))(*(this + 198), v12);\n  if ( v11 )\n    v13 = 255;\n  else\n    v13 = 175;\n  return (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 198) + 456))(*(this + 198), v13);\n}", "assembly": "; \n; EditorUI::toggleDuplicateButton from 0x48326c to 0x483348 (220 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateButtons @ 0x485fee\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n; \nPUSH            {R4-R6,LR}                                             ; +0x0, 0x48326c\nMOV             R4, R0                                                 ; +0x2, 0x48326e\nLDR.W           R3, [R0,#0x3E4]                                        ; +0x4, 0x483270\nCBNZ            R3, loc_483286                                         ; +0x8, 0x483274\nLDR.W           R0, [R0,#0x29C]; this                                  ; +0xa, 0x483276\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xe, 0x48327a\nMOVS            R5, R0                                                 ; +0x12, 0x48327e\nIT NE                                                                  ; +0x14, 0x483280\nMOVNE           R5, #1                                                 ; +0x16, 0x483282\nB               loc_483288                                             ; +0x18, 0x483284\nMOVS            R5, #1                                                 ; +0x1a, 0x483286\nLDR.W           R3, [R4,#0x310]                                        ; +0x1c, 0x483288\nSTRB.W          R5, [R3,#0x140]                                        ; +0x20, 0x48328c\nLDR.W           R0, [R4,#0x310]                                        ; +0x24, 0x483290\nLDR             R3, [R0]                                               ; +0x28, 0x483294\nLDR.W           R3, [R3,#0x1E0]                                        ; +0x2a, 0x483296\nCBNZ            R5, loc_4832A4                                         ; +0x2e, 0x48329a\nLDR             R1, =(word_BEBDD8 - 0x4832A2)                          ; +0x30, 0x48329c\nADD             R1, PC; word_BEBDD8                                    ; +0x32, 0x48329e\nADDS            R1, #(byte_BEBE3C - 0xBEBDD8)                          ; +0x34, 0x4832a0\nB               loc_4832A8                                             ; +0x36, 0x4832a2\nLDR             R1, =(word_BEBDD8 - 0x4832AA)                          ; +0x38, 0x4832a4\nADD             R1, PC; word_BEBDD8                                    ; +0x3a, 0x4832a6\nBLX             R3                                                     ; +0x3c, 0x4832a8\nLDR.W           R0, [R4,#0x310]                                        ; +0x3e, 0x4832aa\nCMP             R5, #0                                                 ; +0x42, 0x4832ae\nLDR             R3, [R0]                                               ; +0x44, 0x4832b0\nITE NE                                                                 ; +0x46, 0x4832b2\nMOVNE           R1, #0xFF                                              ; +0x48, 0x4832b4\nMOVEQ           R1, #0xAF                                              ; +0x4a, 0x4832b6\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x4c, 0x4832b8\nBLX             R3                                                     ; +0x50, 0x4832bc\nLDR.W           R3, [R4,#0x314]                                        ; +0x52, 0x4832be\nSTRB.W          R5, [R3,#0x140]                                        ; +0x56, 0x4832c2\nLDR.W           R0, [R4,#0x314]                                        ; +0x5a, 0x4832c6\nLDR             R3, [R0]                                               ; +0x5e, 0x4832ca\nLDR.W           R3, [R3,#0x1E0]                                        ; +0x60, 0x4832cc\nCBNZ            R5, loc_4832DA                                         ; +0x64, 0x4832d0\nLDR             R1, =(word_BEBDD8 - 0x4832D8)                          ; +0x66, 0x4832d2\nADD             R1, PC; word_BEBDD8                                    ; +0x68, 0x4832d4\nADDS            R1, #(byte_BEBE3C - 0xBEBDD8)                          ; +0x6a, 0x4832d6\nB               loc_4832DE                                             ; +0x6c, 0x4832d8\nLDR             R1, =(word_BEBDD8 - 0x4832E0)                          ; +0x6e, 0x4832da\nADD             R1, PC; word_BEBDD8                                    ; +0x70, 0x4832dc\nBLX             R3                                                     ; +0x72, 0x4832de\nLDR.W           R0, [R4,#0x314]                                        ; +0x74, 0x4832e0\nCMP             R5, #0                                                 ; +0x78, 0x4832e4\nLDR             R3, [R0]                                               ; +0x7a, 0x4832e6\nITE NE                                                                 ; +0x7c, 0x4832e8\nMOVNE           R1, #0xFF                                              ; +0x7e, 0x4832ea\nMOVEQ           R1, #0xAF                                              ; +0x80, 0x4832ec\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x82, 0x4832ee\nBLX             R3                                                     ; +0x86, 0x4832f2\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x88, 0x4832f4\nLDRB.W          R5, [R0,#0x184]                                        ; +0x8c, 0x4832f8\nLSLS            R3, R5, #0x1F                                          ; +0x90, 0x4832fc\nLDR.W           R3, [R4,#0x318]                                        ; +0x92, 0x4832fe\nITE PL                                                                 ; +0x96, 0x483302\nASRPL           R5, R5, #1                                             ; +0x98, 0x483304\nLDRMI.W         R5, [R0,#0x188]                                        ; +0x9a, 0x483306\nADDS            R5, #0                                                 ; +0x9e, 0x48330a\nIT NE                                                                  ; +0xa0, 0x48330c\nMOVNE           R5, #1                                                 ; +0xa2, 0x48330e\nSTRB.W          R5, [R3,#0x140]                                        ; +0xa4, 0x483310\nLDR.W           R0, [R4,#0x318]                                        ; +0xa8, 0x483314\nLDR             R3, [R0]                                               ; +0xac, 0x483318\nLDR.W           R3, [R3,#0x1E0]                                        ; +0xae, 0x48331a\nCBNZ            R5, loc_483328                                         ; +0xb2, 0x48331e\nLDR             R1, =(word_BEBDD8 - 0x483326)                          ; +0xb4, 0x483320\nADD             R1, PC; word_BEBDD8                                    ; +0xb6, 0x483322\nADDS            R1, #(byte_BEBE3C - 0xBEBDD8)                          ; +0xb8, 0x483324\nB               loc_48332C                                             ; +0xba, 0x483326\nLDR             R1, =(word_BEBDD8 - 0x48332E)                          ; +0xbc, 0x483328\nADD             R1, PC; word_BEBDD8                                    ; +0xbe, 0x48332a\nBLX             R3                                                     ; +0xc0, 0x48332c\nLDR.W           R0, [R4,#0x318]                                        ; +0xc2, 0x48332e\nCMP             R5, #0                                                 ; +0xc6, 0x483332\nPOP.W           {R4-R6,LR}                                             ; +0xc8, 0x483334\nIT NE                                                                  ; +0xcc, 0x483338\nMOVNE           R1, #0xFF                                              ; +0xce, 0x48333a\nLDR             R3, [R0]                                               ; +0xd0, 0x48333c\nIT EQ                                                                  ; +0xd2, 0x48333e\nMOVEQ           R1, #0xAF                                              ; +0xd4, 0x483340\nLDR.W           R3, [R3,#0x1C8]                                        ; +0xd6, 0x483342\nBX              R3                                                     ; +0xda, 0x483346", "xrefs": ["EditorUI::updateButtons @ 0x485fee"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}