{"type": "func", "start": 8169364, "end": 8169708, "name": "EditorUI::onCreate", "pseudocode": "// \n// EditorUI::onCreate from 0x7ca794 to 0x7ca8ec (344 bytes)\n// \n// 2 xrefs:\n// > EditorUI::clickOnPosition @ 0x7d1c44\n// > <???> @ 0x1015a8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:54:11 +0000\n// \n\n__int64 __fastcall EditorUI::onCreate(EditorUI *this)\n{\n  unsigned int v1; // w1\n  int locked; // w1\n  __int64 v5; // x1\n  int v6; // w0\n  bool v7; // cc\n  int v8; // w0\n  __int64 v9; // x2\n  float *Object; // x1\n\n  v1 = 0;\n  if ( !*((_DWORD *)this + 336) )\n    return v1;\n  locked = LevelEditorLayer::lockedLayerForObject(\n             *((LevelEditorLayer **)this + 180),\n             *(__int16 *)(*((_QWORD *)this + 180) + 14210LL),\n             0);\n  if ( locked == -1 )\n  {\n    v5 = *((_QWORD *)this + 180);\n    v6 = *(_DWORD *)(v5 + 14272) - *(_DWORD *)(v5 + 14276);\n    if ( v6 > 79999 )\n    {\n      v8 = *((_DWORD *)this + 336);\n      if ( v8 == 31 )\n        goto LABEL_10;\n      v9 = *(_QWORD *)(v5 + 1936);\n      if ( !*(_BYTE *)(v9 + 1201) )\n      {\n        EditorUI::showMaxError(this);\n        return 1;\n      }\n    }\n    else\n    {\n      v7 = v6 <= 39999;\n      v8 = *((_DWORD *)this + 336);\n      if ( v7 )\n      {\nLABEL_9:\n        if ( v8 == 1329 && *(_DWORD *)(v5 + 14156) - *(_DWORD *)(v5 + 14160) > 2 )\n        {\n          EditorUI::showMaxCoinError(this);\n          return 1;\n        }\nLABEL_10:\n        if ( *((_QWORD *)this + 187) || (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)) )\n          EditorUI::createUndoSelectObject((cocos2d::CCArray ***)this, 1);\n        Object = EditorUI::onCreateObject(this, *((_DWORD *)this + 336));\n        if ( Object )\n        {\n          EditorUI::playSoundForCreatedObject(this, (GameObject *)Object);\n          return 1;\n        }\n        return 1;\n      }\n      if ( v8 == 31 )\n        goto LABEL_10;\n      v9 = *(_QWORD *)(v5 + 1936);\n    }\n    if ( !*(_BYTE *)(v9 + 1200) )\n    {\n      EditorUI::showMaxBasicError(this);\n      return 1;\n    }\n    goto LABEL_9;\n  }\n  EditorUI::showLockedLayerAlert(this, locked);\n  return 1;\n}", "assembly": "; \n; EditorUI::onCreate from 0x7ca794 to 0x7ca8ec (344 bytes)\n; \n; 2 xrefs:\n; > EditorUI::clickOnPosition @ 0x7d1c44\n; > <???> @ 0x1015a8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:54:11 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0x7ca794\nMOV             W1, #0                                                 ; +0x4, 0x7ca798\nMOV             X29, SP                                                ; +0x8, 0x7ca79c\nSTR             X19, [SP,#0x20+var_10]                                 ; +0xc, 0x7ca7a0\nLDR             W2, [X0,#0x540]                                        ; +0x10, 0x7ca7a4\nCBNZ            W2, loc_7CA7BC                                         ; +0x14, 0x7ca7a8\nMOV             W0, W1                                                 ; +0x18, 0x7ca7ac\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x1c, 0x7ca7b0\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x20, 0x7ca7b4\nRET                                                                    ; +0x24, 0x7ca7b8\nMOV             X19, X0                                                ; +0x28, 0x7ca7bc\nLDR             X0, [X0,#0x5A0]; this                                  ; +0x2c, 0x7ca7c0\nMOV             W2, #0; int                                            ; +0x30, 0x7ca7c4\nADD             X1, X0, #3,LSL#12                                      ; +0x34, 0x7ca7c8\nLDRSH           W1, [X1,#0x782]; int                                   ; +0x38, 0x7ca7cc\nBL              _ZN16LevelEditorLayer20lockedLayerForObjectEii; LevelEditorLayer::lockedLayerForObject(int,int) ; +0x3c, 0x7ca7d0\nCMN             W0, #1                                                 ; +0x40, 0x7ca7d4\nMOV             W1, W0; int                                            ; +0x44, 0x7ca7d8\nB.NE            loc_7CA88C                                             ; +0x48, 0x7ca7dc\nLDR             X1, [X19,#0x5A0]                                       ; +0x4c, 0x7ca7e0\nMOV             W2, #0x1387F                                           ; +0x50, 0x7ca7e4\nLDR             W0, [X1,#0x37C0]                                       ; +0x58, 0x7ca7ec\nLDR             W3, [X1,#0x37C4]                                       ; +0x5c, 0x7ca7f0\nSUB             W0, W0, W3                                             ; +0x60, 0x7ca7f4\nCMP             W0, W2                                                 ; +0x64, 0x7ca7f8\nB.GT            loc_7CA864                                             ; +0x68, 0x7ca7fc\nMOV             W2, #0x9C3F                                            ; +0x6c, 0x7ca800\nCMP             W0, W2                                                 ; +0x70, 0x7ca804\nLDR             W0, [X19,#0x540]                                       ; +0x74, 0x7ca808\nB.LE            loc_7CA824                                             ; +0x78, 0x7ca80c\nCMP             W0, #0x1F                                              ; +0x7c, 0x7ca810\nB.EQ            loc_7CA82C                                             ; +0x80, 0x7ca814\nLDR             X2, [X1,#0x790]                                        ; +0x84, 0x7ca818\nLDRB            W2, [X2,#0x4B0]                                        ; +0x88, 0x7ca81c\nCBZ             W2, loc_7CA8A8                                         ; +0x8c, 0x7ca820\nCMP             W0, #0x531                                             ; +0x90, 0x7ca824\nB.EQ            loc_7CA8B8                                             ; +0x94, 0x7ca828\nLDR             X0, [X19,#0x5D8]                                       ; +0x98, 0x7ca82c\nCBZ             X0, loc_7CA8DC                                         ; +0x9c, 0x7ca830\nMOV             X0, X19; this                                          ; +0xa0, 0x7ca834\nMOV             W1, #1; bool                                           ; +0xa4, 0x7ca838\nBL              _ZN8EditorUI22createUndoSelectObjectEb; EditorUI::createUndoSelectObject(bool) ; +0xa8, 0x7ca83c\nLDR             W1, [X19,#0x540]; int                                  ; +0xac, 0x7ca840\nMOV             X0, X19; this                                          ; +0xb0, 0x7ca844\nBL              _ZN8EditorUI14onCreateObjectEi; EditorUI::onCreateObject(int) ; +0xb4, 0x7ca848\nMOV             X1, X0; GameObject *                                   ; +0xb8, 0x7ca84c\nCBZ             X0, loc_7CA8B0                                         ; +0xbc, 0x7ca850\nMOV             X0, X19; this                                          ; +0xc0, 0x7ca854\nBL              _ZN8EditorUI25playSoundForCreatedObjectEP10GameObject; EditorUI::playSoundForCreatedObject(GameObject *) ; +0xc4, 0x7ca858\nMOV             W1, #1                                                 ; +0xc8, 0x7ca85c\nB               loc_7CA7AC                                             ; +0xcc, 0x7ca860\nLDR             W0, [X19,#0x540]                                       ; +0xd0, 0x7ca864\nCMP             W0, #0x1F                                              ; +0xd4, 0x7ca868\nB.EQ            loc_7CA82C                                             ; +0xd8, 0x7ca86c\nLDR             X2, [X1,#0x790]                                        ; +0xdc, 0x7ca870\nLDRB            W3, [X2,#0x4B1]                                        ; +0xe0, 0x7ca874\nCBNZ            W3, loc_7CA81C                                         ; +0xe4, 0x7ca878\nMOV             X0, X19; this                                          ; +0xe8, 0x7ca87c\nBL              _ZN8EditorUI12showMaxErrorEv; EditorUI::showMaxError(void) ; +0xec, 0x7ca880\nMOV             W1, #1                                                 ; +0xf0, 0x7ca884\nB               loc_7CA7AC                                             ; +0xf4, 0x7ca888\nMOV             X0, X19; this                                          ; +0xf8, 0x7ca88c\nBL              _ZN8EditorUI20showLockedLayerAlertEi; EditorUI::showLockedLayerAlert(int) ; +0xfc, 0x7ca890\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x100, 0x7ca894\nMOV             W1, #1                                                 ; +0x104, 0x7ca898\nMOV             W0, W1                                                 ; +0x108, 0x7ca89c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x10c, 0x7ca8a0\nRET                                                                    ; +0x110, 0x7ca8a4\nMOV             X0, X19; this                                          ; +0x114, 0x7ca8a8\nBL              _ZN8EditorUI17showMaxBasicErrorEv; EditorUI::showMaxBasicError(void) ; +0x118, 0x7ca8ac\nMOV             W1, #1                                                 ; +0x11c, 0x7ca8b0\nB               loc_7CA7AC                                             ; +0x120, 0x7ca8b4\nLDR             W0, [X1,#0x374C]                                       ; +0x124, 0x7ca8b8\nLDR             W1, [X1,#0x3750]                                       ; +0x128, 0x7ca8bc\nSUB             W0, W0, W1                                             ; +0x12c, 0x7ca8c0\nCMP             W0, #2                                                 ; +0x130, 0x7ca8c4\nB.LE            loc_7CA82C                                             ; +0x134, 0x7ca8c8\nMOV             X0, X19; this                                          ; +0x138, 0x7ca8cc\nBL              _ZN8EditorUI16showMaxCoinErrorEv; EditorUI::showMaxCoinError(void) ; +0x13c, 0x7ca8d0\nMOV             W1, #1                                                 ; +0x140, 0x7ca8d4\nB               loc_7CA7AC                                             ; +0x144, 0x7ca8d8\nLDR             X0, [X19,#0x380]; this                                 ; +0x148, 0x7ca8dc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x14c, 0x7ca8e0\nCBZ             W0, loc_7CA840                                         ; +0x150, 0x7ca8e4\nB               loc_7CA834                                             ; +0x154, 0x7ca8e8", "xrefs": ["EditorUI::clickOnPosition @ 0x7d1c44", "<???> @ 0x1015a8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}