{"type": "func", "start": 4753036, "end": 4753292, "name": "GJGameState::getGameObjectPhysics", "pseudocode": "// \n// GJGameState::getGameObjectPhysics from 0x48868c to 0x48878c (256 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x48a1b2\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x48adf6\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  std::unordered_map<int, GameObjectPhysics> *p_m_gameObjectPhysics; // r9\n  int v5; // r0\n  GameObjectPhysics *result; // r0\n  cocos2d::CCPoint *v7; // r0\n  int v8; // r3\n  cocos2d::CCPoint *v9; // r4\n  _DWORD *p_y; // r10\n  unsigned int y_low; // r11\n  _DWORD **v12; // r0\n  _DWORD *inserted; // r5\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 v14; // [sp+4h] [bp-38h]\n  int m_uniqueID; // [sp+8h] [bp-34h] BYREF\n  float v16; // [sp+Ch] [bp-30h]\n  cocos2d::CCPoint v17; // [sp+10h] [bp-2Ch] BYREF\n  cocos2d::CCPoint v18; // [sp+18h] [bp-24h] BYREF\n  float v19; // [sp+20h] [bp-1Ch]\n  float v20; // [sp+24h] [bp-18h]\n  float v21; // [sp+28h] [bp-14h]\n  float v22; // [sp+2Ch] [bp-10h]\n  float v23; // [sp+30h] [bp-Ch]\n\n  p_m_gameObjectPhysics = &a1->m_gameObjectPhysics;\n  m_uniqueID = a2->m_uniqueID;\n  v5 = 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>>::find(\n         &a1->m_gameObjectPhysics._M_h._M_buckets,\n         &m_uniqueID);\n  if ( v5 )\n  {\n    result = (GameObjectPhysics *)(v5 + 8);\n  }\n  else\n  {\n    v16 = 0.0;\n    cocos2d::CCPoint::CCPoint(&v17);\n    cocos2d::CCPoint::CCPoint(&v18);\n    v21 = 0.0;\n    v19 = 0.0;\n    v20 = 0.0;\n    v22 = 0.0;\n    v23 = 0.0;\n    v7 = (cocos2d::CCPoint *)operator new(0x30u);\n    v8 = m_uniqueID;\n    v9 = v7;\n    v7->x = 0.0;\n    p_y = (_DWORD *)&v7->y;\n    v7 = (cocos2d::CCPoint *)((char *)v7 + 12);\n    LODWORD(v7[-1].x) = v8;\n    v7[-1].y = v16;\n    cocos2d::CCPoint::CCPoint(v7, &v17);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)((char *)v9 + 20), &v18);\n    y_low = LODWORD(v9->y);\n    v9[3].y = v19;\n    v9[4].x = v20;\n    v9[4].y = v21;\n    v9[5].x = v22;\n    v9[5].y = v23;\n    v14 = y_low % a1->m_gameObjectPhysics._M_h._M_bucket_count;\n    v12 = sub_46C5AE(p_m_gameObjectPhysics, v14, p_y);\n    if ( v12 && (inserted = *v12) != nullptr )\n      operator delete(v9);\n    else\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                   (int)p_m_gameObjectPhysics,\n                   v14,\n                   y_low,\n                   v9);\n    result = (GameObjectPhysics *)(inserted + 2);\n    inserted[2] = a2;\n  }\n  result->m_unkInt1 = a1->m_commandIndex;\n  return result;\n}", "assembly": "; \n; GJGameState::getGameObjectPhysics from 0x48868c to 0x48878c (256 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x48a1b2\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x48adf6\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          {R4-R11,LR}                                            ; +0x0, 0x48868c\nSUB             SP, SP, #0x3C                                          ; +0x4, 0x488690\nLDR             R6, =(__stack_chk_guard_ptr - 0x4886A0)                ; +0x6, 0x488692\nMOV             R8, R1                                                 ; +0x8, 0x488694\nADD.W           R9, R0, #0x25C                                         ; +0xa, 0x488696\nMOV             R7, R0                                                 ; +0xe, 0x48869a\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x48869c\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x48869e\nMOV             R0, R9                                                 ; +0x14, 0x4886a0\nLDR             R3, [R6]                                               ; +0x16, 0x4886a2\nSTR             R3, [SP,#0x3C+var_8]                                   ; +0x18, 0x4886a4\nLDR.W           R3, [R1,#0x304]                                        ; +0x1a, 0x4886a6\nADD             R1, SP, #0x3C+var_4                                    ; +0x1e, 0x4886aa\nSTR.W           R3, [R1,#-0x30]!                                       ; +0x20, 0x4886ac\nBL              _ZNSt10_HashtableIiSt4pairIKi17GameObjectPhysicsESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; 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>>::find(int const&) ; +0x24, 0x4886b0\nMOV             R5, R0                                                 ; +0x28, 0x4886b4\nCBZ             R0, loc_4886BC                                         ; +0x2a, 0x4886b6\nADDS            R0, #8                                                 ; +0x2c, 0x4886b8\nB               loc_488774                                             ; +0x2e, 0x4886ba\nADD             R1, SP, #0x3C+var_2C                                   ; +0x30, 0x4886bc\nADD.W           R11, SP, #0x3C+var_24                                  ; +0x32, 0x4886be\nSTR             R0, [SP,#0x3C+var_30]                                  ; +0x36, 0x4886c2\nMOV             R0, R1; this                                           ; +0x38, 0x4886c4\nSTR             R1, [SP,#0x3C+var_38]                                  ; +0x3a, 0x4886c6\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x3c, 0x4886c8\nMOV             R0, R11; this                                          ; +0x40, 0x4886cc\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x42, 0x4886ce\nMOVS            R0, #0x30 ; '0'; unsigned int                          ; +0x46, 0x4886d2\nMOVS            R3, #0                                                 ; +0x48, 0x4886d4\nSTR             R5, [SP,#0x3C+var_14]                                  ; +0x4a, 0x4886d6\nSTR             R3, [SP,#0x3C+var_1C]                                  ; +0x4c, 0x4886d8\nSTR             R3, [SP,#0x3C+var_18]                                  ; +0x4e, 0x4886da\nSTR             R5, [SP,#0x3C+var_10]                                  ; +0x50, 0x4886dc\nSTR             R5, [SP,#0x3C+var_C]                                   ; +0x52, 0x4886de\nBL              _Znwj; operator new(uint)                              ; +0x54, 0x4886e0\nLDR             R3, [SP,#0x3C+var_34]                                  ; +0x58, 0x4886e4\nLDR             R1, [SP,#0x3C+var_38]; cocos2d::CCPoint *              ; +0x5a, 0x4886e6\nMOV             R10, R0                                                ; +0x5c, 0x4886e8\nMOV             R4, R0                                                 ; +0x5e, 0x4886ea\nSTR.W           R5, [R10],#4                                           ; +0x60, 0x4886ec\nADDS            R0, #0xC; this                                         ; +0x64, 0x4886f0\nSTR.W           R3, [R0,#-8]                                           ; +0x66, 0x4886f2\nLDR             R3, [SP,#0x3C+var_30]                                  ; +0x6a, 0x4886f6\nSTR.W           R3, [R0,#-4]                                           ; +0x6c, 0x4886f8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x70, 0x4886fc\nADD.W           R0, R4, #0x14; this                                    ; +0x74, 0x488700\nMOV             R1, R11; cocos2d::CCPoint *                            ; +0x78, 0x488704\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x7a, 0x488706\nLDR             R3, [SP,#0x3C+var_1C]                                  ; +0x7e, 0x48870a\nLDR.W           R11, [R4,#4]                                           ; +0x80, 0x48870c\nSTR             R3, [R4,#0x1C]                                         ; +0x84, 0x488710\nLDR             R3, [SP,#0x3C+var_18]                                  ; +0x86, 0x488712\nMOV             R0, R11                                                ; +0x88, 0x488714\nSTR             R3, [R4,#0x20]                                         ; +0x8a, 0x488716\nLDR             R3, [SP,#0x3C+var_14]                                  ; +0x8c, 0x488718\nSTR             R3, [R4,#0x24]                                         ; +0x8e, 0x48871a\nLDR             R3, [SP,#0x3C+var_10]                                  ; +0x90, 0x48871c\nSTR             R3, [R4,#0x28]                                         ; +0x92, 0x48871e\nLDR             R3, [SP,#0x3C+var_C]                                   ; +0x94, 0x488720\nSTR             R3, [R4,#0x2C]                                         ; +0x96, 0x488722\nLDR.W           R1, [R7,#0x260]                                        ; +0x98, 0x488724\nBLX             __aeabi_uidivmod                                       ; +0x9c, 0x488728\nMOV             R0, R9                                                 ; +0xa0, 0x48872c\nMOV             R2, R10                                                ; +0xa2, 0x48872e\nSTR             R1, [SP,#0x3C+var_38]                                  ; +0xa4, 0x488730\nBL              sub_46C5AE                                             ; +0xa6, 0x488732\nLDR             R3, [SP,#0x3C+var_38]                                  ; +0xaa, 0x488736\nCBNZ            R0, loc_488752                                         ; +0xac, 0x488738\nB               loc_48875E                                             ; +0xae, 0x48873a\nBL              __cxa_begin_catch                                      ; +0xb0, 0x48873c\nMOV             R0, R4; p                                              ; +0xb4, 0x488740\nBL              _ZdlPv; operator delete(void *)                        ; +0xb6, 0x488742\nBL              __cxa_rethrow                                          ; +0xba, 0x488746\nBL              __cxa_end_catch                                        ; +0xbe, 0x48874a\nBL              __cxa_end_cleanup                                      ; +0xc2, 0x48874e\nLDR             R5, [R0]                                               ; +0xc6, 0x488752\nCBZ             R5, loc_48875E                                         ; +0xc8, 0x488754\nMOV             R0, R4; p                                              ; +0xca, 0x488756\nBL              _ZdlPv; operator delete(void *)                        ; +0xcc, 0x488758\nB               loc_48876C                                             ; +0xd0, 0x48875c\nMOV             R1, R3                                                 ; +0xd2, 0x48875e\nMOV             R0, R9                                                 ; +0xd4, 0x488760\nMOV             R2, R11                                                ; +0xd6, 0x488762\nMOV             R3, R4                                                 ; +0xd8, 0x488764\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_nodeEjjPNS5_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(uint,uint,std::__detail::_Hash_node<std::pair<int const,GameObjectPhysics>,false> *) ; +0xda, 0x488766\nMOV             R5, R0                                                 ; +0xde, 0x48876a\nADD.W           R0, R5, #8                                             ; +0xe0, 0x48876c\nSTR.W           R8, [R5,#8]                                            ; +0xe4, 0x488770\nLDR.W           R3, [R7,#0x1F0]                                        ; +0xe8, 0x488774\nLDR             R2, [SP,#0x3C+var_8]                                   ; +0xec, 0x488778\nSTR             R3, [R0,#0x1C]                                         ; +0xee, 0x48877a\nLDR             R3, [R6]                                               ; +0xf0, 0x48877c\nCMP             R2, R3                                                 ; +0xf2, 0x48877e\nBEQ             loc_488786                                             ; +0xf4, 0x488780\nBLX             __stack_chk_fail                                       ; +0xf6, 0x488782\nADD             SP, SP, #0x3C ; '<'                                    ; +0xfa, 0x488786\nPOP.W           {R4-R11,PC}                                            ; +0xfc, 0x488788", "xrefs": ["GJBaseGameLayer::processAdvancedFollowAction @ 0x48a1b2", "GJBaseGameLayer::processAdvancedFollowAction @ 0x48adf6"], "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"}