{"type": "func", "start": 4295020080, "end": 4295020407, "name": "EditorUI::onCreate", "pseudocode": "// \n// EditorUI::onCreate from 0x10000ce30 to 0x10000cf77 (327 bytes)\n// \n// 1 xrefs:\n// > EditorUI::clickOnPosition @ 0x10000c750\n// \n// This function is hookable on this platform (idp: pc, 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:18:50 +0000\n// \n\nbool __fastcall EditorUI::onCreate(__int64 a1)\n{\n  int v1; // r14d\n  unsigned int locked; // eax\n  __int64 v4; // rax\n  int v5; // edx\n  int v6; // ecx\n  __int64 SelectedObjects; // rax\n  __int64 v8; // rax\n  __int64 Object; // rax\n\n  v1 = *(_DWORD *)(a1 + 1344);\n  if ( !v1 )\n    return v1 != 0;\n  locked = LevelEditorLayer::lockedLayerForObject(\n             *(_QWORD *)(a1 + 1440),\n             (unsigned int)*(__int16 *)(*(_QWORD *)(a1 + 1440) + 14210LL),\n             0);\n  if ( locked != -1 )\n  {\n    EditorUI::showLockedLayerAlert(a1, locked);\n    return v1 != 0;\n  }\n  v4 = *(_QWORD *)(a1 + 1440);\n  v5 = *(_DWORD *)(v4 + 14272) - *(_DWORD *)(v4 + 14276);\n  if ( v5 < 80000 )\n  {\n    v6 = *(_DWORD *)(a1 + 1344);\n    if ( v5 < 40000 )\n      goto LABEL_12;\n    if ( v6 != 31 )\n    {\nLABEL_11:\n      if ( !*(_BYTE *)(*(_QWORD *)(v4 + 1936) + 1200LL) )\n      {\n        EditorUI::showMaxBasicError(a1);\n        return v1 != 0;\n      }\nLABEL_12:\n      if ( v6 == 1329 && *(_DWORD *)(v4 + 14156) - *(_DWORD *)(v4 + 14160) >= 3 )\n      {\n        EditorUI::showMaxCoinError(a1);\n        return v1 != 0;\n      }\n    }\n  }\n  else\n  {\n    v6 = *(_DWORD *)(a1 + 1344);\n    if ( v6 != 31 )\n    {\n      if ( !*(_BYTE *)(*(_QWORD *)(v4 + 1936) + 1201LL) )\n      {\n        EditorUI::showMaxError(a1);\n        return v1 != 0;\n      }\n      goto LABEL_11;\n    }\n  }\n  if ( *(_QWORD *)(a1 + 1496) || (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 896)) )\n  {\n    SelectedObjects = EditorUI::getSelectedObjects(a1);\n    v8 = UndoObject::createWithArray(SelectedObjects, 6);\n    *(_BYTE *)(v8 + 80) = 1;\n    LevelEditorLayer::addToUndoList(*(_QWORD *)(a1 + 1440), v8, 0);\n  }\n  Object = EditorUI::onCreateObject(a1, *(unsigned int *)(a1 + 1344));\n  if ( Object )\n    EditorUI::playSoundForCreatedObject(a1, Object);\n  return v1 != 0;\n}", "assembly": "; \n; EditorUI::onCreate from 0x10000ce30 to 0x10000cf77 (327 bytes)\n; \n; 1 xrefs:\n; > EditorUI::clickOnPosition @ 0x10000c750\n; \n; This function is hookable on this platform (idp: pc, 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:18:50 +0000\n; \npush    rbp                                                            ; +0x0, 0x10000ce30\nmov     rbp, rsp                                                       ; +0x1, 0x10000ce31\npush    r14                                                            ; +0x4, 0x10000ce34\npush    rbx                                                            ; +0x6, 0x10000ce36\nmov     r14d, [rdi+540h]                                               ; +0x7, 0x10000ce37\ntest    r14d, r14d                                                     ; +0xe, 0x10000ce3e\njz      short loc_10000CE6A                                            ; +0x11, 0x10000ce41\nmov     rbx, rdi                                                       ; +0x13, 0x10000ce43\nmov     rdi, [rdi+5A0h]                                                ; +0x16, 0x10000ce46\nmovsx   esi, word ptr [rdi+3782h]                                      ; +0x1d, 0x10000ce4d\nxor     edx, edx                                                       ; +0x24, 0x10000ce54\ncall    LevelEditorLayer__lockedLayerForObject                         ; +0x26, 0x10000ce56\ncmp     eax, 0FFFFFFFFh                                                ; +0x2b, 0x10000ce5b\njz      short loc_10000CE75                                            ; +0x2e, 0x10000ce5e\nmov     rdi, rbx                                                       ; +0x30, 0x10000ce60\nmov     esi, eax                                                       ; +0x33, 0x10000ce63\ncall    EditorUI__showLockedLayerAlert                                 ; +0x35, 0x10000ce65\ntest    r14d, r14d                                                     ; +0x3a, 0x10000ce6a\nsetnz   al                                                             ; +0x3d, 0x10000ce6d\npop     rbx                                                            ; +0x40, 0x10000ce70\npop     r14                                                            ; +0x41, 0x10000ce71\npop     rbp                                                            ; +0x43, 0x10000ce73\nretn                                                                   ; +0x44, 0x10000ce74\nmov     rax, [rbx+5A0h]                                                ; +0x45, 0x10000ce75\nmov     edx, [rax+37C0h]                                               ; +0x4c, 0x10000ce7c\nsub     edx, [rax+37C4h]                                               ; +0x52, 0x10000ce82\ncmp     edx, 13880h                                                    ; +0x58, 0x10000ce88\njl      short loc_10000CEB5                                            ; +0x5e, 0x10000ce8e\nmov     ecx, [rbx+540h]                                                ; +0x60, 0x10000ce90\ncmp     ecx, 1Fh                                                       ; +0x66, 0x10000ce96\njz      short loc_10000CF02                                            ; +0x69, 0x10000ce99\nmov     rdx, [rax+790h]                                                ; +0x6b, 0x10000ce9b\ncmp     byte ptr [rdx+4B1h], 0                                         ; +0x72, 0x10000cea2\njnz     short loc_10000CEC8                                            ; +0x79, 0x10000cea9\nmov     rdi, rbx                                                       ; +0x7b, 0x10000ceab\ncall    EditorUI__showMaxError                                         ; +0x7e, 0x10000ceae\njmp     short loc_10000CE6A                                            ; +0x83, 0x10000ceb3\nmov     ecx, [rbx+540h]                                                ; +0x85, 0x10000ceb5\ncmp     edx, 9C40h                                                     ; +0x8b, 0x10000cebb\njl      short loc_10000CEDC                                            ; +0x91, 0x10000cec1\ncmp     ecx, 1Fh                                                       ; +0x93, 0x10000cec3\njz      short loc_10000CF02                                            ; +0x96, 0x10000cec6\nmov     rdx, [rax+790h]                                                ; +0x98, 0x10000cec8\ncmp     byte ptr [rdx+4B0h], 0                                         ; +0x9f, 0x10000cecf\njz      loc_10000CF6A                                                  ; +0xa6, 0x10000ced6\ncmp     ecx, 531h                                                      ; +0xac, 0x10000cedc\njnz     short loc_10000CF02                                            ; +0xb2, 0x10000cee2\nmov     ecx, [rax+374Ch]                                               ; +0xb4, 0x10000cee4\nsub     ecx, [rax+3750h]                                               ; +0xba, 0x10000ceea\ncmp     ecx, 3                                                         ; +0xc0, 0x10000cef0\njl      short loc_10000CF02                                            ; +0xc3, 0x10000cef3\nmov     rdi, rbx                                                       ; +0xc5, 0x10000cef5\ncall    EditorUI__showMaxCoinError                                     ; +0xc8, 0x10000cef8\njmp     loc_10000CE6A                                                  ; +0xcd, 0x10000cefd\ncmp     qword ptr [rbx+5D8h], 0                                        ; +0xd2, 0x10000cf02\njnz     short loc_10000CF1C                                            ; +0xda, 0x10000cf0a\nmov     rdi, [rbx+380h]                                                ; +0xdc, 0x10000cf0c\ncall    sub_1007FEF90                                                  ; +0xe3, 0x10000cf13\ntest    eax, eax                                                       ; +0xe8, 0x10000cf18\njz      short loc_10000CF46                                            ; +0xea, 0x10000cf1a\nmov     rdi, rbx                                                       ; +0xec, 0x10000cf1c\ncall    EditorUI__getSelectedObjects                                   ; +0xef, 0x10000cf1f\nmov     rdi, rax                                                       ; +0xf4, 0x10000cf24\nmov     esi, 6                                                         ; +0xf7, 0x10000cf27\ncall    UndoObject__createWithArray                                    ; +0xfc, 0x10000cf2c\nmov     byte ptr [rax+50h], 1                                          ; +0x101, 0x10000cf31\nmov     rdi, [rbx+5A0h]                                                ; +0x105, 0x10000cf35\nmov     rsi, rax                                                       ; +0x10c, 0x10000cf3c\nxor     edx, edx                                                       ; +0x10f, 0x10000cf3f\ncall    LevelEditorLayer__addToUndoList                                ; +0x111, 0x10000cf41\nmov     esi, [rbx+540h]                                                ; +0x116, 0x10000cf46\nmov     rdi, rbx                                                       ; +0x11c, 0x10000cf4c\ncall    EditorUI__onCreateObject                                       ; +0x11f, 0x10000cf4f\ntest    rax, rax                                                       ; +0x124, 0x10000cf54\njz      loc_10000CE6A                                                  ; +0x127, 0x10000cf57\nmov     rsi, rax                                                       ; +0x12d, 0x10000cf5d\ncall    EditorUI__playSoundForCreatedObject                            ; +0x130, 0x10000cf60\njmp     loc_10000CE6A                                                  ; +0x135, 0x10000cf65\nmov     rdi, rbx                                                       ; +0x13a, 0x10000cf6a\ncall    EditorUI__showMaxBasicError                                    ; +0x13d, 0x10000cf6d\njmp     loc_10000CE6A                                                  ; +0x142, 0x10000cf72", "xrefs": ["EditorUI::clickOnPosition @ 0x10000c750"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}