{"type": "func", "start": 4728202, "end": 4728272, "name": "EditorUI::editorLayerForArray", "pseudocode": "// \n// EditorUI::editorLayerForArray from 0x48258a to 0x4825d0 (70 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onGoToLayer @ 0x4843e4\n// > EditorUI::onGoToLayer @ 0x4843f2\n// > EditorUI::updateButtons @ 0x4861da\n// > EditorUI::updateButtons @ 0x4861ec\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::editorLayerForArray(EditorUI *this, cocos2d::CCArray *a2, int a3)\n{\n  unsigned int v5; // r6\n  int v6; // r5\n  int v7; // r0\n  int v8; // r3\n\n  if ( !a2 )\n    return 0;\n  v5 = 0;\n  v6 = -1;\n  while ( v5 < cocos2d::CCArray::count(a2) )\n  {\n    v7 = cocos2d::CCArray::objectAtIndex(a2, v5);\n    if ( a3 )\n      v8 = *(__int16 *)(v7 + 1040);\n    else\n      v8 = *(__int16 *)(v7 + 1038);\n    if ( v6 != -1 && v6 != v8 )\n      return 0;\n    ++v5;\n    v6 = v8;\n  }\n  if ( v6 == -1 )\n    return 0;\n  else\n    return v6;\n}", "assembly": "; \n; EditorUI::editorLayerForArray from 0x48258a to 0x4825d0 (70 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onGoToLayer @ 0x4843e4\n; > EditorUI::onGoToLayer @ 0x4843f2\n; > EditorUI::updateButtons @ 0x4861da\n; > EditorUI::updateButtons @ 0x4861ec\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            {R3-R7,LR}                                             ; +0x0, 0x48258a\nMOV             R7, R2                                                 ; +0x2, 0x48258c\nMOV             R4, R1                                                 ; +0x4, 0x48258e\nCBZ             R1, loc_4825BE                                         ; +0x6, 0x482590\nMOVS            R6, #0                                                 ; +0x8, 0x482592\nMOV.W           R5, #0xFFFFFFFF                                        ; +0xa, 0x482594\nB               loc_48259E                                             ; +0xe, 0x482598\nADDS            R6, #1                                                 ; +0x10, 0x48259a\nMOV             R5, R3                                                 ; +0x12, 0x48259c\nMOV             R0, R4; this                                           ; +0x14, 0x48259e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x16, 0x4825a0\nCMP             R6, R0                                                 ; +0x1a, 0x4825a4\nBCS             loc_4825C8                                             ; +0x1c, 0x4825a6\nMOV             R0, R4; this                                           ; +0x1e, 0x4825a8\nMOV             R1, R6; unsigned int                                   ; +0x20, 0x4825aa\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x22, 0x4825ac\nCBZ             R7, loc_4825C2                                         ; +0x26, 0x4825b0\nLDRSH.W         R3, [R0,#0x410]                                        ; +0x28, 0x4825b2\nADDS            R2, R5, #1                                             ; +0x2c, 0x4825b6\nBEQ             loc_48259A                                             ; +0x2e, 0x4825b8\nCMP             R5, R3                                                 ; +0x30, 0x4825ba\nBEQ             loc_48259A                                             ; +0x32, 0x4825bc\nMOVS            R0, #0                                                 ; +0x34, 0x4825be\nPOP             {R3-R7,PC}                                             ; +0x36, 0x4825c0\nLDRSH.W         R3, [R0,#0x40E]                                        ; +0x38, 0x4825c2\nB               loc_4825B6                                             ; +0x3c, 0x4825c6\nADDS            R3, R5, #1                                             ; +0x3e, 0x4825c8\nBEQ             loc_4825BE                                             ; +0x40, 0x4825ca\nMOV             R0, R5                                                 ; +0x42, 0x4825cc\nPOP             {R3-R7,PC}                                             ; +0x44, 0x4825ce", "xrefs": ["EditorUI::onGoToLayer @ 0x4843e4", "EditorUI::onGoToLayer @ 0x4843f2", "EditorUI::updateButtons @ 0x4861da", "EditorUI::updateButtons @ 0x4861ec"], "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"}