{"type": "func", "start": 4295439436, "end": 4295439768, "name": "BrowseSmartKeyLayer::createTemplateObjects", "pseudocode": "// \n// BrowseSmartKeyLayer::createTemplateObjects from 0x10007344c to 0x100073598 (332 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x100073430\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 BrowseSmartKeyLayer::createTemplateObjects(BrowseSmartKeyLayer *a1)\n{\n  cocos2d::CCArray *AllSelectedBlocks; // x20\n  __int64 v3; // x21\n  __int64 v4; // x22\n  __int64 v5; // x0\n  __int64 v6; // x0\n  void *v7[2]; // [xsp+0h] [xbp-80h] BYREF\n  char v8; // [xsp+17h] [xbp-69h]\n  void *v9[2]; // [xsp+18h] [xbp-68h] BYREF\n  char v10; // [xsp+2Fh] [xbp-51h]\n  void *__p[2]; // [xsp+30h] [xbp-50h] BYREF\n  char *longStorage; // [xsp+40h] [xbp-40h]\n\n  AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(a1);\n  if ( (unsigned int)sub_10024A36C(AllSelectedBlocks) )\n  {\n    if ( (unsigned int)sub_10024A36C(AllSelectedBlocks) )\n    {\n      v3 = 0;\n      do\n      {\n        v4 = sub_10024A388(AllSelectedBlocks, v3);\n        if ( a1->m_prefabKey.m_data.m_short.shortStorage.__elems_[22] < 0 )\n        {\n          sub_1000097D0(__p, (void *)a1->m_prefabKey.m_data.m_long.capacitym1, a1->m_prefabKey.m_data.m_long.size);\n        }\n        else\n        {\n          *(_OWORD *)__p = *(_OWORD *)&a1->m_prefabKey.m_data.m_short.sizex2;\n          longStorage = a1->m_prefabKey.m_data.m_long.longStorage;\n        }\n        v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4);\n        BrowseSmartTemplateLayer::createPrefab((__int64)a1, (__int64)__p, v5);\n        if ( SHIBYTE(longStorage) < 0 )\n          operator delete(__p[0]);\n        v3 = (unsigned int)(v3 + 1);\n      }\n      while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(AllSelectedBlocks) );\n    }\n    sub_100009900(v9, \"Added to editor\");\n    sub_100009900(v7, \"\");\n    v6 = TextAlertPopup::create(v9, 150, v7, 0.5, 0.6);\n    ((void (__fastcall *)(BrowseSmartKeyLayer *, __int64, __int64))a1->addChild_0)(a1, v6, 100);\n    if ( v8 < 0 )\n      operator delete(v7[0]);\n    if ( v10 < 0 )\n      operator delete(v9[0]);\n  }\n}", "assembly": "; \n; BrowseSmartKeyLayer::createTemplateObjects from 0x10007344c to 0x100073598 (332 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x100073430\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, #0x90                                          ; +0x0, 0x10007344c\nSTP             X24, X23, [SP,#0x80+var_30]                            ; +0x4, 0x100073450\nSTP             X22, X21, [SP,#0x80+var_20]                            ; +0x8, 0x100073454\nSTP             X20, X19, [SP,#0x80+var_10]                            ; +0xc, 0x100073458\nSTP             X29, X30, [SP,#0x80+var_s0]                            ; +0x10, 0x10007345c\nADD             X29, SP, #0x80                                         ; +0x14, 0x100073460\nMOV             X19, X0                                                ; +0x18, 0x100073464\nBL              BrowseSmartKeyLayer__getAllSelectedBlocks              ; +0x1c, 0x100073468\nMOV             X20, X0                                                ; +0x20, 0x10007346c\nBL              sub_10024A36C                                          ; +0x24, 0x100073470\nCBZ             W0, loc_100073580                                      ; +0x28, 0x100073474\nMOV             X0, X20                                                ; +0x2c, 0x100073478\nBL              sub_10024A36C                                          ; +0x30, 0x10007347c\nCBZ             W0, loc_10007350C                                      ; +0x34, 0x100073480\nMOV             W21, #0                                                ; +0x38, 0x100073484\nADD             X23, X19, #0x2A8                                       ; +0x3c, 0x100073488\nMOV             X0, X20                                                ; +0x40, 0x10007348c\nMOV             X1, X21                                                ; +0x44, 0x100073490\nBL              sub_10024A388                                          ; +0x48, 0x100073494\nMOV             X22, X0                                                ; +0x4c, 0x100073498\nLDRSB           W8, [X19,#0x2BF]                                       ; +0x50, 0x10007349c\nTBNZ            W8, #0x1F, loc_1000734B8                               ; +0x54, 0x1000734a0\nLDR             Q0, [X23]                                              ; +0x58, 0x1000734a4\nSTR             Q0, [SP,#0x80+__p]                                     ; +0x5c, 0x1000734a8\nLDR             X8, [X23,#0x10]                                        ; +0x60, 0x1000734ac\nSTR             X8, [SP,#0x80+var_40]                                  ; +0x64, 0x1000734b0\nB               loc_1000734C8                                          ; +0x68, 0x1000734b4\nLDR             X1, [X19,#0x2A8]; __src                                ; +0x6c, 0x1000734b8\nLDR             X2, [X19,#0x2B0]                                       ; +0x70, 0x1000734bc\nADD             X0, SP, #0x80+__p; __dst                               ; +0x74, 0x1000734c0\nBL              sub_1000097D0                                          ; +0x78, 0x1000734c4\nLDR             X8, [X22]                                              ; +0x7c, 0x1000734c8\nLDR             X8, [X8,#0x40]                                         ; +0x80, 0x1000734cc\nMOV             X0, X22                                                ; +0x84, 0x1000734d0\nBLR             X8                                                     ; +0x88, 0x1000734d4\nMOV             X2, X0                                                 ; +0x8c, 0x1000734d8\nADD             X1, SP, #0x80+__p                                      ; +0x90, 0x1000734dc\nMOV             X0, X19                                                ; +0x94, 0x1000734e0\nBL              BrowseSmartTemplateLayer__createPrefab                 ; +0x98, 0x1000734e4\nLDRSB           W8, [SP,#0x80+var_40+7]                                ; +0x9c, 0x1000734e8\nTBZ             W8, #0x1F, loc_1000734F8                               ; +0xa0, 0x1000734ec\nLDR             X0, [SP,#0x80+__p]; __p                                ; +0xa4, 0x1000734f0\nBL              __ZdlPv; operator delete(void *)                       ; +0xa8, 0x1000734f4\nADD             W21, W21, #1                                           ; +0xac, 0x1000734f8\nMOV             X0, X20                                                ; +0xb0, 0x1000734fc\nBL              sub_10024A36C                                          ; +0xb4, 0x100073500\nCMP             W21, W0                                                ; +0xb8, 0x100073504\nB.CC            loc_10007348C                                          ; +0xbc, 0x100073508\nADRL            X1, aAddedToEditor; \"Added to editor\"                  ; +0xc0, 0x10007350c\nADD             X0, SP, #0x80+var_68; int                              ; +0xc8, 0x100073514\nBL              sub_100009900                                          ; +0xcc, 0x100073518\nADRL            X1, asc_100746688; \"\"                                  ; +0xd0, 0x10007351c\nMOV             X0, SP; int                                            ; +0xd8, 0x100073524\nBL              sub_100009900                                          ; +0xdc, 0x100073528\nADRP            X8, #dword_10063533C@PAGE                              ; +0xe0, 0x10007352c\nLDR             S1, [X8,#dword_10063533C@PAGEOFF]                      ; +0xe4, 0x100073530\nADD             X0, SP, #0x80+var_68                                   ; +0xe8, 0x100073534\nFMOV            S0, #0.5                                               ; +0xec, 0x100073538\nMOV             X2, SP                                                 ; +0xf0, 0x10007353c\nMOV             W1, #0x96                                              ; +0xf4, 0x100073540\nBL              TextAlertPopup__create                                 ; +0xf8, 0x100073544\nMOV             X1, X0                                                 ; +0xfc, 0x100073548\nLDR             X8, [X19]                                              ; +0x100, 0x10007354c\nLDR             X8, [X8,#0x1C0]                                        ; +0x104, 0x100073550\nMOV             X0, X19                                                ; +0x108, 0x100073554\nMOV             W2, #0x64 ; 'd'                                        ; +0x10c, 0x100073558\nBLR             X8                                                     ; +0x110, 0x10007355c\nLDRSB           W8, [SP,#0x80+var_69]                                  ; +0x114, 0x100073560\nTBZ             W8, #0x1F, loc_100073570                               ; +0x118, 0x100073564\nLDR             X0, [SP,#0x80+var_80]; __p                             ; +0x11c, 0x100073568\nBL              __ZdlPv; operator delete(void *)                       ; +0x120, 0x10007356c\nLDRSB           W8, [SP,#0x80+var_51]                                  ; +0x124, 0x100073570\nTBZ             W8, #0x1F, loc_100073580                               ; +0x128, 0x100073574\nLDR             X0, [SP,#0x80+var_68]; __p                             ; +0x12c, 0x100073578\nBL              __ZdlPv; operator delete(void *)                       ; +0x130, 0x10007357c\nLDP             X29, X30, [SP,#0x80+var_s0]                            ; +0x134, 0x100073580\nLDP             X20, X19, [SP,#0x80+var_10]                            ; +0x138, 0x100073584\nLDP             X22, X21, [SP,#0x80+var_20]                            ; +0x13c, 0x100073588\nLDP             X24, X23, [SP,#0x80+var_30]                            ; +0x140, 0x10007358c\nADD             SP, SP, #0x90                                          ; +0x144, 0x100073590\nRET                                                                    ; +0x148, 0x100073594", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x100073430"], "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"}