{"type": "func", "start": 8137272, "end": 8137448, "name": "EditorUI::editorLayerForArray", "pseudocode": "// \n// EditorUI::editorLayerForArray from 0x7c2a38 to 0x7c2ae8 (176 bytes)\n// \n// 5 xrefs:\n// > EditorUI::onGoToLayer @ 0x7c6344\n// > EditorUI::onGoToLayer @ 0x7c6358\n// > EditorUI::updateButtons @ 0x7c8618\n// > EditorUI::updateButtons @ 0x7c8630\n// > <???> @ 0x61558\n// \n// This function is hookable on this platform (idp: arm, 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 12:54:07 +0000\n// \n\n__int64 __fastcall EditorUI::editorLayerForArray(EditorUI *this, cocos2d::CCArray *a2, unsigned __int8 a3)\n{\n  int v3; // w22\n  unsigned int v5; // w19\n  unsigned int v6; // w20\n  bool v7; // cf\n  unsigned int v8; // w1\n  cocos2d::CCArray *v9; // x0\n  __int64 v10; // x0\n  unsigned int v11; // w0\n\n  v3 = a3;\n  if ( a2 )\n  {\n    v5 = 0;\n    v6 = -1;\n    v7 = (unsigned int)cocos2d::CCArray::count(a2) == 0;\n    v8 = 0;\n    v9 = a2;\n    if ( v7 )\n    {\nLABEL_9:\n      if ( v6 != -1 )\n        return v6;\n    }\n    else\n    {\n      while ( 1 )\n      {\n        v10 = cocos2d::CCArray::objectAtIndex(v9, v8);\n        v11 = v3 ? *(__int16 *)(v10 + 1204) : *(__int16 *)(v10 + 1202);\n        ++v5;\n        if ( v6 != -1 && v6 != v11 )\n          break;\n        v6 = v11;\n        v7 = v5 >= (unsigned int)cocos2d::CCArray::count(a2);\n        v8 = v5;\n        v9 = a2;\n        if ( v7 )\n          goto LABEL_9;\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; EditorUI::editorLayerForArray from 0x7c2a38 to 0x7c2ae8 (176 bytes)\n; \n; 5 xrefs:\n; > EditorUI::onGoToLayer @ 0x7c6344\n; > EditorUI::onGoToLayer @ 0x7c6358\n; > EditorUI::updateButtons @ 0x7c8618\n; > EditorUI::updateButtons @ 0x7c8630\n; > <???> @ 0x61558\n; \n; This function is hookable on this platform (idp: arm, 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 12:54:07 +0000\n; \nSTP             X29, X30, [SP,#-0x30+var_s0]!                          ; +0x0, 0x7c2a38\nMOV             X29, SP                                                ; +0x4, 0x7c2a3c\nSTP             X21, X22, [SP,#var_s20]                                ; +0x8, 0x7c2a40\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x7c2a44\nUXTB            W22, W2                                                ; +0x10, 0x7c2a48\nCBZ             X1, loc_7C2AD4                                         ; +0x14, 0x7c2a4c\nMOV             X21, X1                                                ; +0x18, 0x7c2a50\nMOV             W19, #0                                                ; +0x1c, 0x7c2a54\nMOV             X0, X21; this                                          ; +0x20, 0x7c2a58\nMOV             W20, #0xFFFFFFFF                                       ; +0x24, 0x7c2a5c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x28, 0x7c2a60\nCMP             W19, W0                                                ; +0x2c, 0x7c2a64\nMOV             W1, W19; unsigned int                                  ; +0x30, 0x7c2a68\nMOV             X0, X21; this                                          ; +0x34, 0x7c2a6c\nB.CS            loc_7C2AB0                                             ; +0x38, 0x7c2a70\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x3c, 0x7c2a74\nCBZ             W22, loc_7C2ACC                                        ; +0x40, 0x7c2a78\nLDRSH           W0, [X0,#0x4B4]                                        ; +0x44, 0x7c2a7c\nCMN             W20, #1                                                ; +0x48, 0x7c2a80\nADD             W19, W19, #1                                           ; +0x4c, 0x7c2a84\nB.EQ            loc_7C2A94                                             ; +0x50, 0x7c2a88\nCMP             W20, W0                                                ; +0x54, 0x7c2a8c\nB.NE            loc_7C2AD4                                             ; +0x58, 0x7c2a90\nMOV             W20, W0                                                ; +0x5c, 0x7c2a94\nMOV             X0, X21; this                                          ; +0x60, 0x7c2a98\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x64, 0x7c2a9c\nCMP             W19, W0                                                ; +0x68, 0x7c2aa0\nMOV             W1, W19                                                ; +0x6c, 0x7c2aa4\nMOV             X0, X21                                                ; +0x70, 0x7c2aa8\nB.CC            loc_7C2A74                                             ; +0x74, 0x7c2aac\nCMN             W20, #1                                                ; +0x78, 0x7c2ab0\nB.EQ            loc_7C2AD4                                             ; +0x7c, 0x7c2ab4\nMOV             W0, W20                                                ; +0x80, 0x7c2ab8\nLDP             X19, X20, [SP,#var_s10]                                ; +0x84, 0x7c2abc\nLDP             X21, X22, [SP,#var_s20]                                ; +0x88, 0x7c2ac0\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0x8c, 0x7c2ac4\nRET                                                                    ; +0x90, 0x7c2ac8\nLDRSH           W0, [X0,#0x4B2]                                        ; +0x94, 0x7c2acc\nB               loc_7C2A80                                             ; +0x98, 0x7c2ad0\nMOV             W0, #0                                                 ; +0x9c, 0x7c2ad4\nLDP             X19, X20, [SP,#var_s10]                                ; +0xa0, 0x7c2ad8\nLDP             X21, X22, [SP,#var_s20]                                ; +0xa4, 0x7c2adc\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0xa8, 0x7c2ae0\nRET                                                                    ; +0xac, 0x7c2ae4", "xrefs": ["EditorUI::onGoToLayer @ 0x7c6344", "EditorUI::onGoToLayer @ 0x7c6358", "EditorUI::updateButtons @ 0x7c8618", "EditorUI::updateButtons @ 0x7c8630", "<???> @ 0x61558"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}