{"type": "func", "start": 4824840, "end": 4824986, "name": "GJEffectManager::checkCollision", "pseudocode": "// \n// GJEffectManager::checkCollision from 0x499f08 to 0x499f9a (146 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::checkCollision @ 0x46ff36\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\nbool GJEffectManager::checkCollision(GJEffectManager *a1, const int *a2, const int *a3)\n{\n  int v4; // r1\n  int v5; // r3\n  char *CollisionKey; // r0\n  std::_Hashtable<int, std::pair<const int, bool>, std::allocator<std::pair<const int, bool>>, 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 M_bucket_count; // r8\n  std::_Hashtable<int, std::pair<const int, bool>, std::allocator<std::pair<const int, bool>>, 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>>::__bucket_type v8; // r4\n  std::__detail::_Hash_node_base *M_nxt; // r5\n  bool result; // r0\n  int v11; // [sp+4h] [bp-10h] BYREF\n  int v12; // [sp+8h] [bp-Ch] BYREF\n\n  v4 = *a2;\n  if ( v4 > 10001 )\n    return 0;\n  v5 = *a3;\n  if ( v4 < *a3 )\n    v11 = *a3;\n  else\n    v11 = v4;\n  if ( v4 > v5 )\n    v12 = v5;\n  else\n    v12 = v4;\n  CollisionKey = getCollisionKey(&v11, &v12);\n  M_bucket_count = a1->m_unkMap288._M_h._M_bucket_count;\n  v8 = a1->m_unkMap288._M_h._M_buckets[(unsigned int)CollisionKey % M_bucket_count];\n  if ( v8 )\n  {\n    M_nxt = v8->_M_nxt;\n    if ( v8->_M_nxt )\n    {\n      v8 = nullptr;\n      do\n      {\n        if ( CollisionKey == (char *)M_nxt[1]._M_nxt )\n        {\n          v8 = (std::_Hashtable<int, std::pair<const int, bool>, std::allocator<std::pair<const int, bool>>, 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>>::__bucket_type)((char *)v8 + 1);\n        }\n        else if ( v8 )\n        {\n          break;\n        }\n        M_nxt = M_nxt->_M_nxt;\n      }\n      while ( M_nxt && (unsigned int)M_nxt[1]._M_nxt % M_bucket_count == (unsigned int)CollisionKey % M_bucket_count );\n    }\n    else\n    {\n      v8 = nullptr;\n    }\n  }\n  result = (char)v8;\n  if ( v8 )\n    return 1;\n  return result;\n}", "assembly": "; \n; GJEffectManager::checkCollision from 0x499f08 to 0x499f9a (146 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::checkCollision @ 0x46ff36\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 - 0x499F12)                ; +0x0, 0x499f08\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x499f0a\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x499f0e\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x499f10\nMOV             R4, R0                                                 ; +0xa, 0x499f12\nSUB             SP, SP, #0x14                                          ; +0xc, 0x499f14\nLDR             R0, [R3]                                               ; +0xe, 0x499f16\nMOV             R6, R3                                                 ; +0x10, 0x499f18\nLDR             R1, [R1]                                               ; +0x12, 0x499f1a\nSTR             R0, [SP,#0x14+var_8]                                   ; +0x14, 0x499f1c\nMOVW            R0, #0x2711                                            ; +0x16, 0x499f1e\nCMP             R1, R0                                                 ; +0x1a, 0x499f22\nBGT             loc_499F86                                             ; +0x1c, 0x499f24\nLDR             R3, [R2]                                               ; +0x1e, 0x499f26\nADD             R0, SP, #0x14+var_10; int *                            ; +0x20, 0x499f28\nCMP             R1, R3                                                 ; +0x22, 0x499f2a\nITE GE                                                                 ; +0x24, 0x499f2c\nSTRGE           R1, [SP,#0x14+var_10]                                  ; +0x26, 0x499f2e\nSTRLT           R3, [SP,#0x14+var_10]                                  ; +0x28, 0x499f30\nCMP             R1, R3                                                 ; +0x2a, 0x499f32\nITE LE                                                                 ; +0x2c, 0x499f34\nSTRLE           R1, [SP,#0x14+var_C]                                   ; +0x2e, 0x499f36\nSTRGT           R3, [SP,#0x14+var_C]                                   ; +0x30, 0x499f38\nADD             R1, SP, #0x14+var_C; int *                             ; +0x32, 0x499f3a\nBL              _Z15getCollisionKeyRKiS0_; getCollisionKey(int const&,int const&) ; +0x34, 0x499f3c\nLDR.W           R8, [R4,#0x1B0]                                        ; +0x38, 0x499f40\nMOV             R1, R8                                                 ; +0x3c, 0x499f44\nMOV             R9, R0                                                 ; +0x3e, 0x499f46\nBLX             __aeabi_uidivmod                                       ; +0x40, 0x499f48\nLDR.W           R3, [R4,#0x1AC]                                        ; +0x44, 0x499f4c\nLDR.W           R4, [R3,R1,LSL#2]                                      ; +0x48, 0x499f50\nMOV             R7, R1                                                 ; +0x4c, 0x499f54\nCBZ             R4, loc_499F7E                                         ; +0x4e, 0x499f56\nLDR             R5, [R4]                                               ; +0x50, 0x499f58\nCBZ             R5, loc_499F7C                                         ; +0x52, 0x499f5a\nMOVS            R4, #0                                                 ; +0x54, 0x499f5c\nLDR             R3, [R5,#4]                                            ; +0x56, 0x499f5e\nCMP             R9, R3                                                 ; +0x58, 0x499f60\nBNE             loc_499F68                                             ; +0x5a, 0x499f62\nADDS            R4, #1                                                 ; +0x5c, 0x499f64\nB               loc_499F6A                                             ; +0x5e, 0x499f66\nCBNZ            R4, loc_499F7E                                         ; +0x60, 0x499f68\nLDR             R5, [R5]                                               ; +0x62, 0x499f6a\nCBZ             R5, loc_499F7E                                         ; +0x64, 0x499f6c\nLDR             R0, [R5,#4]                                            ; +0x66, 0x499f6e\nMOV             R1, R8                                                 ; +0x68, 0x499f70\nBLX             __aeabi_uidivmod                                       ; +0x6a, 0x499f72\nCMP             R1, R7                                                 ; +0x6e, 0x499f76\nBEQ             loc_499F5E                                             ; +0x70, 0x499f78\nB               loc_499F7E                                             ; +0x72, 0x499f7a\nMOV             R4, R5                                                 ; +0x74, 0x499f7c\nMOVS            R0, R4                                                 ; +0x76, 0x499f7e\nIT NE                                                                  ; +0x78, 0x499f80\nMOVNE           R0, #1                                                 ; +0x7a, 0x499f82\nB               loc_499F88                                             ; +0x7c, 0x499f84\nMOVS            R0, #0                                                 ; +0x7e, 0x499f86\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x80, 0x499f88\nLDR             R3, [R6]                                               ; +0x82, 0x499f8a\nCMP             R2, R3                                                 ; +0x84, 0x499f8c\nBEQ             loc_499F94                                             ; +0x86, 0x499f8e\nBLX             __stack_chk_fail                                       ; +0x88, 0x499f90\nADD             SP, SP, #0x14                                          ; +0x8c, 0x499f94\nPOP.W           {R4-R9,PC}                                             ; +0x8e, 0x499f96", "xrefs": ["GJBaseGameLayer::checkCollision @ 0x46ff36"], "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"}