{"type": "func", "start": 8915712, "end": 8916256, "name": "GJGameState::getGameObjectPhysics", "pseudocode": "// \n// GJGameState::getGameObjectPhysics from 0x880b00 to 0x880d20 (544 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x883bb4\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x884050\n// > <???> @ 0x303a8\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\nGameObjectPhysics *GJGameState::getGameObjectPhysics(GJGameState *a1, GameObject *a2)\n{\n  int m_uniqueID; // w22\n  std::_Hashtable<int, std::pair<const int, GameObjectPhysics>, std::allocator<std::pair<const int, GameObjectPhysics>>, 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; // x4\n  unsigned __int64 v6; // x5\n  std::_Hashtable<int, std::pair<const int, GameObjectPhysics>, std::allocator<std::pair<const int, GameObjectPhysics>>, 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 v7; // x6\n  std::__detail::_Hash_node_base *M_nxt; // x2\n  int v9; // w0\n  GameObjectPhysics *v10; // x1\n  __int64 v12; // x23\n  std::_Hashtable<int, std::pair<const int, GameObjectPhysics>, std::allocator<std::pair<const int, GameObjectPhysics>>, 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 v13; // x6\n  int v14; // w8\n  std::_Hashtable<int, std::pair<const int, GameObjectPhysics>, std::allocator<std::pair<const int, GameObjectPhysics>>, 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 *M_buckets; // x0\n  unsigned __int64 v16; // x1\n  char **v17; // x7\n  char *v18; // x4\n  int v19; // w0\n  char *inserted; // x22\n  cocos2d::CCPoint v21; // [xsp+60h] [xbp+60h] BYREF\n  cocos2d::CCPoint v22; // [xsp+68h] [xbp+68h] BYREF\n  int v23; // [xsp+70h] [xbp+70h]\n  int v24; // [xsp+74h] [xbp+74h]\n  int v25; // [xsp+78h] [xbp+78h]\n  int v26; // [xsp+7Ch] [xbp+7Ch]\n  int v27; // [xsp+80h] [xbp+80h]\n\n  m_uniqueID = a2->m_uniqueID;\n  M_bucket_count = a1->m_gameObjectPhysics._M_h._M_bucket_count;\n  v6 = m_uniqueID % M_bucket_count;\n  v7 = a1->m_gameObjectPhysics._M_h._M_buckets[v6];\n  if ( !v7 )\n    goto LABEL_8;\n  M_nxt = v7->_M_nxt;\n  if ( m_uniqueID != LODWORD(v7->_M_nxt[1]._M_nxt) )\n  {\n    while ( M_nxt->_M_nxt )\n    {\n      v9 = (int)M_nxt->_M_nxt[1]._M_nxt;\n      v7 = M_nxt;\n      if ( v6 != v9 % M_bucket_count )\n        break;\n      M_nxt = M_nxt->_M_nxt;\n      if ( m_uniqueID == v9 )\n        goto LABEL_6;\n    }\nLABEL_8:\n    cocos2d::CCPoint::CCPoint(&v21);\n    cocos2d::CCPoint::CCPoint(&v22);\n    v25 = 0;\n    v26 = 0;\n    v27 = 0;\n    v23 = 0;\n    v24 = 0;\n    v12 = operator new(0x40u);\n    *(_QWORD *)v12 = 0;\n    *(_DWORD *)(v12 + 8) = m_uniqueID;\n    *(_QWORD *)(v12 + 16) = 0;\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v12 + 24), &v21);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v12 + 32), &v22);\n    *(_DWORD *)(v12 + 48) = v25;\n    *(_DWORD *)(v12 + 52) = v26;\n    *(_DWORD *)(v12 + 56) = v27;\n    v13 = a1->m_gameObjectPhysics._M_h._M_bucket_count;\n    v14 = *(_DWORD *)(v12 + 8);\n    M_buckets = a1->m_gameObjectPhysics._M_h._M_buckets;\n    *(_DWORD *)(v12 + 40) = v23;\n    *(_DWORD *)(v12 + 44) = v24;\n    v16 = v14 % v13;\n    v17 = (char **)M_buckets[v16];\n    if ( v17 )\n    {\n      v18 = *v17;\n      if ( *((_DWORD *)*v17 + 2) == v14 )\n      {\nLABEL_13:\n        inserted = *v17;\n        if ( *v17 )\n        {\n          operator delete((void *)v12);\nLABEL_15:\n          v10 = (GameObjectPhysics *)(inserted + 16);\n          *((_QWORD *)inserted + 2) = a2;\n          goto LABEL_7;\n        }\n      }\n      else\n      {\n        while ( *(_QWORD *)v18 )\n        {\n          v19 = *(_DWORD *)(*(_QWORD *)v18 + 8LL);\n          v17 = (char **)v18;\n          if ( v16 != v19 % v13 )\n            break;\n          v18 = *(char **)v18;\n          if ( v19 == v14 )\n            goto LABEL_13;\n        }\n      }\n    }\n    inserted = std::_Hashtable<int,std::pair<int const,GameObjectPhysics>,std::allocator<std::pair<int const,GameObjectPhysics>>,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                 (char **)&a1->m_gameObjectPhysics,\n                 v16,\n                 v14,\n                 (char *)v12);\n    goto LABEL_15;\n  }\nLABEL_6:\n  v10 = (GameObjectPhysics *)&v7->_M_nxt[2];\n  if ( !v7->_M_nxt )\n    goto LABEL_8;\nLABEL_7:\n  v10->m_unkInt1 = a1->m_commandIndex;\n  return v10;\n}", "assembly": "; \n; GJGameState::getGameObjectPhysics from 0x880b00 to 0x880d20 (544 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x883bb4\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x884050\n; > <???> @ 0x303a8\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\nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x880b00\nMOV             X29, SP                                                ; +0x4, 0x880b04\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x8, 0x880b08\nLDR             W22, [X1,#0x384]                                       ; +0xc, 0x880b0c\nMOV             X21, X1                                                ; +0x10, 0x880b10\nLDR             X4, [X0,#0x2C0]                                        ; +0x14, 0x880b14\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0x18, 0x880b18\nSXTW            X5, W22                                                ; +0x1c, 0x880b1c\nLDR             X1, [X0,#0x2B8]                                        ; +0x20, 0x880b20\nMOV             X20, X0                                                ; +0x24, 0x880b24\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x28, 0x880b28\nUDIV            X0, X5, X4                                             ; +0x2c, 0x880b2c\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x30, 0x880b30\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x34, 0x880b34\nLDR             X2, [X2]                                               ; +0x38, 0x880b38\nSTR             X2, [X29,#0x90+var_8]                                  ; +0x3c, 0x880b3c\nNOP                                                                    ; +0x40, 0x880b40\nMSUB            X5, X0, X4, X5                                         ; +0x44, 0x880b44\nLDR             X6, [X1,X5,LSL#3]                                      ; +0x48, 0x880b48\nCBZ             X6, loc_880BD0                                         ; +0x4c, 0x880b4c\nLDR             X2, [X6]                                               ; +0x50, 0x880b50\nLDR             W0, [X2,#8]                                            ; +0x54, 0x880b54\nCMP             W22, W0                                                ; +0x58, 0x880b58\nB.EQ            loc_880B90                                             ; +0x5c, 0x880b5c\nLDR             X1, [X2]                                               ; +0x60, 0x880b60\nCBZ             X1, loc_880BD0                                         ; +0x64, 0x880b64\nLDR             W0, [X1,#8]                                            ; +0x68, 0x880b68\nMOV             X6, X2                                                 ; +0x6c, 0x880b6c\nSXTW            X3, W0                                                 ; +0x70, 0x880b70\nUDIV            X2, X3, X4                                             ; +0x74, 0x880b74\nMSUB            X2, X2, X4, X3                                         ; +0x78, 0x880b78\nCMP             X5, X2                                                 ; +0x7c, 0x880b7c\nB.NE            loc_880BD0                                             ; +0x80, 0x880b80\nCMP             W22, W0                                                ; +0x84, 0x880b84\nMOV             X2, X1                                                 ; +0x88, 0x880b88\nB.NE            loc_880B60                                             ; +0x8c, 0x880b8c\nLDR             X0, [X6]                                               ; +0x90, 0x880b90\nADD             X1, X0, #0x10                                          ; +0x94, 0x880b94\nCBZ             X0, loc_880BD0                                         ; +0x98, 0x880b98\nLDR             W2, [X20,#0x228]                                       ; +0x9c, 0x880b9c\nMOV             X0, X1                                                 ; +0xa0, 0x880ba0\nSTR             W2, [X1,#0x20]                                         ; +0xa4, 0x880ba4\nLDR             X2, [X29,#0x90+var_8]                                  ; +0xa8, 0x880ba8\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xac, 0x880bac\nLDR             X1, [X19]                                              ; +0xb0, 0x880bb0\nCMP             X2, X1                                                 ; +0xb4, 0x880bb4\nB.NE            loc_880D0C                                             ; +0xb8, 0x880bb8\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0xbc, 0x880bbc\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0xc0, 0x880bc0\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0xc4, 0x880bc4\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0xc8, 0x880bc8\nRET                                                                    ; +0xcc, 0x880bcc\nADD             X24, X29, #0x90+var_38                                 ; +0xd0, 0x880bd0\nSTR             XZR, [X29,#0x90+var_38]                                ; +0xd4, 0x880bd4\nADD             X1, X24, #8                                            ; +0xd8, 0x880bd8\nSTR             X1, [X29,#0x90+var_48]                                 ; +0xdc, 0x880bdc\nMOV             X0, X1; this                                           ; +0xe0, 0x880be0\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xe4, 0x880be4\nADD             X0, X24, #0x10; this                                   ; +0xe8, 0x880be8\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xec, 0x880bec\nSTR             WZR, [X29,#0x90+var_18]                                ; +0xf0, 0x880bf0\nFMOV            S0, WZR                                                ; +0xf4, 0x880bf4\nMOV             X0, #0x40 ; '@'; unsigned __int64                      ; +0xf8, 0x880bf8\nSTR             WZR, [X29,#0x90+var_14]                                ; +0xfc, 0x880bfc\nSTR             WZR, [X29,#0x90+var_10]                                ; +0x100, 0x880c00\nSTR             S0, [X29,#0x90+var_20]                                 ; +0x104, 0x880c04\nSTR             S0, [X29,#0x90+var_1C]                                 ; +0x108, 0x880c08\nBL              _Znwm; operator new(ulong)                             ; +0x10c, 0x880c0c\nMOV             X23, X0                                                ; +0x110, 0x880c10\nLDR             X2, [X29,#0x90+var_38]                                 ; +0x114, 0x880c14\nLDR             X1, [X29,#0x90+var_48]; cocos2d::CCPoint *             ; +0x118, 0x880c18\nADD             X0, X0, #0x18; this                                    ; +0x11c, 0x880c1c\nSTR             XZR, [X23]                                             ; +0x120, 0x880c20\nSTR             W22, [X23,#8]                                          ; +0x124, 0x880c24\nSTR             X2, [X23,#0x10]                                        ; +0x128, 0x880c28\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x12c, 0x880c2c\nADD             X22, X23, #0x10                                        ; +0x130, 0x880c30\nADD             X1, X24, #0x10; cocos2d::CCPoint *                     ; +0x134, 0x880c34\nADD             X0, X22, #0x10; this                                   ; +0x138, 0x880c38\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x13c, 0x880c3c\nLDR             W0, [X29,#0x90+var_18]                                 ; +0x140, 0x880c40\nSTR             W0, [X22,#0x20]                                        ; +0x144, 0x880c44\nLDR             W0, [X29,#0x90+var_14]                                 ; +0x148, 0x880c48\nSTR             W0, [X22,#0x24]                                        ; +0x14c, 0x880c4c\nLDR             W0, [X29,#0x90+var_10]                                 ; +0x150, 0x880c50\nSTR             W0, [X22,#0x28]                                        ; +0x154, 0x880c54\nLDR             X6, [X20,#0x2C0]                                       ; +0x158, 0x880c58\nLDR             W8, [X23,#8]                                           ; +0x15c, 0x880c5c\nLDR             W3, [X29,#0x90+var_20]                                 ; +0x160, 0x880c60\nLDR             X0, [X20,#0x2B8]                                       ; +0x164, 0x880c64\nSXTW            X2, W8                                                 ; +0x168, 0x880c68\nUDIV            X1, X2, X6                                             ; +0x16c, 0x880c6c\nSTR             W3, [X22,#0x18]                                        ; +0x170, 0x880c70\nLDR             W3, [X29,#0x90+var_1C]                                 ; +0x174, 0x880c74\nSTR             W3, [X22,#0x1C]                                        ; +0x178, 0x880c78\nNOP                                                                    ; +0x17c, 0x880c7c\nMSUB            X1, X1, X6, X2                                         ; +0x180, 0x880c80\nLDR             X7, [X0,X1,LSL#3]                                      ; +0x184, 0x880c84\nCBZ             X7, loc_880CE8                                         ; +0x188, 0x880c88\nLDR             X4, [X7]                                               ; +0x18c, 0x880c8c\nLDR             W0, [X4,#8]                                            ; +0x190, 0x880c90\nCMP             W0, W8                                                 ; +0x194, 0x880c94\nB.EQ            loc_880CCC                                             ; +0x198, 0x880c98\nLDR             X3, [X4]                                               ; +0x19c, 0x880c9c\nCBZ             X3, loc_880CE8                                         ; +0x1a0, 0x880ca0\nLDR             W0, [X3,#8]                                            ; +0x1a4, 0x880ca4\nMOV             X7, X4                                                 ; +0x1a8, 0x880ca8\nSXTW            X5, W0                                                 ; +0x1ac, 0x880cac\nUDIV            X4, X5, X6                                             ; +0x1b0, 0x880cb0\nMSUB            X4, X4, X6, X5                                         ; +0x1b4, 0x880cb4\nCMP             X1, X4                                                 ; +0x1b8, 0x880cb8\nB.NE            loc_880CE8                                             ; +0x1bc, 0x880cbc\nCMP             W0, W8                                                 ; +0x1c0, 0x880cc0\nMOV             X4, X3                                                 ; +0x1c4, 0x880cc4\nB.NE            loc_880C9C                                             ; +0x1c8, 0x880cc8\nLDR             X22, [X7]                                              ; +0x1cc, 0x880ccc\nCBZ             X22, loc_880CE8                                        ; +0x1d0, 0x880cd0\nMOV             X0, X23; p                                             ; +0x1d4, 0x880cd4\nBL              _ZdlPv; operator delete(void *)                        ; +0x1d8, 0x880cd8\nADD             X1, X22, #0x10                                         ; +0x1dc, 0x880cdc\nSTR             X21, [X22,#0x10]                                       ; +0x1e0, 0x880ce0\nB               loc_880B9C                                             ; +0x1e4, 0x880ce4\nADD             X0, X20, #0x2B8                                        ; +0x1e8, 0x880ce8\nMOV             X3, X23                                                ; +0x1ec, 0x880cec\nBL              _ZNSt10_HashtableIiSt4pairIKi17GameObjectPhysicsESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeEmmPNS5_10_Hash_nodeIS3_Lb0EEE; std::_Hashtable<int,std::pair<int const,GameObjectPhysics>,std::allocator<std::pair<int const,GameObjectPhysics>>,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(ulong,ulong,std::__detail::_Hash_node<std::pair<int const,GameObjectPhysics>,false> *) ; +0x1f0, 0x880cf0\nMOV             X22, X0                                                ; +0x1f4, 0x880cf4\nB               loc_880CDC                                             ; +0x1f8, 0x880cf8\nBL              __cxa_begin_catch                                      ; +0x1fc, 0x880cfc\nMOV             X0, X23; p                                             ; +0x200, 0x880d00\nBL              _ZdlPv; operator delete(void *)                        ; +0x204, 0x880d04\nBL              __cxa_rethrow                                          ; +0x208, 0x880d08\nBL              .__stack_chk_fail                                      ; +0x20c, 0x880d0c\nSTR             X0, [X29,#0x90+var_48]                                 ; +0x210, 0x880d10\nBL              __cxa_end_catch                                        ; +0x214, 0x880d14\nLDR             X0, [X29,#0x90+var_48]                                 ; +0x218, 0x880d18\nBL              _Unwind_Resume                                         ; +0x21c, 0x880d1c", "xrefs": ["GJBaseGameLayer::processAdvancedFollowAction @ 0x883bb4", "GJBaseGameLayer::processAdvancedFollowAction @ 0x884050", "<???> @ 0x303a8"], "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"}