{"type": "func", "start": 4299056732, "end": 4299056888, "name": "EditorUI::editorLayerForArray", "pseudocode": "// \n// EditorUI::editorLayerForArray from 0x1003e665c to 0x1003e66f8 (156 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onGoToLayer @ 0x1003e58bc\n// > EditorUI::onGoToLayer @ 0x1003e58cc\n// > EditorUI::updateButtons @ 0x1003e5d8c\n// > EditorUI::updateButtons @ 0x1003e5da0\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 __fastcall EditorUI::editorLayerForArray(EditorUI *a1, cocos2d::CCArray *a2, bool a3)\n{\n  _BOOL4 v3; // w21\n  unsigned int v5; // w20\n  __int64 v6; // x22\n  int v7; // w21\n  __int64 v8; // x0\n\n  if ( !a2 )\n    return 0;\n  v3 = a3;\n  if ( !(unsigned int)sub_10024A36C((__int64)a2) )\n    return 0;\n  v5 = 0;\n  v6 = v3 ? 1204LL : 1202LL;\n  v7 = -1;\n  do\n  {\n    v8 = sub_10024A388((__int64)a2, v5);\n    if ( v7 == -1 )\n    {\n      v7 = *(__int16 *)(v8 + v6);\n    }\n    else if ( v7 != *(__int16 *)(v8 + v6) )\n    {\n      return 0;\n    }\n    ++v5;\n  }\n  while ( v5 < (unsigned int)sub_10024A36C((__int64)a2) );\n  if ( v7 == -1 )\n    return 0;\n  return v7;\n}", "assembly": "; \n; EditorUI::editorLayerForArray from 0x1003e665c to 0x1003e66f8 (156 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onGoToLayer @ 0x1003e58bc\n; > EditorUI::onGoToLayer @ 0x1003e58cc\n; > EditorUI::updateButtons @ 0x1003e5d8c\n; > EditorUI::updateButtons @ 0x1003e5da0\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\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1003e665c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003e6660\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003e6664\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003e6668\nCBZ             X1, loc_1003E66E0                                      ; +0x10, 0x1003e666c\nMOV             X21, X2                                                ; +0x14, 0x1003e6670\nMOV             X19, X1                                                ; +0x18, 0x1003e6674\nMOV             X0, X1                                                 ; +0x1c, 0x1003e6678\nBL              sub_10024A36C                                          ; +0x20, 0x1003e667c\nCBZ             W0, loc_1003E66E0                                      ; +0x24, 0x1003e6680\nMOV             W20, #0                                                ; +0x28, 0x1003e6684\nCMP             W21, #0                                                ; +0x2c, 0x1003e6688\nMOV             W8, #0x4B2                                             ; +0x30, 0x1003e668c\nMOV             W9, #0x4B4                                             ; +0x34, 0x1003e6690\nCSEL            X22, X9, X8, NE                                        ; +0x38, 0x1003e6694\nMOV             W21, #0xFFFFFFFF                                       ; +0x3c, 0x1003e6698\nMOV             X0, X19                                                ; +0x40, 0x1003e669c\nMOV             X1, X20                                                ; +0x44, 0x1003e66a0\nBL              sub_10024A388                                          ; +0x48, 0x1003e66a4\nLDRSH           W8, [X0,X22]                                           ; +0x4c, 0x1003e66a8\nCMN             W21, #1                                                ; +0x50, 0x1003e66ac\nB.EQ            loc_1003E66C0                                          ; +0x54, 0x1003e66b0\nCMP             W21, W8                                                ; +0x58, 0x1003e66b4\nB.EQ            loc_1003E66C4                                          ; +0x5c, 0x1003e66b8\nB               loc_1003E66E0                                          ; +0x60, 0x1003e66bc\nMOV             X21, X8                                                ; +0x64, 0x1003e66c0\nADD             W20, W20, #1                                           ; +0x68, 0x1003e66c4\nMOV             X0, X19                                                ; +0x6c, 0x1003e66c8\nBL              sub_10024A36C                                          ; +0x70, 0x1003e66cc\nCMP             W20, W0                                                ; +0x74, 0x1003e66d0\nB.CC            loc_1003E669C                                          ; +0x78, 0x1003e66d4\nCMN             W21, #1                                                ; +0x7c, 0x1003e66d8\nB.NE            loc_1003E66E4                                          ; +0x80, 0x1003e66dc\nMOV             W21, #0                                                ; +0x84, 0x1003e66e0\nMOV             X0, X21                                                ; +0x88, 0x1003e66e4\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8c, 0x1003e66e8\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x90, 0x1003e66ec\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x94, 0x1003e66f0\nRET                                                                    ; +0x98, 0x1003e66f4", "xrefs": ["EditorUI::onGoToLayer @ 0x1003e58bc", "EditorUI::onGoToLayer @ 0x1003e58cc", "EditorUI::updateButtons @ 0x1003e5d8c", "EditorUI::updateButtons @ 0x1003e5da0"], "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"}