{"type": "func", "start": 4299053096, "end": 4299053288, "name": "EditorUI::onGoToLayer", "pseudocode": "// \n// EditorUI::onGoToLayer from 0x1003e5828 to 0x1003e58e8 (192 bytes)\n// \n// 1 xrefs:\n// > EditorUI::init @ 0x1003c67fc\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\nvoid __fastcall EditorUI::onGoToLayer(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameObject *m_selectedObject; // x9\n  LevelEditorLayer *m_editorLayer; // x8\n  int m_currentLayer; // w21\n  int v6; // w20\n  int m_editorLayer2; // w0\n  bool v8; // zf\n  __int16 v9; // w9\n  int v10; // w10\n  EditorUI *v12; // x0\n  EditorUI *v13; // x0\n\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n  {\n    m_editorLayer = a1->m_editorLayer;\n    m_currentLayer = m_editorLayer->m_currentLayer;\n  }\n  else\n  {\n    v12 = (EditorUI *)sub_10024A36C((__int64)a1->m_selectedObjects);\n    if ( !(_DWORD)v12 )\n      return;\n    m_selectedObject = a1->m_selectedObject;\n    m_editorLayer = a1->m_editorLayer;\n    m_currentLayer = m_editorLayer->m_currentLayer;\n    if ( !m_selectedObject )\n    {\n      v13 = (EditorUI *)EditorUI::editorLayerForArray(v12, a1->m_selectedObjects, 0);\n      v6 = (int)v13;\n      m_editorLayer2 = EditorUI::editorLayerForArray(v13, a1->m_selectedObjects, 1);\n      m_editorLayer = a1->m_editorLayer;\n      goto LABEL_4;\n    }\n  }\n  v6 = m_selectedObject->m_editorLayer;\n  m_editorLayer2 = m_selectedObject->m_editorLayer2;\nLABEL_4:\n  if ( m_editorLayer2 )\n    v8 = v6 == 0;\n  else\n    v8 = 0;\n  if ( v8 )\n    v9 = m_editorLayer2;\n  else\n    v9 = v6;\n  if ( v6 )\n    v10 = m_editorLayer2;\n  else\n    v10 = 0;\n  if ( v10 != m_currentLayer && v10 != 0 )\n    v9 = v10;\n  m_editorLayer->m_currentLayer = v9;\n  EditorUI::updateGroupIDLabel(a1);\n}", "assembly": "; \n; EditorUI::onGoToLayer from 0x1003e5828 to 0x1003e58e8 (192 bytes)\n; \n; 1 xrefs:\n; > EditorUI::init @ 0x1003c67fc\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, 0x1003e5828\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003e582c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003e5830\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003e5834\nMOV             X19, X0                                                ; +0x10, 0x1003e5838\nLDR             X9, [X0,#0x520]                                        ; +0x14, 0x1003e583c\nCBZ             X9, loc_1003E5894                                      ; +0x18, 0x1003e5840\nLDR             X8, [X19,#0x4E8]                                       ; +0x1c, 0x1003e5844\nMOV             W10, #0x367A                                           ; +0x20, 0x1003e5848\nLDRSH           W21, [X8,X10]                                          ; +0x24, 0x1003e584c\nLDRSH           W20, [X9,#0x4B2]                                       ; +0x28, 0x1003e5850\nLDRSH           W0, [X9,#0x4B4]                                        ; +0x2c, 0x1003e5854\nCMP             W0, #0                                                 ; +0x30, 0x1003e5858\nCCMP            W20, #0, #0, NE                                        ; +0x34, 0x1003e585c\nCSEL            W9, W0, W20, EQ                                        ; +0x38, 0x1003e5860\nCMP             W20, #0                                                ; +0x3c, 0x1003e5864\nCSEL            W10, WZR, W0, EQ                                       ; +0x40, 0x1003e5868\nCMP             W10, W21                                               ; +0x44, 0x1003e586c\nCCMP            W10, #0, #4, NE                                        ; +0x48, 0x1003e5870\nCSEL            W9, W9, W10, EQ                                        ; +0x4c, 0x1003e5874\nMOV             W10, #0x367A                                           ; +0x50, 0x1003e5878\nSTRH            W9, [X8,X10]                                           ; +0x54, 0x1003e587c\nMOV             X0, X19                                                ; +0x58, 0x1003e5880\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x5c, 0x1003e5884\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x60, 0x1003e5888\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x64, 0x1003e588c\nB               EditorUI__updateGroupIDLabel                           ; +0x68, 0x1003e5890\nLDR             X0, [X19,#0x328]                                       ; +0x6c, 0x1003e5894\nBL              sub_10024A36C                                          ; +0x70, 0x1003e5898\nCBZ             W0, loc_1003E58D8                                      ; +0x74, 0x1003e589c\nLDR             X9, [X19,#0x520]                                       ; +0x78, 0x1003e58a0\nLDR             X8, [X19,#0x4E8]                                       ; +0x7c, 0x1003e58a4\nMOV             W10, #0x367A                                           ; +0x80, 0x1003e58a8\nLDRSH           W21, [X8,X10]                                          ; +0x84, 0x1003e58ac\nCBNZ            X9, loc_1003E5850                                      ; +0x88, 0x1003e58b0\nLDR             X1, [X19,#0x328]                                       ; +0x8c, 0x1003e58b4\nMOV             W2, #0                                                 ; +0x90, 0x1003e58b8\nBL              EditorUI__editorLayerForArray                          ; +0x94, 0x1003e58bc\nMOV             X20, X0                                                ; +0x98, 0x1003e58c0\nLDR             X1, [X19,#0x328]                                       ; +0x9c, 0x1003e58c4\nMOV             W2, #1                                                 ; +0xa0, 0x1003e58c8\nBL              EditorUI__editorLayerForArray                          ; +0xa4, 0x1003e58cc\nLDR             X8, [X19,#0x4E8]                                       ; +0xa8, 0x1003e58d0\nB               loc_1003E5858                                          ; +0xac, 0x1003e58d4\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xb0, 0x1003e58d8\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xb4, 0x1003e58dc\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xb8, 0x1003e58e0\nRET                                                                    ; +0xbc, 0x1003e58e4", "xrefs": ["EditorUI::init @ 0x1003c67fc"], "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"}