{"type": "func", "start": 5501260, "end": 5501356, "name": "BrowseSmartTemplateLayer::createPrefab", "pseudocode": "// \n// BrowseSmartTemplateLayer::createPrefab from 0x53f14c to 0x53f1ac (96 bytes)\n// \n// 2 xrefs:\n// > BrowseSmartTemplateLayer::onTemplateObject @ 0x53f960\n// > BrowseSmartKeyLayer::createTemplateObjects @ 0x53fa94\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\nint __fastcall BrowseSmartTemplateLayer::createPrefab(int a1, int a2, int a3)\n{\n  GameManager *v5; // r0\n  GJSmartTemplate *v6; // r7\n  EditorUI *m_editorUI; // r8\n  _DWORD v9[3]; // [sp+0h] [bp-Ch] BYREF\n\n  v9[0] = a1;\n  v9[1] = a2;\n  v9[2] = a3;\n  v5 = GameManager::sharedState();\n  v6 = *(GJSmartTemplate **)(a1 + 496);\n  m_editorUI = v5->m_levelEditorLayer->m_editorUI;\n  sub_775C20(v9);\n  EditorUI::createPrefab(m_editorUI, v6, (int)v9, a3);\n  return sub_774008(v9);\n}", "assembly": "; \n; BrowseSmartTemplateLayer::createPrefab from 0x53f14c to 0x53f1ac (96 bytes)\n; \n; 2 xrefs:\n; > BrowseSmartTemplateLayer::onTemplateObject @ 0x53f960\n; > BrowseSmartKeyLayer::createTemplateObjects @ 0x53fa94\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.W          {R0-R2,R4-R9,LR}                                       ; +0x0, 0x53f14c\nMOV             R5, R0                                                 ; +0x4, 0x53f150\nLDR             R4, =(__stack_chk_guard_ptr - 0x53F15C)                ; +0x6, 0x53f152\nMOV             R6, R2                                                 ; +0x8, 0x53f154\nMOV             R9, R1                                                 ; +0xa, 0x53f156\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xc, 0x53f158\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xe, 0x53f15a\nLDR             R3, [R4]                                               ; +0x10, 0x53f15c\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x12, 0x53f15e\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x53f160\nMOVW            R3, #0x2E94                                            ; +0x18, 0x53f164\nLDR.W           R7, [R5,#0x1F0]                                        ; +0x1c, 0x53f168\nMOV             R1, R9                                                 ; +0x20, 0x53f16c\nMOV             R5, SP                                                 ; +0x22, 0x53f16e\nLDR.W           R2, [R0,#0x170]                                        ; +0x24, 0x53f170\nMOV             R0, SP                                                 ; +0x28, 0x53f174\nLDR.W           R8, [R2,R3]                                            ; +0x2a, 0x53f176\nBL              sub_775C20                                             ; +0x2e, 0x53f17a\nMOV             R1, R7                                                 ; +0x32, 0x53f17e\nMOV             R2, SP                                                 ; +0x34, 0x53f180\nMOV             R3, R6                                                 ; +0x36, 0x53f182\nMOV             R0, R8                                                 ; +0x38, 0x53f184\nBL              _ZN8EditorUI12createPrefabEP15GJSmartTemplateSsi; EditorUI::createPrefab(GJSmartTemplate *,std::string,int) ; +0x3a, 0x53f186\nMOV             R0, SP                                                 ; +0x3e, 0x53f18a\nBL              sub_774008                                             ; +0x40, 0x53f18c\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x44, 0x53f190\nLDR             R3, [R4]                                               ; +0x46, 0x53f192\nCMP             R2, R3                                                 ; +0x48, 0x53f194\nBEQ             loc_53F1A6                                             ; +0x4a, 0x53f196\nBLX             __stack_chk_fail                                       ; +0x4c, 0x53f198\nMOV             R0, R5                                                 ; +0x50, 0x53f19c\nBL              sub_774008                                             ; +0x52, 0x53f19e\nBL              __cxa_end_cleanup                                      ; +0x56, 0x53f1a2\nADD             SP, SP, #0xC                                           ; +0x5a, 0x53f1a6\nPOP.W           {R4-R9,PC}                                             ; +0x5c, 0x53f1a8", "xrefs": ["BrowseSmartTemplateLayer::onTemplateObject @ 0x53f960", "BrowseSmartKeyLayer::createTemplateObjects @ 0x53fa94"], "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"}