{"type": "func", "start": 3673212, "end": 3673320, "name": "EditorUI::onGoToLayer", "pseudocode": "// \n// EditorUI::onGoToLayer from 0x380c7c to 0x380ce8 (108 bytes)\n// \n// 0 xrefs:\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 EditorUI::onGoToLayer(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  __int16 m_currentLayer; // r6\n  GameObject *m_selectedObject; // r2\n  int m_editorLayer; // r5\n  int m_editorLayer2; // r0\n\n  if ( a1->m_selectedObject || cocos2d::CCArray::count(a1->m_selectedObjects) )\n  {\n    m_currentLayer = a1->m_editorLayer->m_currentLayer;\n    m_selectedObject = a1->m_selectedObject;\n    if ( m_selectedObject )\n    {\n      m_editorLayer = m_selectedObject->m_editorLayer;\n      m_editorLayer2 = m_selectedObject->m_editorLayer2;\n    }\n    else\n    {\n      m_editorLayer = EditorUI::editorLayerForArray(a1, a1->m_selectedObjects, 0);\n      m_editorLayer2 = EditorUI::editorLayerForArray(a1, a1->m_selectedObjects, 1);\n    }\n    if ( m_editorLayer )\n    {\n      if ( m_editorLayer2 )\n      {\n        if ( m_currentLayer != m_editorLayer2 )\n          LOWORD(m_editorLayer) = m_editorLayer2;\n      }\n    }\n    else\n    {\n      LOWORD(m_editorLayer) = m_editorLayer2;\n    }\n    a1->m_editorLayer->m_currentLayer = m_editorLayer;\n    EditorUI::updateGroupIDLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::onGoToLayer from 0x380c7c to 0x380ce8 (108 bytes)\n; \n; 0 xrefs:\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\nLDR.W           R3, [R0,#0x374]                                        ; +0x0, 0x380c7c\nPUSH            {R4-R6,LR}                                             ; +0x4, 0x380c80\nMOV             R4, R0                                                 ; +0x6, 0x380c82\nCBNZ            R3, loc_380C90                                         ; +0x8, 0x380c84\nLDR.W           R0, [R0,#0x260]; this                                  ; +0xa, 0x380c86\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xe, 0x380c8a\nCBZ             R0, locret_380CE6                                      ; +0x12, 0x380c8e\nLDR.W           R2, [R4,#0x340]                                        ; +0x14, 0x380c90\nMOVW            R3, #0x2E76                                            ; +0x18, 0x380c94\nLDRH            R6, [R2,R3]                                            ; +0x1c, 0x380c98\nLDR.W           R2, [R4,#0x374]; bool                                  ; +0x1e, 0x380c9a\nCBZ             R2, loc_380CAA                                         ; +0x22, 0x380c9e\nLDRSH.W         R5, [R2,#0x406]                                        ; +0x24, 0x380ca0\nLDRSH.W         R0, [R2,#0x408]                                        ; +0x28, 0x380ca4\nB               loc_380CC2                                             ; +0x2c, 0x380ca8\nLDR.W           R1, [R4,#0x260]; cocos2d::CCArray *                    ; +0x2e, 0x380caa\nMOV             R0, R4; this                                           ; +0x32, 0x380cae\nBL              _ZN8EditorUI19editorLayerForArrayEPN7cocos2d7CCArrayEb; EditorUI::editorLayerForArray(cocos2d::CCArray *,bool) ; +0x34, 0x380cb0\nLDR.W           R1, [R4,#0x260]; cocos2d::CCArray *                    ; +0x38, 0x380cb4\nMOVS            R2, #1; bool                                           ; +0x3c, 0x380cb8\nMOV             R5, R0                                                 ; +0x3e, 0x380cba\nMOV             R0, R4; this                                           ; +0x40, 0x380cbc\nBL              _ZN8EditorUI19editorLayerForArrayEPN7cocos2d7CCArrayEb; EditorUI::editorLayerForArray(cocos2d::CCArray *,bool) ; +0x42, 0x380cbe\nCBZ             R5, loc_380CD0                                         ; +0x46, 0x380cc2\nCBZ             R0, loc_380CD2                                         ; +0x48, 0x380cc4\nSXTH            R6, R6                                                 ; +0x4a, 0x380cc6\nCMP             R6, R0                                                 ; +0x4c, 0x380cc8\nIT NE                                                                  ; +0x4e, 0x380cca\nMOVNE           R5, R0                                                 ; +0x50, 0x380ccc\nB               loc_380CD2                                             ; +0x52, 0x380cce\nMOV             R5, R0                                                 ; +0x54, 0x380cd0\nLDR.W           R2, [R4,#0x340]                                        ; +0x56, 0x380cd2\nMOVW            R3, #0x2E76                                            ; +0x5a, 0x380cd6\nMOV             R0, R4; this                                           ; +0x5e, 0x380cda\nSTRH            R5, [R2,R3]                                            ; +0x60, 0x380cdc\nPOP.W           {R4-R6,LR}                                             ; +0x62, 0x380cde\nB.W             _ZN8EditorUI18updateGroupIDLabelEv; EditorUI::updateGroupIDLabel(void) ; +0x66, 0x380ce2\nPOP             {R4-R6,PC}                                             ; +0x6a, 0x380ce6", "xrefs": [], "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"}