{"type": "func", "start": 6766876, "end": 6767100, "name": "BrowseSmartKeyLayer::createTemplateObjects", "pseudocode": "// \n// BrowseSmartKeyLayer::createTemplateObjects from 0x67411c to 0x6741fc (224 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x67422c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:55:54 +0000\n// \n\nint __fastcall BrowseSmartKeyLayer::createTemplateObjects(cocos2d::CCArray **this)\n{\n  cocos2d::CCArray *AllSelectedBlocks; // r6\n  int result; // r0\n  unsigned int i; // r5\n  int v5; // r9\n  int v6; // r0\n  void (__fastcall *v7)(cocos2d::CCArray **, cocos2d::CCNode *, int); // r9\n  cocos2d::CCNode *v8; // r0\n  int v9[3]; // [sp+Ch] [bp-1Ch] BYREF\n  int v10[3]; // [sp+18h] [bp-10h] BYREF\n\n  AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(this);\n  result = cocos2d::CCArray::count(AllSelectedBlocks);\n  if ( result )\n  {\n    for ( i = 0; i < cocos2d::CCArray::count(AllSelectedBlocks); ++i )\n    {\n      v5 = cocos2d::CCArray::objectAtIndex(AllSelectedBlocks, i);\n      std::string::basic_string(v10, (int)(this + 136));\n      v6 = (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 32))(v5);\n      BrowseSmartTemplateLayer::createPrefab((GameManager *)this, (int)v10, v6);\n      std::string::~string((int)v10);\n    }\n    v7 = *((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, int))*this + 58);\n    memset(v9, 0, sizeof(v9));\n    std::string::__init(v9, \"Added to editor\", 0xFu);\n    memset(v10, 0, sizeof(v10));\n    std::string::__init(v10, &unk_B6B226, 0);\n    v8 = TextAlertPopup::create((int)v9, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v10);\n    v7(this, v8, 100);\n    std::string::~string((int)v10);\n    return std::string::~string((int)v9);\n  }\n  return result;\n}", "assembly": "; \n; BrowseSmartKeyLayer::createTemplateObjects from 0x67411c to 0x6741fc (224 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x67422c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:55:54 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x67411c\nSUB             SP, SP, #0x28                                          ; +0x4, 0x674120\nLDR             R7, =(__stack_chk_guard_ptr - 0x67412A)                ; +0x6, 0x674122\nMOV             R8, R0                                                 ; +0x8, 0x674124\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xa, 0x674126\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xc, 0x674128\nLDR             R3, [R7]                                               ; +0xe, 0x67412a\nSTR             R3, [SP,#0x28+var_4]                                   ; +0x10, 0x67412c\nBL              _ZN19BrowseSmartKeyLayer20getAllSelectedBlocksEv; BrowseSmartKeyLayer::getAllSelectedBlocks(void) ; +0x12, 0x67412e\nMOV             R6, R0                                                 ; +0x16, 0x674132\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x18, 0x674134\nCMP             R0, #0                                                 ; +0x1c, 0x674138\nBEQ             loc_6741EA                                             ; +0x1e, 0x67413a\nADD             R4, SP, #0x28+var_10                                   ; +0x20, 0x67413c\nADD.W           R10, R8, #0x220                                        ; +0x22, 0x67413e\nMOVS            R5, #0                                                 ; +0x26, 0x674142\nMOV             R0, R6; this                                           ; +0x28, 0x674144\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2a, 0x674146\nCMP             R5, R0                                                 ; +0x2e, 0x67414a\nBCS             loc_67417E                                             ; +0x30, 0x67414c\nMOV             R1, R5; unsigned int                                   ; +0x32, 0x67414e\nMOV             R0, R6; this                                           ; +0x34, 0x674150\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x36, 0x674152\nMOV             R1, R10                                                ; +0x3a, 0x674156\nMOV             R9, R0                                                 ; +0x3c, 0x674158\nMOV             R0, R4                                                 ; +0x3e, 0x67415a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x40, 0x67415c\nLDR.W           R3, [R9]                                               ; +0x44, 0x674160\nMOV             R0, R9                                                 ; +0x48, 0x674164\nLDR             R3, [R3,#0x20]                                         ; +0x4a, 0x674166\nBLX             R3                                                     ; +0x4c, 0x674168\nMOV             R2, R0                                                 ; +0x4e, 0x67416a\nMOV             R1, R4                                                 ; +0x50, 0x67416c\nMOV             R0, R8                                                 ; +0x52, 0x67416e\nBL              _ZN24BrowseSmartTemplateLayer12createPrefabENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEi; BrowseSmartTemplateLayer::createPrefab(std::string,int) ; +0x54, 0x674170\nMOV             R0, R4                                                 ; +0x58, 0x674174\nADDS            R5, #1                                                 ; +0x5a, 0x674176\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x5c, 0x674178\nB               loc_674144                                             ; +0x60, 0x67417c\nLDR.W           R3, [R8]                                               ; +0x62, 0x67417e\nADD             R6, SP, #0x28+var_1C                                   ; +0x66, 0x674182\nLDR             R1, =(aAddedToEditor - 0x674190); \"Added to editor\"    ; +0x68, 0x674184\nMOVS            R2, #0xF                                               ; +0x6a, 0x674186\nMOV             R0, R6                                                 ; +0x6c, 0x674188\nMOVS            R5, #0                                                 ; +0x6e, 0x67418a\nADD             R1, PC; \"Added to editor\"                              ; +0x70, 0x67418c\nLDR.W           R9, [R3,#0xE8]                                         ; +0x72, 0x67418e\nSTR             R5, [SP,#0x28+var_1C]                                  ; +0x76, 0x674192\nSTR             R5, [SP,#0x28+var_18]                                  ; +0x78, 0x674194\nSTR             R5, [SP,#0x28+var_14]                                  ; +0x7a, 0x674196\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x7c, 0x674198\nLDR             R1, =(unk_B6B226 - 0x6741A8)                           ; +0x80, 0x67419c\nMOV             R0, R4                                                 ; +0x82, 0x67419e\nMOV             R2, R5                                                 ; +0x84, 0x6741a0\nSTR             R5, [SP,#0x28+var_10]                                  ; +0x86, 0x6741a2\nADD             R1, PC; unk_B6B226                                     ; +0x88, 0x6741a4\nSTR             R5, [SP,#0x28+var_C]                                   ; +0x8a, 0x6741a6\nSTR             R5, [SP,#0x28+var_8]                                   ; +0x8c, 0x6741a8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x8e, 0x6741aa\nSTR             R4, [SP,#0x28+var_28]                                  ; +0x92, 0x6741ae\nMOV             R0, R6                                                 ; +0x94, 0x6741b0\nMOV.W           R1, #0x3F000000                                        ; +0x96, 0x6741b2\nLDR             R2, =0x3F19999A                                        ; +0x9a, 0x6741b6\nMOVS            R3, #0x96                                              ; +0x9c, 0x6741b8\nBL              _ZN14TextAlertPopup6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEffiS6_; TextAlertPopup::create(std::string,float,float,int,std::string) ; +0x9e, 0x6741ba\nMOV             R1, R0                                                 ; +0xa2, 0x6741be\nMOVS            R2, #0x64 ; 'd'                                        ; +0xa4, 0x6741c0\nMOV             R0, R8                                                 ; +0xa6, 0x6741c2\nBLX             R9                                                     ; +0xa8, 0x6741c4\nMOV             R0, R4                                                 ; +0xaa, 0x6741c6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xac, 0x6741c8\nMOV             R0, R6                                                 ; +0xb0, 0x6741cc\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb2, 0x6741ce\nB               loc_6741EA                                             ; +0xb6, 0x6741d2\nMOV             R0, R4                                                 ; +0xb8, 0x6741d4\nB               loc_6741E2                                             ; +0xba, 0x6741d6\nMOV             R0, R4                                                 ; +0xbc, 0x6741d8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xbe, 0x6741da\nB               loc_6741E0                                             ; +0xc2, 0x6741de\nMOV             R0, R6                                                 ; +0xc4, 0x6741e0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xc6, 0x6741e2\nBL              __cxa_end_cleanup                                      ; +0xca, 0x6741e6\nLDR             R2, [SP,#0x28+var_4]                                   ; +0xce, 0x6741ea\nLDR             R3, [R7]                                               ; +0xd0, 0x6741ec\nCMP             R2, R3                                                 ; +0xd2, 0x6741ee\nBEQ             loc_6741F6                                             ; +0xd4, 0x6741f0\nBLX             __stack_chk_fail                                       ; +0xd6, 0x6741f2\nADD             SP, SP, #0x28 ; '('                                    ; +0xda, 0x6741f6\nPOP.W           {R4-R10,PC}                                            ; +0xdc, 0x6741f8", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x67422c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}