{"type": "func", "start": 3661230, "end": 3661300, "name": "EditorUI::editorLayerForArray", "pseudocode": "// \n// EditorUI::editorLayerForArray from 0x37ddae to 0x37ddf4 (70 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onGoToLayer @ 0x380cb0\n// > EditorUI::onGoToLayer @ 0x380cbe\n// > EditorUI::updateButtons @ 0x39ccc4\n// > EditorUI::updateButtons @ 0x39ccd6\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\nint EditorUI::editorLayerForArray(EditorUI *a1, cocos2d::CCArray *a2, bool a3)\n{\n  _BOOL4 v3; // r7\n  unsigned int v5; // r6\n  int v6; // r5\n  int v7; // r0\n  int v8; // r3\n\n  v3 = a3;\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 ( v3 )\n      v8 = *(__int16 *)(v7 + 1032);\n    else\n      v8 = *(__int16 *)(v7 + 1030);\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 0x37ddae to 0x37ddf4 (70 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onGoToLayer @ 0x380cb0\n; > EditorUI::onGoToLayer @ 0x380cbe\n; > EditorUI::updateButtons @ 0x39ccc4\n; > EditorUI::updateButtons @ 0x39ccd6\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            {R3-R7,LR}                                             ; +0x0, 0x37ddae\nMOV             R7, R2                                                 ; +0x2, 0x37ddb0\nMOV             R4, R1                                                 ; +0x4, 0x37ddb2\nCBZ             R1, loc_37DDE2                                         ; +0x6, 0x37ddb4\nMOVS            R6, #0                                                 ; +0x8, 0x37ddb6\nMOV.W           R5, #0xFFFFFFFF                                        ; +0xa, 0x37ddb8\nB               loc_37DDC2                                             ; +0xe, 0x37ddbc\nADDS            R6, #1                                                 ; +0x10, 0x37ddbe\nMOV             R5, R3                                                 ; +0x12, 0x37ddc0\nMOV             R0, R4; this                                           ; +0x14, 0x37ddc2\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x16, 0x37ddc4\nCMP             R6, R0                                                 ; +0x1a, 0x37ddc8\nBCS             loc_37DDEC                                             ; +0x1c, 0x37ddca\nMOV             R0, R4; this                                           ; +0x1e, 0x37ddcc\nMOV             R1, R6; unsigned int                                   ; +0x20, 0x37ddce\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x22, 0x37ddd0\nCBZ             R7, loc_37DDE6                                         ; +0x26, 0x37ddd4\nLDRSH.W         R3, [R0,#0x408]                                        ; +0x28, 0x37ddd6\nADDS            R2, R5, #1                                             ; +0x2c, 0x37ddda\nBEQ             loc_37DDBE                                             ; +0x2e, 0x37dddc\nCMP             R5, R3                                                 ; +0x30, 0x37ddde\nBEQ             loc_37DDBE                                             ; +0x32, 0x37dde0\nMOVS            R0, #0                                                 ; +0x34, 0x37dde2\nPOP             {R3-R7,PC}                                             ; +0x36, 0x37dde4\nLDRSH.W         R3, [R0,#0x406]                                        ; +0x38, 0x37dde6\nB               loc_37DDDA                                             ; +0x3c, 0x37ddea\nADDS            R3, R5, #1                                             ; +0x3e, 0x37ddec\nBEQ             loc_37DDE2                                             ; +0x40, 0x37ddee\nMOV             R0, R5                                                 ; +0x42, 0x37ddf0\nPOP             {R3-R7,PC}                                             ; +0x44, 0x37ddf2", "xrefs": ["EditorUI::onGoToLayer @ 0x380cb0", "EditorUI::onGoToLayer @ 0x380cbe", "EditorUI::updateButtons @ 0x39ccc4", "EditorUI::updateButtons @ 0x39ccd6"], "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"}