{"type": "func", "start": 4733032, "end": 4733132, "name": "GJBaseGameLayer::addObjectCounter", "pseudocode": "// \n// GJBaseGameLayer::addObjectCounter from 0x483868 to 0x4838cc (100 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::addObject @ 0x310dde\n// > LevelEditorLayer::recreateGroups @ 0x36e81c\n// > LevelEditorLayer::init @ 0x376da8\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::addObjectCounter(GJBaseGameLayer *a1, LabelGameObject *a2)\n{\n  std::unordered_map<int, std::vector<LabelGameObject *>> *p_m_timeLabelObjects; // r0\n  _DWORD *v3; // r0\n  LabelGameObject **v4; // r2\n  LabelGameObject *v5; // [sp+4h] [bp-Ch] BYREF\n  int m_itemID; // [sp+8h] [bp-8h] BYREF\n\n  v5 = a2;\n  m_itemID = a2->m_itemID;\n  if ( a2->m_shownSpecial < 0 )\n    m_itemID = a2->m_shownSpecial;\n  if ( a2->m_isTimeCounter )\n    p_m_timeLabelObjects = &a1->m_timeLabelObjects;\n  else\n    p_m_timeLabelObjects = &a1->m_labelObjects;\n  v3 = std::__detail::_Map_base<int,std::pair<int const,std::vector<LabelGameObject *>>,std::allocator<std::pair<int const,std::vector<LabelGameObject *>>>,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_timeLabelObjects,\n         (unsigned int *)&m_itemID);\n  v4 = (LabelGameObject **)v3[1];\n  if ( v4 == (LabelGameObject **)v3[2] )\n  {\n    std::vector<LabelGameObject *>::_M_emplace_back_aux<LabelGameObject * const&>((int)v3, &v5);\n  }\n  else\n  {\n    if ( v4 )\n      *v4 = v5;\n    v3[1] += 4;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::addObjectCounter from 0x483868 to 0x4838cc (100 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::addObject @ 0x310dde\n; > LevelEditorLayer::recreateGroups @ 0x36e81c\n; > LevelEditorLayer::init @ 0x376da8\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            {R0-R4,LR}                                             ; +0x0, 0x483868\nLDR             R2, =(__stack_chk_guard_ptr - 0x483872)                ; +0x2, 0x48386a\nSTR             R1, [SP,#0x10+var_C]                                   ; +0x4, 0x48386c\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x6, 0x48386e\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x8, 0x483870\nLDR             R3, [R2]                                               ; +0xa, 0x483872\nMOV             R4, R2                                                 ; +0xc, 0x483874\nSTR             R3, [SP,#0x10+var_4]                                   ; +0xe, 0x483876\nLDR.W           R3, [R1,#0x5D4]                                        ; +0x10, 0x483878\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x14, 0x48387c\nLDR.W           R3, [R1,#0x67C]                                        ; +0x16, 0x48387e\nCMP             R3, #0                                                 ; +0x1a, 0x483882\nIT LT                                                                  ; +0x1c, 0x483884\nSTRLT           R3, [SP,#0x10+var_8]                                   ; +0x1e, 0x483886\nLDRB.W          R3, [R1,#0x680]                                        ; +0x20, 0x483888\nADD             R1, SP, #0x10+var_8                                    ; +0x24, 0x48388c\nCBZ             R3, loc_483896                                         ; +0x26, 0x48388e\nADDW            R0, R0, #0xA34                                         ; +0x28, 0x483890\nB               loc_48389A                                             ; +0x2c, 0x483894\nADDW            R0, R0, #0xA18                                         ; +0x2e, 0x483896\nBL              _ZNSt8__detail9_Map_baseIiSt4pairIKiSt6vectorIP15LabelGameObjectSaIS5_EEESaIS8_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,std::vector<LabelGameObject *>>,std::allocator<std::pair<int const,std::vector<LabelGameObject *>>>,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 const&) ; +0x32, 0x48389a\nLDR             R2, [R0,#4]                                            ; +0x36, 0x48389e\nMOV             R3, R0                                                 ; +0x38, 0x4838a0\nLDR             R1, [R0,#8]                                            ; +0x3a, 0x4838a2\nCMP             R2, R1                                                 ; +0x3c, 0x4838a4\nBEQ             loc_4838B6                                             ; +0x3e, 0x4838a6\nLDR             R1, [SP,#0x10+var_C]                                   ; +0x40, 0x4838a8\nCBZ             R2, loc_4838AE                                         ; +0x42, 0x4838aa\nSTR             R1, [R2]                                               ; +0x44, 0x4838ac\nLDR             R2, [R3,#4]                                            ; +0x46, 0x4838ae\nADDS            R2, #4                                                 ; +0x48, 0x4838b0\nSTR             R2, [R3,#4]                                            ; +0x4a, 0x4838b2\nB               loc_4838BC                                             ; +0x4c, 0x4838b4\nADD             R1, SP, #0x10+var_C                                    ; +0x4e, 0x4838b6\nBL              _ZNSt6vectorIP15LabelGameObjectSaIS1_EE19_M_emplace_back_auxIJRKS1_EEEvDpOT_; std::vector<LabelGameObject *>::_M_emplace_back_aux<LabelGameObject * const&>(LabelGameObject * const&) ; +0x50, 0x4838b8\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x54, 0x4838bc\nLDR             R3, [R4]                                               ; +0x56, 0x4838be\nCMP             R2, R3                                                 ; +0x58, 0x4838c0\nBEQ             loc_4838C8                                             ; +0x5a, 0x4838c2\nBLX             __stack_chk_fail                                       ; +0x5c, 0x4838c4\nADD             SP, SP, #0x10                                          ; +0x60, 0x4838c8\nPOP             {R4,PC}                                                ; +0x62, 0x4838ca", "xrefs": ["PlayLayer::addObject @ 0x310dde", "LevelEditorLayer::recreateGroups @ 0x36e81c", "LevelEditorLayer::init @ 0x376da8"], "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"}