{"type": "func", "start": 4295436108, "end": 4295436252, "name": "BrowseSmartTemplateLayer::createPrefab", "pseudocode": "// \n// BrowseSmartTemplateLayer::createPrefab from 0x10007274c to 0x1000727dc (144 bytes)\n// \n// 2 xrefs:\n// > BrowseSmartTemplateLayer::onTemplateObject @ 0x1000722d0\n// > BrowseSmartKeyLayer::createTemplateObjects @ 0x1000734e4\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 __fastcall BrowseSmartTemplateLayer::createPrefab(__int64 a1, __int64 a2, __int64 a3)\n{\n  EditorUI *m_editorUI; // x20\n  __int64 v7; // x21\n  void *__p[2]; // [xsp+0h] [xbp-40h] BYREF\n  __int64 v9; // [xsp+10h] [xbp-30h]\n\n  m_editorUI = GameManager::sharedState()->m_levelEditorLayer->m_editorUI;\n  v7 = *(_QWORD *)(a1 + 632);\n  if ( *(char *)(a2 + 23) < 0 )\n  {\n    sub_1000097D0(__p, *(void **)a2, *(_QWORD *)(a2 + 8));\n  }\n  else\n  {\n    *(_OWORD *)__p = *(_OWORD *)a2;\n    v9 = *(_QWORD *)(a2 + 16);\n  }\n  EditorUI::createPrefab(m_editorUI, v7, __p, a3);\n  if ( SHIBYTE(v9) < 0 )\n    operator delete(__p[0]);\n}", "assembly": "; \n; BrowseSmartTemplateLayer::createPrefab from 0x10007274c to 0x1000727dc (144 bytes)\n; \n; 2 xrefs:\n; > BrowseSmartTemplateLayer::onTemplateObject @ 0x1000722d0\n; > BrowseSmartKeyLayer::createTemplateObjects @ 0x1000734e4\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x10007274c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x100072750\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x100072754\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x100072758\nADD             X29, SP, #0x40                                         ; +0x10, 0x10007275c\nMOV             X19, X2                                                ; +0x14, 0x100072760\nMOV             X22, X1                                                ; +0x18, 0x100072764\nMOV             X21, X0                                                ; +0x1c, 0x100072768\nBL              GameManager__sharedState                               ; +0x20, 0x10007276c\nLDR             X8, [X0,#0x200]                                        ; +0x24, 0x100072770\nLDR             X20, [X8,#0x36A0]                                      ; +0x28, 0x100072774\nLDR             X21, [X21,#0x278]                                      ; +0x2c, 0x100072778\nLDRSB           W8, [X22,#0x17]                                        ; +0x30, 0x10007277c\nTBNZ            W8, #0x1F, loc_100072798                               ; +0x34, 0x100072780\nLDR             Q0, [X22]                                              ; +0x38, 0x100072784\nSTR             Q0, [SP,#0x40+__p]                                     ; +0x3c, 0x100072788\nLDR             X8, [X22,#0x10]                                        ; +0x40, 0x10007278c\nSTR             X8, [SP,#0x40+var_30]                                  ; +0x44, 0x100072790\nB               loc_1000727A4                                          ; +0x48, 0x100072794\nLDP             X1, X2, [X22]; __src                                   ; +0x4c, 0x100072798\nMOV             X0, SP; __dst                                          ; +0x50, 0x10007279c\nBL              sub_1000097D0                                          ; +0x54, 0x1000727a0\nMOV             X2, SP                                                 ; +0x58, 0x1000727a4\nMOV             X0, X20                                                ; +0x5c, 0x1000727a8\nMOV             X1, X21                                                ; +0x60, 0x1000727ac\nMOV             X3, X19                                                ; +0x64, 0x1000727b0\nBL              EditorUI__createPrefab                                 ; +0x68, 0x1000727b4\nLDRSB           W8, [SP,#0x40+var_30+7]                                ; +0x6c, 0x1000727b8\nTBZ             W8, #0x1F, loc_1000727C8                               ; +0x70, 0x1000727bc\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x74, 0x1000727c0\nBL              __ZdlPv; operator delete(void *)                       ; +0x78, 0x1000727c4\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x7c, 0x1000727c8\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x80, 0x1000727cc\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x84, 0x1000727d0\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x88, 0x1000727d4\nRET                                                                    ; +0x8c, 0x1000727d8", "xrefs": ["BrowseSmartTemplateLayer::onTemplateObject @ 0x1000722d0", "BrowseSmartKeyLayer::createTemplateObjects @ 0x1000734e4"], "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"}