{"type": "func", "start": 4727668, "end": 4727870, "name": "GJBaseGameLayer::addUIObject", "pseudocode": "// \n// GJBaseGameLayer::addUIObject from 0x482374 to 0x48243e (202 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::positionUIObjects @ 0x482586\n// > GJBaseGameLayer::positionUIObjects @ 0x482724\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::addUIObject(GJBaseGameLayer *a1, GameObject *a2)\n{\n  PlayerObject *v4; // r8\n  int v5; // r2\n  bool v6; // r3\n  unsigned int m_calcCollisionBlockObjects2Size; // r1\n  GameObject **m_start; // r2\n  int v9; // r3\n  GJBaseGameLayer *m_uniqueID; // [sp+0h] [bp-10h] BYREF\n  _DWORD v11[2]; // [sp+4h] [bp-Ch] BYREF\n\n  m_uniqueID = a1;\n  v11[0] = a2;\n  if ( !a2->m_isUIObject )\n  {\n    m_uniqueID = (GJBaseGameLayer *)a2->m_uniqueID;\n    v4 = (PlayerObject *)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                           &a1->m_uiObjectPositions._M_h._M_buckets,\n                           (unsigned int *)&m_uniqueID);\n    a2->getStartPos((cocos2d::CCPoint *)v11, a2);\n    cocos2d::CCPoint::operator=(v4, COERCE_FLOAT(v11), v5, v6);\n    GJBaseGameLayer::removeObjectFromSection(a1, a2);\n    a2->deactivateObject(a2, 1);\n    a2->m_outerSectionIndex = -1;\n    a2->m_isUIObject = 1;\n    cocos2d::CCArray::addObject(a1->m_uiObjects, a2);\n    if ( a2->m_objectID == 1816 )\n    {\n      m_calcCollisionBlockObjects2Size = a1->m_calcCollisionBlockObjects2Size;\n      v11[0] = a2;\n      m_start = a1->m_calcCollisionBlockObjects2.m_start;\n      if ( m_calcCollisionBlockObjects2Size < a1->m_calcCollisionBlockObjects2.m_finish - m_start )\n        m_start[m_calcCollisionBlockObjects2Size] = a2;\n      else\n        std::vector<EffectGameObject *>::push_back((int)&a1->m_calcCollisionBlockObjects2, v11);\n      v9 = a1->m_calcCollisionBlockObjects2Size;\n      a1->m_calcCollisionBlockObjects2Size = v9 + 1;\n      *(_DWORD *)(v11[0] + 524) = v9;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::addUIObject from 0x482374 to 0x48243e (202 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::positionUIObjects @ 0x482586\n; > GJBaseGameLayer::positionUIObjects @ 0x482724\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          {R0-R8,LR}                                             ; +0x0, 0x482374\nMOV             R5, R0                                                 ; +0x4, 0x482378\nLDR             R3, =(__stack_chk_guard_ptr - 0x482382)                ; +0x6, 0x48237a\nMOV             R4, R1                                                 ; +0x8, 0x48237c\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xa, 0x48237e\nLDR             R3, [R3]; __stack_chk_guard                            ; +0xc, 0x482380\nLDR             R2, [R3]                                               ; +0xe, 0x482382\nMOV             R6, R3                                                 ; +0x10, 0x482384\nSTR             R2, [SP,#0x10+var_4]                                   ; +0x12, 0x482386\nLDRB.W          R2, [R1,#0x485]                                        ; +0x14, 0x482388\nCMP             R2, #0                                                 ; +0x18, 0x48238c\nBNE             loc_48242C                                             ; +0x1a, 0x48238e\nLDR.W           R3, [R1,#0x304]                                        ; +0x1c, 0x482390\nADD             R1, SP, #0x10+var_s0                                   ; +0x20, 0x482394\nADD.W           R0, R0, #0x658                                         ; +0x22, 0x482396\nADD             R7, SP, #0x10+var_C                                    ; +0x26, 0x48239a\nSTR.W           R3, [R1,#-0x10]!                                       ; +0x28, 0x48239c\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 &&) ; +0x2c, 0x4823a0\nLDR             R3, [R4]                                               ; +0x30, 0x4823a4\nMOV             R1, R4                                                 ; +0x32, 0x4823a6\nLDR.W           R3, [R3,#0x384]                                        ; +0x34, 0x4823a8\nMOV             R8, R0                                                 ; +0x38, 0x4823ac\nMOV             R0, R7                                                 ; +0x3a, 0x4823ae\nBLX             R3                                                     ; +0x3c, 0x4823b0\nMOV             R1, R7                                                 ; +0x3e, 0x4823b2\nMOV             R0, R8                                                 ; +0x40, 0x4823b4\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x42, 0x4823b6\nMOV             R0, R5; this                                           ; +0x46, 0x4823ba\nMOV             R1, R4; GameObject *                                   ; +0x48, 0x4823bc\nBL              _ZN15GJBaseGameLayer23removeObjectFromSectionEP10GameObject; GJBaseGameLayer::removeObjectFromSection(GameObject *) ; +0x4a, 0x4823be\nLDR             R3, [R4]                                               ; +0x4e, 0x4823c2\nMOV             R0, R4                                                 ; +0x50, 0x4823c4\nMOVS            R1, #1                                                 ; +0x52, 0x4823c6\nLDR.W           R3, [R3,#0x288]                                        ; +0x54, 0x4823c8\nBLX             R3                                                     ; +0x58, 0x4823cc\nMOV.W           R3, #0xFFFFFFFF                                        ; +0x5a, 0x4823ce\nSTR.W           R3, [R4,#0x210]                                        ; +0x5e, 0x4823d2\nMOVS            R3, #1                                                 ; +0x62, 0x4823d6\nSTRB.W          R3, [R4,#0x485]                                        ; +0x64, 0x4823d8\nMOVW            R3, #0x2C84                                            ; +0x68, 0x4823dc\nLDR             R0, [R5,R3]; this                                      ; +0x6c, 0x4823e0\nMOV             R1, R4; cocos2d::CCObject *                            ; +0x6e, 0x4823e2\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x70, 0x4823e4\nLDR.W           R3, [R4,#0x374]                                        ; +0x74, 0x4823e8\nCMP.W           R3, #0x718                                             ; +0x78, 0x4823ec\nBNE             loc_48242C                                             ; +0x7c, 0x4823f0\nADD.W           R0, R5, #0x2CC0                                        ; +0x7e, 0x4823f2\nMOVW            R3, #0x2CFC                                            ; +0x82, 0x4823f6\nADDS            R0, #0x30 ; '0'                                        ; +0x86, 0x4823fa\nLDR             R1, [R5,R3]                                            ; +0x88, 0x4823fc\nMOVW            R3, #0x2CF0                                            ; +0x8a, 0x4823fe\nSTR             R4, [SP,#0x10+var_C]                                   ; +0x8e, 0x482402\nLDR             R2, [R5,R3]                                            ; +0x90, 0x482404\nLDR             R3, [R0,#4]                                            ; +0x92, 0x482406\nSUBS            R3, R3, R2                                             ; +0x94, 0x482408\nCMP.W           R1, R3,ASR#2                                           ; +0x96, 0x48240a\nBCC             loc_482418                                             ; +0x9a, 0x48240e\nMOV             R1, R7                                                 ; +0x9c, 0x482410\nBL              _ZNSt6vectorIP16EffectGameObjectSaIS1_EE9push_backERKS1_; std::vector<EffectGameObject *>::push_back(EffectGameObject * const&) ; +0x9e, 0x482412\nB               loc_48241C                                             ; +0xa2, 0x482416\nSTR.W           R4, [R2,R1,LSL#2]                                      ; +0xa4, 0x482418\nMOVW            R2, #0x2CFC                                            ; +0xa8, 0x48241c\nLDR             R3, [R5,R2]                                            ; +0xac, 0x482420\nADDS            R1, R3, #1                                             ; +0xae, 0x482422\nSTR             R1, [R5,R2]                                            ; +0xb0, 0x482424\nLDR             R2, [SP,#0x10+var_C]                                   ; +0xb2, 0x482426\nSTR.W           R3, [R2,#0x20C]                                        ; +0xb4, 0x482428\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xb8, 0x48242c\nLDR             R3, [R6]                                               ; +0xba, 0x48242e\nCMP             R2, R3                                                 ; +0xbc, 0x482430\nBEQ             loc_482438                                             ; +0xbe, 0x482432\nBLX             __stack_chk_fail                                       ; +0xc0, 0x482434\nADD             SP, SP, #0x10                                          ; +0xc4, 0x482438\nPOP.W           {R4-R8,PC}                                             ; +0xc6, 0x48243a", "xrefs": ["GJBaseGameLayer::positionUIObjects @ 0x482586", "GJBaseGameLayer::positionUIObjects @ 0x482724"], "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"}