{"type": "func", "start": 3817492, "end": 3817660, "name": "EditorUI::onCreate", "pseudocode": "// \n// EditorUI::onCreate from 0x3a4014 to 0x3a40bc (168 bytes)\n// \n// 1 xrefs:\n// > EditorUI::clickOnPosition @ 0x3a4a72\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; // r3\n  LevelEditorLayer *m_editorLayer; // r2\n  int v4; // r1\n\n  m_selectedObjectIndex = a1->m_selectedObjectIndex;\n  if ( !m_selectedObjectIndex )\n    return 0;\n  m_editorLayer = a1->m_editorLayer;\n  v4 = m_editorLayer->m_objectCount.random - m_editorLayer->m_objectCount.seed;\n  if ( v4 <= 79999 )\n  {\n    if ( v4 <= 39999 )\n    {\nLABEL_11:\n      if ( m_selectedObjectIndex == 1329 && m_editorLayer->m_coinCount.random - m_editorLayer->m_coinCount.seed > 2 )\n      {\n        EditorUI::showMaxCoinError(a1);\n        return 1;\n      }\nLABEL_15:\n      if ( a1->m_selectedObject || 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    if ( m_selectedObjectIndex == 31 )\n      goto LABEL_15;\nLABEL_8:\n    if ( !m_editorLayer->m_level->m_highObjectsEnabled )\n    {\n      EditorUI::showMaxBasicError(a1);\n      return 1;\n    }\n    goto LABEL_11;\n  }\n  if ( m_selectedObjectIndex == 31 )\n    goto LABEL_15;\n  if ( m_editorLayer->m_level->m_unlimitedObjectsEnabled )\n    goto LABEL_8;\n  EditorUI::showMaxError(a1);\n  return 1;\n}", "assembly": "; \n; EditorUI::onCreate from 0x3a4014 to 0x3a40bc (168 bytes)\n; \n; 1 xrefs:\n; > EditorUI::clickOnPosition @ 0x3a4a72\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-R5,LR}                                             ; +0x0, 0x3a4014\nMOV             R4, R0                                                 ; +0x2, 0x3a4016\nLDR.W           R3, [R0,#0x32C]                                        ; +0x4, 0x3a4018\nCBZ             R3, loc_3A4064                                         ; +0x8, 0x3a401c\nLDR.W           R2, [R0,#0x340]                                        ; +0xa, 0x3a401e\nMOVW            R1, #0x2EA0                                            ; +0xe, 0x3a4022\nMOVW            R5, #0x2EA4                                            ; +0x12, 0x3a4026\nLDR             R5, [R2,R5]                                            ; +0x16, 0x3a402a\nLDR             R1, [R2,R1]                                            ; +0x18, 0x3a402c\nSUBS            R1, R1, R5                                             ; +0x1a, 0x3a402e\nLDR             R5, =0x1387F                                           ; +0x1c, 0x3a4030\nCMP             R1, R5                                                 ; +0x1e, 0x3a4032\nBLE             loc_3A4046                                             ; +0x20, 0x3a4034\nCMP             R3, #0x1F                                              ; +0x22, 0x3a4036\nBEQ             loc_3A4092                                             ; +0x24, 0x3a4038\nLDR.W           R1, [R2,#0x608]                                        ; +0x26, 0x3a403a\nLDRB.W          R1, [R1,#0x309]                                        ; +0x2a, 0x3a403e\nCBNZ            R1, loc_3A4052                                         ; +0x2e, 0x3a4042\nB               loc_3A4068                                             ; +0x30, 0x3a4044\nMOVW            R0, #0x9C3F                                            ; +0x32, 0x3a4046\nCMP             R1, R0                                                 ; +0x36, 0x3a404a\nBLE             loc_3A406E                                             ; +0x38, 0x3a404c\nCMP             R3, #0x1F                                              ; +0x3a, 0x3a404e\nBEQ             loc_3A4092                                             ; +0x3c, 0x3a4050\nLDR.W           R1, [R2,#0x608]                                        ; +0x3e, 0x3a4052\nLDRB.W          R1, [R1,#0x308]                                        ; +0x42, 0x3a4056\nCBNZ            R1, loc_3A406E                                         ; +0x46, 0x3a405a\nMOV             R0, R4; this                                           ; +0x48, 0x3a405c\nBL              _ZN8EditorUI17showMaxBasicErrorEv; EditorUI::showMaxBasicError(void) ; +0x4a, 0x3a405e\nB               loc_3A408E                                             ; +0x4e, 0x3a4062\nMOV             R0, R3; this                                           ; +0x50, 0x3a4064\nPOP             {R3-R5,PC}                                             ; +0x52, 0x3a4066\nBL              _ZN8EditorUI12showMaxErrorEv; EditorUI::showMaxError(void) ; +0x54, 0x3a4068\nB               loc_3A408E                                             ; +0x58, 0x3a406c\nMOVW            R1, #0x531                                             ; +0x5a, 0x3a406e\nCMP             R3, R1                                                 ; +0x5e, 0x3a4072\nBNE             loc_3A4092                                             ; +0x60, 0x3a4074\nMOVW            R3, #0x2E50                                            ; +0x62, 0x3a4076\nMOVW            R1, #0x2E54                                            ; +0x66, 0x3a407a\nLDR             R3, [R2,R3]                                            ; +0x6a, 0x3a407e\nLDR             R2, [R2,R1]                                            ; +0x6c, 0x3a4080\nSUBS            R3, R3, R2                                             ; +0x6e, 0x3a4082\nCMP             R3, #2                                                 ; +0x70, 0x3a4084\nBLE             loc_3A4092                                             ; +0x72, 0x3a4086\nMOV             R0, R4; this                                           ; +0x74, 0x3a4088\nBL              _ZN8EditorUI16showMaxCoinErrorEv; EditorUI::showMaxCoinError(void) ; +0x76, 0x3a408a\nMOVS            R0, #1                                                 ; +0x7a, 0x3a408e\nPOP             {R3-R5,PC}                                             ; +0x7c, 0x3a4090\nLDR.W           R3, [R4,#0x374]                                        ; +0x7e, 0x3a4092\nCBNZ            R3, loc_3A40A2                                         ; +0x82, 0x3a4096\nLDR.W           R0, [R4,#0x260]; this                                  ; +0x84, 0x3a4098\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x88, 0x3a409c\nCBZ             R0, loc_3A40AA                                         ; +0x8c, 0x3a40a0\nMOV             R0, R4; this                                           ; +0x8e, 0x3a40a2\nMOVS            R1, #1; bool                                           ; +0x90, 0x3a40a4\nBL              _ZN8EditorUI22createUndoSelectObjectEb; EditorUI::createUndoSelectObject(bool) ; +0x92, 0x3a40a6\nMOV             R0, R4; this                                           ; +0x96, 0x3a40aa\nLDR.W           R1, [R4,#0x32C]; int                                   ; +0x98, 0x3a40ac\nBL              _ZN8EditorUI14onCreateObjectEi; EditorUI::onCreateObject(int) ; +0x9c, 0x3a40b0\nMOV             R0, R4; this                                           ; +0xa0, 0x3a40b4\nBL              _ZN8EditorUI20tryUpdateTimeMarkersEv; EditorUI::tryUpdateTimeMarkers(void) ; +0xa2, 0x3a40b6\nB               loc_3A408E                                             ; +0xa6, 0x3a40ba", "xrefs": ["EditorUI::clickOnPosition @ 0x3a4a72"], "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"}