{"type": "func", "start": 4771220, "end": 4771564, "name": "GJBaseGameLayer::updateParticles", "pseudocode": "// \n// GJBaseGameLayer::updateParticles from 0x48cd94 to 0x48ceec (344 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::updateVisibility @ 0x315d64\n// > LevelEditorLayer::updateVisibility @ 0x3697b8\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::updateParticles(GJBaseGameLayer *a1, float a2)\n{\n  cocos2d::CCArray **p_m_temporaryParticles; // r7\n  int *p_m_particleCount; // r9\n  int *p_m_customParticlesUIDs; // r11\n  unsigned int v7; // r5\n  int v8; // r0\n  int *v9; // r8\n  int v10; // r0\n  int v11; // r3\n  cocos2d::CCArray **p_m_unclaimedParticles; // r8\n  unsigned int v13; // r7\n  cocos2d::CCObject *v14; // r5\n  unsigned int m_nLuaID; // r10\n  std::_Hashtable<int, std::pair<const int, std::string>, std::allocator<std::pair<const int, std::string>>, 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>>::size_type v16; // r11\n  _DWORD **v17; // r0\n  cocos2d::CCArray *v18; // r0\n  _DWORD *v19; // r0\n  std::string v20[2]; // [sp+0h] [bp-Ch] BYREF\n\n  v20[0].m_data.m_data = (stl::StringData<char>::Internal *)a1;\n  v20[1] = LODWORD(a2);\n  p_m_temporaryParticles = &a1->m_temporaryParticles;\n  p_m_particleCount = &a1->m_particleCount;\n  p_m_customParticlesUIDs = (int *)&a1->m_customParticlesUIDs;\n  v7 = 0;\n  a1->m_particleCount = 0;\n  while ( v7 < cocos2d::CCArray::count(*p_m_temporaryParticles) )\n  {\n    v8 = cocos2d::CCArray::objectAtIndex(*p_m_temporaryParticles, v7);\n    v9 = (int *)v8;\n    if ( *(_BYTE *)(v8 + 463) )\n    {\n      v20[0] = *(std::string *)(v8 + 4);\n      sub_48CCE8(p_m_customParticlesUIDs, v20);\n      cocos2d::CCArray::fastRemoveObjectAtIndex(*p_m_temporaryParticles, v7);\n    }\n    else\n    {\n      ++v7;\n      v10 = (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 740))(v8);\n      v11 = *v9;\n      *p_m_particleCount += v10;\n      (*(void (__fastcall **)(int *, _DWORD))(v11 + 20))(v9, LODWORD(a2));\n    }\n  }\n  p_m_unclaimedParticles = &a1->m_unclaimedParticles;\n  v13 = 0;\n  while ( v13 < cocos2d::CCArray::count(*p_m_unclaimedParticles) )\n  {\n    v14 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(*p_m_unclaimedParticles, v13);\n    if ( ((int (__fastcall *)(cocos2d::CCObject *))v14->__vftable[11].~CCObject_0)(v14) )\n    {\n      ++v13;\n    }\n    else\n    {\n      m_nLuaID = v14[13].m_nLuaID;\n      v16 = m_nLuaID % a1->m_particleCountToParticleString._M_h._M_bucket_count;\n      v17 = sub_46C90C(&a1->m_particleCountToParticleString._M_h._M_buckets, v16, &v14[13].m_nLuaID);\n      if ( !v17 || !*v17 )\n      {\n        v19 = (_DWORD *)operator new(0xCu);\n        *v19 = 0;\n        v19[1] = v14[13].m_nLuaID;\n        v19[2] = &unk_ACDDA8;\n        std::_Hashtable<int,std::pair<int const,std::string>,std::allocator<std::pair<int const,std::string>>,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>>::_M_insert_unique_node(\n          (int)&a1->m_particleCountToParticleString,\n          v16,\n          m_nLuaID,\n          v19);\n      }\n      sub_775C20(v20);\n      v18 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_customParticles, v20);\n      if ( v18 )\n        cocos2d::CCArray::addObject(v18, v14);\n      cocos2d::CCArray::fastRemoveObjectAtIndex(*p_m_unclaimedParticles, v13);\n      sub_774008(v20);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateParticles from 0x48cd94 to 0x48ceec (344 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::updateVisibility @ 0x315d64\n; > LevelEditorLayer::updateVisibility @ 0x3697b8\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-R2,R4-R11,LR}                                      ; +0x0, 0x48cd94\nADD.W           R7, R0, #0x2A40                                        ; +0x4, 0x48cd98\nLDR             R6, =(__stack_chk_guard_ptr - 0x48CDAC)                ; +0x8, 0x48cd9c\nADD.W           R9, R0, #0x2A00                                        ; +0xa, 0x48cd9e\nADD.W           R11, R0, #0x2A40                                       ; +0xe, 0x48cda2\nADDS            R7, #0x14                                              ; +0x12, 0x48cda6\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x14, 0x48cda8\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x16, 0x48cdaa\nADD.W           R9, R9, #0x1C                                          ; +0x18, 0x48cdac\nADD.W           R11, R11, #0x18                                        ; +0x1c, 0x48cdb0\nMOV             R4, R0                                                 ; +0x20, 0x48cdb4\nLDR             R3, [R6]                                               ; +0x22, 0x48cdb6\nMOV             R10, R1                                                ; +0x24, 0x48cdb8\nMOVS            R5, #0                                                 ; +0x26, 0x48cdba\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x28, 0x48cdbc\nMOVW            R3, #0x2A1C                                            ; +0x2a, 0x48cdbe\nSTR             R5, [R0,R3]                                            ; +0x2e, 0x48cdc2\nLDR             R0, [R7]; this                                         ; +0x30, 0x48cdc4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x32, 0x48cdc6\nCMP             R5, R0                                                 ; +0x36, 0x48cdca\nBCS             loc_48CE18                                             ; +0x38, 0x48cdcc\nLDR             R0, [R7]; this                                         ; +0x3a, 0x48cdce\nMOV             R1, R5; unsigned int                                   ; +0x3c, 0x48cdd0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x3e, 0x48cdd2\nLDRB.W          R3, [R0,#0x1CF]                                        ; +0x42, 0x48cdd6\nMOV             R8, R0                                                 ; +0x46, 0x48cdda\nCBZ             R3, loc_48CDF6                                         ; +0x48, 0x48cddc\nLDR             R3, [R0,#4]                                            ; +0x4a, 0x48cdde\nADD             R1, SP, #0xC+var_4                                     ; +0x4c, 0x48cde0\nMOV             R0, R11                                                ; +0x4e, 0x48cde2\nSTR.W           R3, [R1,#-8]!                                          ; +0x50, 0x48cde4\nBL              sub_48CCE8                                             ; +0x54, 0x48cde8\nLDR             R0, [R7]; this                                         ; +0x58, 0x48cdec\nMOV             R1, R5; unsigned int                                   ; +0x5a, 0x48cdee\nBL              _ZN7cocos2d7CCArray23fastRemoveObjectAtIndexEj; cocos2d::CCArray::fastRemoveObjectAtIndex(uint) ; +0x5c, 0x48cdf0\nB               loc_48CDC4                                             ; +0x60, 0x48cdf4\nLDR             R3, [R0]                                               ; +0x62, 0x48cdf6\nADDS            R5, #1                                                 ; +0x64, 0x48cdf8\nLDR.W           R3, [R3,#0x2E4]                                        ; +0x66, 0x48cdfa\nBLX             R3                                                     ; +0x6a, 0x48cdfe\nLDR.W           R3, [R9]                                               ; +0x6c, 0x48ce00\nMOV             R1, R10                                                ; +0x70, 0x48ce04\nADD             R0, R3                                                 ; +0x72, 0x48ce06\nLDR.W           R3, [R8]                                               ; +0x74, 0x48ce08\nSTR.W           R0, [R9]                                               ; +0x78, 0x48ce0c\nMOV             R0, R8                                                 ; +0x7c, 0x48ce10\nLDR             R3, [R3,#0x14]                                         ; +0x7e, 0x48ce12\nBLX             R3                                                     ; +0x80, 0x48ce14\nB               loc_48CDC4                                             ; +0x82, 0x48ce16\nADD.W           R8, R4, #0x2A00                                        ; +0x84, 0x48ce18\nADD.W           R9, R4, #0x2A00                                        ; +0x88, 0x48ce1c\nADD.W           R8, R8, #0x30 ; '0'                                    ; +0x8c, 0x48ce20\nADD.W           R9, R9, #0x34 ; '4'                                    ; +0x90, 0x48ce24\nMOVS            R7, #0                                                 ; +0x94, 0x48ce28\nLDR.W           R0, [R8]; this                                         ; +0x96, 0x48ce2a\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x9a, 0x48ce2e\nCMP             R7, R0                                                 ; +0x9e, 0x48ce32\nBCS             loc_48CEDA                                             ; +0xa0, 0x48ce34\nLDR.W           R0, [R8]; this                                         ; +0xa2, 0x48ce36\nMOV             R1, R7; unsigned int                                   ; +0xa6, 0x48ce3a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xa8, 0x48ce3c\nLDR             R3, [R0]                                               ; +0xac, 0x48ce40\nMOV             R5, R0                                                 ; +0xae, 0x48ce42\nLDR.W           R3, [R3,#0x1C0]                                        ; +0xb0, 0x48ce44\nBLX             R3                                                     ; +0xb4, 0x48ce48\nCBNZ            R0, loc_48CEA0                                         ; +0xb6, 0x48ce4a\nLDR.W           R10, [R5,#0x2AC]                                       ; +0xb8, 0x48ce4c\nADD.W           R3, R4, #0x2A00                                        ; +0xbc, 0x48ce50\nLDR             R1, [R3,#0x38]                                         ; +0xc0, 0x48ce54\nMOV             R0, R10                                                ; +0xc2, 0x48ce56\nBLX             __aeabi_uidivmod                                       ; +0xc4, 0x48ce58\nMOV             R0, R9                                                 ; +0xc8, 0x48ce5c\nADD.W           R2, R5, #0x2AC                                         ; +0xca, 0x48ce5e\nMOV             R11, R1                                                ; +0xce, 0x48ce62\nBL              sub_46C90C                                             ; +0xd0, 0x48ce64\nCBZ             R0, loc_48CEAE                                         ; +0xd4, 0x48ce68\nLDR             R1, [R0]                                               ; +0xd6, 0x48ce6a\nCBZ             R1, loc_48CEAE                                         ; +0xd8, 0x48ce6c\nADDS            R1, #8                                                 ; +0xda, 0x48ce6e\nMOV             R0, SP                                                 ; +0xdc, 0x48ce70\nMOV             R10, SP                                                ; +0xde, 0x48ce72\nBL              sub_775C20                                             ; +0xe0, 0x48ce74\nADD.W           R3, R4, #0x2A00                                        ; +0xe4, 0x48ce78\nMOV             R1, SP                                                 ; +0xe8, 0x48ce7c\nLDR             R0, [R3,#0x2C]                                         ; +0xea, 0x48ce7e\nBL              _ZN7cocos2d12CCDictionary12objectForKeyERKSs; cocos2d::CCDictionary::objectForKey(std::string const&) ; +0xec, 0x48ce80\nCBNZ            R0, loc_48CE98                                         ; +0xf0, 0x48ce84\nLDR.W           R0, [R8]; this                                         ; +0xf2, 0x48ce86\nMOV             R1, R7; unsigned int                                   ; +0xf6, 0x48ce8a\nBL              _ZN7cocos2d7CCArray23fastRemoveObjectAtIndexEj; cocos2d::CCArray::fastRemoveObjectAtIndex(uint) ; +0xf8, 0x48ce8c\nMOV             R0, R10                                                ; +0xfc, 0x48ce90\nBL              sub_774008                                             ; +0xfe, 0x48ce92\nB               loc_48CE2A                                             ; +0x102, 0x48ce96\nMOV             R1, R5; cocos2d::CCObject *                            ; +0x104, 0x48ce98\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x106, 0x48ce9a\nB               loc_48CE86                                             ; +0x10a, 0x48ce9e\nADDS            R7, #1                                                 ; +0x10c, 0x48cea0\nB               loc_48CE2A                                             ; +0x10e, 0x48cea2\nMOV             R0, R10                                                ; +0x110, 0x48cea4\nBL              sub_774008                                             ; +0x112, 0x48cea6\nBL              __cxa_end_cleanup                                      ; +0x116, 0x48ceaa\nMOVS            R0, #0xC; unsigned int                                 ; +0x11a, 0x48ceae\nBL              _Znwj; operator new(uint)                              ; +0x11c, 0x48ceb0\nMOVS            R2, #0                                                 ; +0x120, 0x48ceb4\nMOV             R1, R11                                                ; +0x122, 0x48ceb6\nSTR             R2, [R0]                                               ; +0x124, 0x48ceb8\nMOV             R3, R0                                                 ; +0x126, 0x48ceba\nLDR.W           R2, [R5,#0x2AC]                                        ; +0x128, 0x48cebc\nSTR             R2, [R0,#4]                                            ; +0x12c, 0x48cec0\nLDR             R2, =(off_AB5BA0 - 0x48CEC8)                           ; +0x12e, 0x48cec2\nADD             R2, PC; off_AB5BA0                                     ; +0x130, 0x48cec4\nLDR             R2, [R2]; dword_ACDD9C                                 ; +0x132, 0x48cec6\nADDS            R2, #0xC                                               ; +0x134, 0x48cec8\nSTR             R2, [R0,#8]                                            ; +0x136, 0x48ceca\nMOV             R0, R9                                                 ; +0x138, 0x48cecc\nMOV             R2, R10                                                ; +0x13a, 0x48cece\nBL              _ZNSt10_HashtableIiSt4pairIKiSsESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeEjjPNS4_10_Hash_nodeIS2_Lb0EEE; std::_Hashtable<int,std::pair<int const,std::string>,std::allocator<std::pair<int const,std::string>>,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>>::_M_insert_unique_node(uint,uint,std::__detail::_Hash_node<std::pair<int const,std::string>,false> *) ; +0x13c, 0x48ced0\nADD.W           R1, R0, #8                                             ; +0x140, 0x48ced4\nB               loc_48CE70                                             ; +0x144, 0x48ced8\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x146, 0x48ceda\nLDR             R3, [R6]                                               ; +0x148, 0x48cedc\nCMP             R2, R3                                                 ; +0x14a, 0x48cede\nBEQ             loc_48CEE6                                             ; +0x14c, 0x48cee0\nBLX             __stack_chk_fail                                       ; +0x14e, 0x48cee2\nADD             SP, SP, #0xC                                           ; +0x152, 0x48cee6\nPOP.W           {R4-R11,PC}                                            ; +0x154, 0x48cee8", "xrefs": ["PlayLayer::updateVisibility @ 0x315d64", "LevelEditorLayer::updateVisibility @ 0x3697b8"], "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"}