{"type": "func", "start": 5503552, "end": 5503760, "name": "BrowseSmartKeyLayer::createTemplateObjects", "pseudocode": "// \n// BrowseSmartKeyLayer::createTemplateObjects from 0x53fa40 to 0x53fb10 (208 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x53fd88\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 BrowseSmartKeyLayer::createTemplateObjects(BrowseSmartKeyLayer *a1)\n{\n  cocos2d::CCArray *AllSelectedBlocks; // r8\n  unsigned int i; // r5\n  int v4; // r9\n  int v5; // r0\n  void (__fastcall *addChild_0)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // r8\n  cocos2d::CCNode *v7; // r0\n  char v8; // [sp+14h] [bp-Ch] BYREF\n  _BYTE v9[4]; // [sp+18h] [bp-8h] BYREF\n\n  AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(a1);\n  if ( cocos2d::CCArray::count(AllSelectedBlocks) )\n  {\n    for ( i = 0; i < cocos2d::CCArray::count(AllSelectedBlocks); ++i )\n    {\n      v4 = cocos2d::CCArray::objectAtIndex(AllSelectedBlocks, i);\n      sub_775C20(v9);\n      v5 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 32))(v4);\n      BrowseSmartTemplateLayer::createPrefab((int)a1, (int)v9, v5);\n      sub_774008(v9);\n    }\n    addChild_0 = a1->addChild_0;\n    sub_776584((int)&v8, \"Added to editor\");\n    sub_776584((int)v9, (char *)&unk_939830);\n    v7 = TextAlertPopup::create((TextAlertPopup *)&v8, (std::string)1056964608, 0.6, 150, (int)v9);\n    addChild_0(a1, v7, 100);\n    sub_774008(v9);\n    sub_774008(&v8);\n  }\n}", "assembly": "; \n; BrowseSmartKeyLayer::createTemplateObjects from 0x53fa40 to 0x53fb10 (208 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x53fd88\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          {R4-R10,LR}                                            ; +0x0, 0x53fa40\nSUB             SP, SP, #0x20                                          ; +0x4, 0x53fa44\nLDR             R6, =(__stack_chk_guard_ptr - 0x53FA4E)                ; +0x6, 0x53fa46\nMOV             R7, R0                                                 ; +0x8, 0x53fa48\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xa, 0x53fa4a\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xc, 0x53fa4c\nLDR             R3, [R6]                                               ; +0xe, 0x53fa4e\nSTR             R3, [SP,#0x20+var_4]                                   ; +0x10, 0x53fa50\nBL              _ZN19BrowseSmartKeyLayer20getAllSelectedBlocksEv; BrowseSmartKeyLayer::getAllSelectedBlocks(void) ; +0x12, 0x53fa52\nMOV             R8, R0                                                 ; +0x16, 0x53fa56\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x18, 0x53fa58\nCMP             R0, #0                                                 ; +0x1c, 0x53fa5c\nBEQ             loc_53FAFE                                             ; +0x1e, 0x53fa5e\nADD             R4, SP, #0x20+var_8                                    ; +0x20, 0x53fa60\nADD.W           R10, R7, #0x208                                        ; +0x22, 0x53fa62\nMOVS            R5, #0                                                 ; +0x26, 0x53fa66\nMOV             R0, R8; this                                           ; +0x28, 0x53fa68\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2a, 0x53fa6a\nCMP             R5, R0                                                 ; +0x2e, 0x53fa6e\nBCS             loc_53FAA2                                             ; +0x30, 0x53fa70\nMOV             R1, R5; unsigned int                                   ; +0x32, 0x53fa72\nMOV             R0, R8; this                                           ; +0x34, 0x53fa74\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x36, 0x53fa76\nMOV             R1, R10                                                ; +0x3a, 0x53fa7a\nMOV             R9, R0                                                 ; +0x3c, 0x53fa7c\nMOV             R0, R4                                                 ; +0x3e, 0x53fa7e\nBL              sub_775C20                                             ; +0x40, 0x53fa80\nLDR.W           R3, [R9]                                               ; +0x44, 0x53fa84\nMOV             R0, R9                                                 ; +0x48, 0x53fa88\nLDR             R3, [R3,#0x20]                                         ; +0x4a, 0x53fa8a\nBLX             R3                                                     ; +0x4c, 0x53fa8c\nMOV             R2, R0                                                 ; +0x4e, 0x53fa8e\nMOV             R1, R4                                                 ; +0x50, 0x53fa90\nMOV             R0, R7                                                 ; +0x52, 0x53fa92\nBL              _ZN24BrowseSmartTemplateLayer12createPrefabESsi; BrowseSmartTemplateLayer::createPrefab(std::string,int) ; +0x54, 0x53fa94\nMOV             R0, R4                                                 ; +0x58, 0x53fa98\nADDS            R5, #1                                                 ; +0x5a, 0x53fa9a\nBL              sub_774008                                             ; +0x5c, 0x53fa9c\nB               loc_53FA68                                             ; +0x60, 0x53faa0\nLDR             R3, [R7]                                               ; +0x62, 0x53faa2\nADD             R5, SP, #0x20+var_C                                    ; +0x64, 0x53faa4\nLDR             R1, =(aAddedToEditor - 0x53FAB0); \"Added to editor\"    ; +0x66, 0x53faa6\nADD             R2, SP, #0x20+var_14                                   ; +0x68, 0x53faa8\nMOV             R0, R5; int                                            ; +0x6a, 0x53faaa\nADD             R1, PC; \"Added to editor\"                              ; +0x6c, 0x53faac\nLDR.W           R8, [R3,#0xE0]                                         ; +0x6e, 0x53faae\nBL              sub_776584                                             ; +0x72, 0x53fab2\nLDR             R1, =(unk_939830 - 0x53FAC0)                           ; +0x76, 0x53fab6\nMOV             R0, R4; int                                            ; +0x78, 0x53fab8\nADD             R2, SP, #0x20+var_10                                   ; +0x7a, 0x53faba\nADD             R1, PC; unk_939830 ; char *                            ; +0x7c, 0x53fabc\nBL              sub_776584                                             ; +0x7e, 0x53fabe\nSTR             R4, [SP,#0x20+var_20]                                  ; +0x82, 0x53fac2\nMOV             R0, R5                                                 ; +0x84, 0x53fac4\nMOV.W           R1, #0x3F000000                                        ; +0x86, 0x53fac6\nLDR             R2, =0x3F19999A                                        ; +0x8a, 0x53faca\nMOVS            R3, #0x96                                              ; +0x8c, 0x53facc\nBL              _ZN14TextAlertPopup6createESsffiSs; TextAlertPopup::create(std::string,float,float,int,std::string) ; +0x8e, 0x53face\nMOV             R1, R0                                                 ; +0x92, 0x53fad2\nMOVS            R2, #0x64 ; 'd'                                        ; +0x94, 0x53fad4\nMOV             R0, R7                                                 ; +0x96, 0x53fad6\nBLX             R8                                                     ; +0x98, 0x53fad8\nMOV             R0, R4                                                 ; +0x9a, 0x53fada\nBL              sub_774008                                             ; +0x9c, 0x53fadc\nMOV             R0, R5                                                 ; +0xa0, 0x53fae0\nBL              sub_774008                                             ; +0xa2, 0x53fae2\nB               loc_53FAFE                                             ; +0xa6, 0x53fae6\nMOV             R0, R4                                                 ; +0xa8, 0x53fae8\nB               loc_53FAF6                                             ; +0xaa, 0x53faea\nMOV             R0, R4                                                 ; +0xac, 0x53faec\nBL              sub_774008                                             ; +0xae, 0x53faee\nB               loc_53FAF4                                             ; +0xb2, 0x53faf2\nMOV             R0, R5                                                 ; +0xb4, 0x53faf4\nBL              sub_774008                                             ; +0xb6, 0x53faf6\nBL              __cxa_end_cleanup                                      ; +0xba, 0x53fafa\nLDR             R2, [SP,#0x20+var_4]                                   ; +0xbe, 0x53fafe\nLDR             R3, [R6]                                               ; +0xc0, 0x53fb00\nCMP             R2, R3                                                 ; +0xc2, 0x53fb02\nBEQ             loc_53FB0A                                             ; +0xc4, 0x53fb04\nBLX             __stack_chk_fail                                       ; +0xc6, 0x53fb06\nADD             SP, SP, #0x20 ; ' '                                    ; +0xca, 0x53fb0a\nPOP.W           {R4-R10,PC}                                            ; +0xcc, 0x53fb0c", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x53fd88"], "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"}