{"type": "func", "start": 4300099952, "end": 4300100092, "name": "BrowseSmartTemplateLayer::createPrefab", "pseudocode": "// \n// BrowseSmartTemplateLayer::createPrefab from 0x1004e5170 to 0x1004e51fc (140 bytes)\n// \n// 2 xrefs:\n// > BrowseSmartTemplateLayer::onTemplateObject @ 0x1004e4ce0\n// > BrowseSmartKeyLayer::createTemplateObjects @ 0x1004e63ea\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:31:19 +0000\n// \n\nvoid __fastcall BrowseSmartTemplateLayer::createPrefab(__int64 a1, std::string *a2, int a3)\n{\n  __int64 v4; // r14\n  __int64 v5; // r15\n  std::string v6[2]; // [rsp+0h] [rbp-40h] BYREF\n\n  v4 = *(_QWORD *)(*(_QWORD *)(GameManager::sharedState() + 552) + 14248LL);\n  v5 = *(_QWORD *)(a1 + 664);\n  if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )\n    sub_10001AD30(v6, a2->__r_.__value_.__l.__data_, a2->__r_.__value_.__l.__size_);\n  else\n    v6[0] = *a2;\n  EditorUI::createPrefab(v4, v5, v6, a3);\n  if ( (*(_BYTE *)&v6[0].__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(v6[0].__r_.__value_.__l.__data_);\n}", "assembly": "; \n; BrowseSmartTemplateLayer::createPrefab from 0x1004e5170 to 0x1004e51fc (140 bytes)\n; \n; 2 xrefs:\n; > BrowseSmartTemplateLayer::onTemplateObject @ 0x1004e4ce0\n; > BrowseSmartKeyLayer::createTemplateObjects @ 0x1004e63ea\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:31:19 +0000\n; \npush    rbp                                                            ; +0x0, 0x1004e5170\nmov     rbp, rsp                                                       ; +0x1, 0x1004e5171\npush    r15                                                            ; +0x4, 0x1004e5174\npush    r14                                                            ; +0x6, 0x1004e5176\npush    r12                                                            ; +0x8, 0x1004e5178\npush    rbx                                                            ; +0xa, 0x1004e517a\nsub     rsp, 20h                                                       ; +0xb, 0x1004e517b\nmov     ebx, edx                                                       ; +0xf, 0x1004e517f\nmov     r12, rsi                                                       ; +0x11, 0x1004e5181\nmov     r15, rdi                                                       ; +0x14, 0x1004e5184\ncall    GameManager__sharedState                                       ; +0x17, 0x1004e5187\nmov     rax, [rax+228h]                                                ; +0x1c, 0x1004e518c\nmov     r14, [rax+37A8h]                                               ; +0x23, 0x1004e5193\nmov     r15, [r15+298h]                                                ; +0x2a, 0x1004e519a\ntest    byte ptr [r12], 1                                              ; +0x31, 0x1004e51a1\njnz     short loc_1004E51BC                                            ; +0x36, 0x1004e51a6\nmov     rax, [r12+10h]                                                 ; +0x38, 0x1004e51a8\nmov     [rbp+__p], rax                                                 ; +0x3d, 0x1004e51ad\nmovups  xmm0, xmmword ptr [r12]                                        ; +0x41, 0x1004e51b1\nmovaps  [rbp+var_40], xmm0                                             ; +0x46, 0x1004e51b6\njmp     short loc_1004E51CF                                            ; +0x4a, 0x1004e51ba\nmov     rdx, [r12+8]                                                   ; +0x4c, 0x1004e51bc\nmov     rsi, [r12+10h]                                                 ; +0x51, 0x1004e51c1\nlea     rdi, [rbp+var_40]                                              ; +0x56, 0x1004e51c6\ncall    sub_10001AD30                                                  ; +0x5a, 0x1004e51ca\nlea     rdx, [rbp+var_40]                                              ; +0x5f, 0x1004e51cf\nmov     rdi, r14                                                       ; +0x63, 0x1004e51d3\nmov     rsi, r15                                                       ; +0x66, 0x1004e51d6\nmov     ecx, ebx                                                       ; +0x69, 0x1004e51d9\ncall    EditorUI__createPrefab                                         ; +0x6b, 0x1004e51db\ntest    byte ptr [rbp+var_40], 1                                       ; +0x70, 0x1004e51e0\njz      short loc_1004E51EF                                            ; +0x74, 0x1004e51e4\nmov     rdi, [rbp+__p]; __p                                            ; +0x76, 0x1004e51e6\ncall    __ZdlPv; operator delete(void *)                               ; +0x7a, 0x1004e51ea\nadd     rsp, 20h                                                       ; +0x7f, 0x1004e51ef\npop     rbx                                                            ; +0x83, 0x1004e51f3\npop     r12                                                            ; +0x84, 0x1004e51f4\npop     r14                                                            ; +0x86, 0x1004e51f6\npop     r15                                                            ; +0x88, 0x1004e51f8\npop     rbp                                                            ; +0x8a, 0x1004e51fa\nretn                                                                   ; +0x8b, 0x1004e51fb", "xrefs": ["BrowseSmartTemplateLayer::onTemplateObject @ 0x1004e4ce0", "BrowseSmartKeyLayer::createTemplateObjects @ 0x1004e63ea"], "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"}