{"type": "func", "start": 4727432, "end": 4727664, "name": "GJBaseGameLayer::restoreAllUIObjects", "pseudocode": "// \n// GJBaseGameLayer::restoreAllUIObjects from 0x482288 to 0x482370 (232 bytes)\n// \n// 1 xrefs:\n// > LevelEditorLayer::onStopPlaytest @ 0x36924c\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 GJBaseGameLayer::restoreAllUIObjects(GJBaseGameLayer *a1)\n{\n  std::unordered_map<int, cocos2d::CCPoint> *p_m_uiObjectPositions; // r9\n  cocos2d::CCArray *m_uiObjects; // r2\n  cocos2d::ccArray *data; // r3\n  cocos2d::CCObject **arr; // r6\n  unsigned int *v6; // r12\n  cocos2d::CCObject **v7; // r7\n  GameObject *v8; // r4\n  GameObject *v9; // t1\n  void (__fastcall *setStartPos)(GameObject *__hidden, cocos2d::CCPoint); // r3\n  const cocos2d::CCPoint *v11; // r0\n  unsigned int *v12; // [sp+0h] [bp-1Ch]\n  void (__fastcall *v13)(GameObject *__hidden, cocos2d::CCPoint); // [sp+4h] [bp-18h]\n  int m_uniqueID; // [sp+8h] [bp-14h] BYREF\n  cocos2d::CCPoint v15; // [sp+Ch] [bp-10h] BYREF\n\n  p_m_uiObjectPositions = &a1->m_uiObjectPositions;\n  m_uiObjects = a1->m_uiObjects;\n  if ( m_uiObjects )\n  {\n    data = m_uiObjects->data;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v6 = (unsigned int *)&m_uniqueID;\n      v7 = &arr[data->num] + 0x3FFFFFFF;\n      while ( arr <= v7 )\n      {\n        v9 = (GameObject *)*arr++;\n        v8 = v9;\n        if ( !v9 )\n          break;\n        v12 = v6;\n        setStartPos = v8->setStartPos;\n        m_uniqueID = v8->m_uniqueID;\n        v13 = setStartPos;\n        v11 = (const cocos2d::CCPoint *)std::__detail::_Map_base<int,std::pair<int const,cocos2d::CCPoint>,std::allocator<std::pair<int const,cocos2d::CCPoint>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](\n                                          p_m_uiObjectPositions,\n                                          v6);\n        cocos2d::CCPoint::CCPoint(&v15, v11);\n        ((void (__fastcall *)(GameObject *, cocos2d::CCPoint *))v13)(v8, &v15);\n        v8->deactivateObject(v8, 1);\n        v8->m_outerSectionIndex = 0;\n        v8->m_isUIObject = 0;\n        a1->addToSection(a1, v8);\n        cocos2d::CCDictionary::setObject(a1->m_objectsToDeactivate, v8, v8->m_uniqueID);\n        v8->m_unk3ee = 1;\n        v6 = v12;\n      }\n    }\n  }\n  cocos2d::CCArray::removeAllObjects(a1->m_uiObjects);\n  std::_Hashtable<int,std::pair<int const,cocos2d::CCPoint>,std::allocator<std::pair<int const,cocos2d::CCPoint>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::clear((int)p_m_uiObjectPositions);\n  a1->m_calcCollisionBlockObjects2.m_finish = a1->m_calcCollisionBlockObjects2.m_start;\n  a1->m_calcCollisionBlockObjects2Size = 0;\n}", "assembly": "; \n; GJBaseGameLayer::restoreAllUIObjects from 0x482288 to 0x482370 (232 bytes)\n; \n; 1 xrefs:\n; > LevelEditorLayer::onStopPlaytest @ 0x36924c\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x482292)                ; +0x0, 0x482288\nPUSH.W          {R4-R11,LR}                                            ; +0x2, 0x48228a\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x48228e\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x482290\nSUB             SP, SP, #0x1C                                          ; +0xa, 0x482292\nMOV             R5, R0                                                 ; +0xc, 0x482294\nLDR             R2, [R3]                                               ; +0xe, 0x482296\nMOV             R8, R3                                                 ; +0x10, 0x482298\nADD.W           R9, R0, #0x658                                         ; +0x12, 0x48229a\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x16, 0x48229e\nMOVW            R2, #0x2C84                                            ; +0x18, 0x4822a0\nLDR             R2, [R0,R2]                                            ; +0x1c, 0x4822a4\nCBNZ            R2, loc_4822DA                                         ; +0x1e, 0x4822a6\nMOVW            R3, #0x2C84                                            ; +0x20, 0x4822a8\nLDR             R0, [R5,R3]; this                                      ; +0x24, 0x4822ac\nBL              _ZN7cocos2d7CCArray16removeAllObjectsEv; cocos2d::CCArray::removeAllObjects(void) ; +0x26, 0x4822ae\nMOV             R0, R9                                                 ; +0x2a, 0x4822b2\nBL              _ZNSt10_HashtableIiSt4pairIKiN7cocos2d7CCPointEESaIS4_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEE5clearEv; std::_Hashtable<int,std::pair<int const,cocos2d::CCPoint>,std::allocator<std::pair<int const,cocos2d::CCPoint>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::clear(void) ; +0x2c, 0x4822b4\nMOVW            R3, #0x2CF0                                            ; +0x30, 0x4822b8\nLDR             R2, [R5,R3]                                            ; +0x34, 0x4822bc\nMOVW            R3, #0x2CF4                                            ; +0x36, 0x4822be\nSTR             R2, [R5,R3]                                            ; +0x3a, 0x4822c2\nMOVW            R3, #0x2CFC                                            ; +0x3c, 0x4822c4\nMOVS            R2, #0                                                 ; +0x40, 0x4822c8\nSTR             R2, [R5,R3]                                            ; +0x42, 0x4822ca\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x44, 0x4822cc\nLDR.W           R3, [R8]                                               ; +0x46, 0x4822ce\nCMP             R2, R3                                                 ; +0x4a, 0x4822d2\nBEQ             loc_48236A                                             ; +0x4c, 0x4822d4\nBLX             __stack_chk_fail                                       ; +0x4e, 0x4822d6\nLDR             R3, [R2,#0x34]                                         ; +0x52, 0x4822da\nLDR             R4, [R3]                                               ; +0x54, 0x4822dc\nCMP             R4, #0                                                 ; +0x56, 0x4822de\nBEQ             loc_4822A8                                             ; +0x58, 0x4822e0\nADD.W           R4, R4, #0x40000000                                    ; +0x5a, 0x4822e2\nLDR             R6, [R3,#0xC]                                          ; +0x5e, 0x4822e6\nSUBS            R4, #1                                                 ; +0x60, 0x4822e8\nADD.W           R12, SP, #0x1C+var_14                                  ; +0x62, 0x4822ea\nADD.W           R10, SP, #0x1C+var_10                                  ; +0x66, 0x4822ee\nMOV.W           R11, #1                                                ; +0x6a, 0x4822f2\nADD.W           R7, R6, R4,LSL#2                                       ; +0x6e, 0x4822f6\nCMP             R6, R7                                                 ; +0x72, 0x4822fa\nBHI             loc_4822A8                                             ; +0x74, 0x4822fc\nLDR.W           R4, [R6],#4                                            ; +0x76, 0x4822fe\nCMP             R4, #0                                                 ; +0x7a, 0x482302\nBEQ             loc_4822A8                                             ; +0x7c, 0x482304\nLDR             R3, [R4]                                               ; +0x7e, 0x482306\nMOV             R1, R12                                                ; +0x80, 0x482308\nLDR.W           R2, [R4,#0x304]                                        ; +0x82, 0x48230a\nMOV             R0, R9                                                 ; +0x86, 0x48230e\nSTR.W           R12, [SP,#0x1C+var_1C]                                 ; +0x88, 0x482310\nLDR.W           R3, [R3,#0x2A4]                                        ; +0x8c, 0x482314\nSTR             R2, [SP,#0x1C+var_14]                                  ; +0x90, 0x482318\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0x92, 0x48231a\nBL              _ZNSt8__detail9_Map_baseIiSt4pairIKiN7cocos2d7CCPointEESaIS5_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixEOi; std::__detail::_Map_base<int,std::pair<int const,cocos2d::CCPoint>,std::allocator<std::pair<int const,cocos2d::CCPoint>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int &&) ; +0x94, 0x48231c\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x98, 0x482320\nMOV             R0, R10; this                                          ; +0x9a, 0x482322\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x9c, 0x482324\nMOV             R0, R4                                                 ; +0xa0, 0x482328\nMOV             R1, R10                                                ; +0xa2, 0x48232a\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0xa4, 0x48232c\nBLX             R3                                                     ; +0xa6, 0x48232e\nLDR             R3, [R4]                                               ; +0xa8, 0x482330\nMOV             R0, R4                                                 ; +0xaa, 0x482332\nMOVS            R1, #1                                                 ; +0xac, 0x482334\nLDR.W           R3, [R3,#0x288]                                        ; +0xae, 0x482336\nBLX             R3                                                     ; +0xb2, 0x48233a\nMOVS            R3, #0                                                 ; +0xb4, 0x48233c\nSTR.W           R3, [R4,#0x210]                                        ; +0xb6, 0x48233e\nMOV             R0, R5                                                 ; +0xba, 0x482342\nSTRB.W          R3, [R4,#0x485]                                        ; +0xbc, 0x482344\nMOV             R1, R4                                                 ; +0xc0, 0x482348\nLDR             R3, [R5]                                               ; +0xc2, 0x48234a\nLDR.W           R3, [R3,#0x288]                                        ; +0xc4, 0x48234c\nBLX             R3                                                     ; +0xc8, 0x482350\nLDR.W           R0, [R5,#0xA14]; this                                  ; +0xca, 0x482352\nMOV             R1, R4; cocos2d::CCObject *                            ; +0xce, 0x482356\nLDR.W           R2, [R4,#0x304]; int                                   ; +0xd0, 0x482358\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0xd4, 0x48235c\nSTRB.W          R11, [R4,#0x356]                                       ; +0xd8, 0x482360\nLDR.W           R12, [SP,#0x1C+var_1C]                                 ; +0xdc, 0x482364\nB               loc_4822FA                                             ; +0xe0, 0x482368\nADD             SP, SP, #0x1C                                          ; +0xe2, 0x48236a\nPOP.W           {R4-R11,PC}                                            ; +0xe4, 0x48236c", "xrefs": ["LevelEditorLayer::onStopPlaytest @ 0x36924c"], "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"}