{"type": "func", "start": 7079104, "end": 7079388, "name": "EditorUI::onCreate", "pseudocode": "// \n// EditorUI::onCreate from 0x6c04c0 to 0x6c05dc (284 bytes)\n// \n// 2 xrefs:\n// > EditorUI::clickOnPosition @ 0x6c1768\n// > <???> @ 0xc5c28\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\nbool EditorUI::onCreate(EditorUI *a1)\n{\n  int m_selectedObjectIndex; // w1\n  char v3; // w19\n  LevelEditorLayer *m_editorLayer; // x3\n  int v5; // w2\n  bool v7; // w19\n\n  m_selectedObjectIndex = a1->m_selectedObjectIndex;\n  v3 = 0;\n  if ( !m_selectedObjectIndex )\n    return v3;\n  m_editorLayer = a1->m_editorLayer;\n  v5 = m_editorLayer->m_objectCount.random - m_editorLayer->m_objectCount.seed;\n  v3 = m_selectedObjectIndex != 31 && v5 > 79999;\n  if ( v3 && !m_editorLayer->m_level->m_unlimitedObjectsEnabled )\n  {\n    EditorUI::showMaxError(a1);\n    return v3;\n  }\n  v7 = m_selectedObjectIndex != 31 && v5 > 39999;\n  if ( !v7 || m_editorLayer->m_level->m_highObjectsEnabled )\n  {\n    if ( m_selectedObjectIndex == 1329 && m_editorLayer->m_coinCount.random - m_editorLayer->m_coinCount.seed > 2 )\n    {\n      v3 = 1;\n      EditorUI::showMaxCoinError(a1);\n      return v3;\n    }\n    if ( a1->m_selectedObject || (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) )\n      EditorUI::createUndoSelectObject(a1, 1);\n    EditorUI::onCreateObject(a1, a1->m_selectedObjectIndex);\n    EditorUI::tryUpdateTimeMarkers(a1);\n    return 1;\n  }\n  else\n  {\n    EditorUI::showMaxBasicError(a1);\n    return v7;\n  }\n}", "assembly": "; \n; EditorUI::onCreate from 0x6c04c0 to 0x6c05dc (284 bytes)\n; \n; 2 xrefs:\n; > EditorUI::clickOnPosition @ 0x6c1768\n; > <???> @ 0xc5c28\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             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x6c04c0\nMOV             X29, SP                                                ; +0x4, 0x6c04c4\nLDR             W1, [X0,#0x4D0]                                        ; +0x8, 0x6c04c8\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x6c04cc\nMOV             X20, X0                                                ; +0x10, 0x6c04d0\nMOV             W19, #0                                                ; +0x14, 0x6c04d4\nCBZ             W1, loc_6C051C                                         ; +0x18, 0x6c04d8\nLDR             X3, [X0,#0x4F8]                                        ; +0x1c, 0x6c04dc\nMOV             W19, #0x387F                                           ; +0x20, 0x6c04e0\nCMP             W1, #0x1F                                              ; +0x24, 0x6c04e4\nMOVK            W19, #1,LSL#16                                         ; +0x28, 0x6c04e8\nCSET            W4, NE                                                 ; +0x2c, 0x6c04ec\nLDR             W2, [X3,#0x3898]                                       ; +0x30, 0x6c04f0\nLDR             W5, [X3,#0x389C]                                       ; +0x34, 0x6c04f4\nSUB             W2, W2, W5                                             ; +0x38, 0x6c04f8\nCMP             W2, W19                                                ; +0x3c, 0x6c04fc\nCSET            W19, GT                                                ; +0x40, 0x6c0500\nANDS            W19, W4, W19                                           ; +0x44, 0x6c0504\nB.EQ            loc_6C052C                                             ; +0x48, 0x6c0508\nLDR             X5, [X3,#0x8A0]                                        ; +0x4c, 0x6c050c\nLDRB            W5, [X5,#0x381]                                        ; +0x50, 0x6c0510\nCBNZ            W5, loc_6C052C                                         ; +0x54, 0x6c0514\nBL              _ZN8EditorUI12showMaxErrorEv; EditorUI::showMaxError(void) ; +0x58, 0x6c0518\nMOV             W0, W19                                                ; +0x5c, 0x6c051c\nLDP             X19, X20, [SP,#var_s10]                                ; +0x60, 0x6c0520\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x64, 0x6c0524\nRET                                                                    ; +0x68, 0x6c0528\nMOV             W0, #0x9C3F                                            ; +0x6c, 0x6c052c\nCMP             W2, W0                                                 ; +0x70, 0x6c0530\nCSET            W19, GT                                                ; +0x74, 0x6c0534\nANDS            W19, W4, W19                                           ; +0x78, 0x6c0538\nB.EQ            loc_6C0564                                             ; +0x7c, 0x6c053c\nLDR             X0, [X3,#0x8A0]                                        ; +0x80, 0x6c0540\nLDRB            W0, [X0,#0x380]                                        ; +0x84, 0x6c0544\nCBNZ            W0, loc_6C0564                                         ; +0x88, 0x6c0548\nMOV             X0, X20; this                                          ; +0x8c, 0x6c054c\nBL              _ZN8EditorUI17showMaxBasicErrorEv; EditorUI::showMaxBasicError(void) ; +0x90, 0x6c0550\nMOV             W0, W19                                                ; +0x94, 0x6c0554\nLDP             X19, X20, [SP,#var_s10]                                ; +0x98, 0x6c0558\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x9c, 0x6c055c\nRET                                                                    ; +0xa0, 0x6c0560\nCMP             W1, #0x531                                             ; +0xa4, 0x6c0564\nB.EQ            loc_6C05A8                                             ; +0xa8, 0x6c0568\nLDR             X0, [X20,#0x530]                                       ; +0xac, 0x6c056c\nCBZ             X0, loc_6C05CC                                         ; +0xb0, 0x6c0570\nMOV             X0, X20; this                                          ; +0xb4, 0x6c0574\nMOV             W1, #1; bool                                           ; +0xb8, 0x6c0578\nBL              _ZN8EditorUI22createUndoSelectObjectEb; EditorUI::createUndoSelectObject(bool) ; +0xbc, 0x6c057c\nLDR             W1, [X20,#0x4D0]; int                                  ; +0xc0, 0x6c0580\nMOV             X0, X20; this                                          ; +0xc4, 0x6c0584\nMOV             W19, #1                                                ; +0xc8, 0x6c0588\nBL              _ZN8EditorUI14onCreateObjectEi; EditorUI::onCreateObject(int) ; +0xcc, 0x6c058c\nMOV             X0, X20; this                                          ; +0xd0, 0x6c0590\nBL              _ZN8EditorUI20tryUpdateTimeMarkersEv; EditorUI::tryUpdateTimeMarkers(void) ; +0xd4, 0x6c0594\nMOV             W0, W19                                                ; +0xd8, 0x6c0598\nLDP             X19, X20, [SP,#var_s10]                                ; +0xdc, 0x6c059c\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0xe0, 0x6c05a0\nRET                                                                    ; +0xe4, 0x6c05a4\nLDR             W0, [X3,#0x3824]                                       ; +0xe8, 0x6c05a8\nLDR             W1, [X3,#0x3828]                                       ; +0xec, 0x6c05ac\nSUB             W0, W0, W1                                             ; +0xf0, 0x6c05b0\nCMP             W0, #2                                                 ; +0xf4, 0x6c05b4\nB.LE            loc_6C056C                                             ; +0xf8, 0x6c05b8\nMOV             X0, X20; this                                          ; +0xfc, 0x6c05bc\nMOV             W19, #1                                                ; +0x100, 0x6c05c0\nBL              _ZN8EditorUI16showMaxCoinErrorEv; EditorUI::showMaxCoinError(void) ; +0x104, 0x6c05c4\nB               loc_6C051C                                             ; +0x108, 0x6c05c8\nLDR             X0, [X20,#0x338]; this                                 ; +0x10c, 0x6c05cc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x110, 0x6c05d0\nCBZ             W0, loc_6C0580                                         ; +0x114, 0x6c05d4\nB               loc_6C0574                                             ; +0x118, 0x6c05d8", "xrefs": ["EditorUI::clickOnPosition @ 0x6c1768", "<???> @ 0xc5c28"], "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"}