{"type": "func", "start": 4296075200, "end": 4296075687, "name": "GJGameState::getGameObjectPhysics", "pseudocode": "// \n// GJGameState::getGameObjectPhysics from 0x10010e7c0 to 0x10010e9a7 (487 bytes)\n// \n// 0 xrefs:\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 *__fastcall GJGameState::getGameObjectPhysics(GJGameState *a1, GameObject *a2)\n{\n  unsigned __int64 m_uniqueID; // rcx\n  std::unordered_map<int, GameObjectPhysics> *p_m_gameObjectPhysics; // r15\n  unsigned __int64 value; // rdi\n  unsigned __int64 v7; // r8\n  __int64 v8; // rsi\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, GameObjectPhysics>, void *> *> *v9; // rax\n  __int64 next; // rax\n  unsigned __int64 v11; // rdi\n  __int64 v12; // rdx\n  unsigned __int64 v13; // rdx\n  GameObjectPhysics *result; // rax\n  __int64 v15; // [rsp+0h] [rbp-50h] BYREF\n  _BYTE v16[8]; // [rsp+8h] [rbp-48h] BYREF\n  _BYTE v17[8]; // [rsp+10h] [rbp-40h] BYREF\n  __int128 v18; // [rsp+18h] [rbp-38h]\n  int v19; // [rsp+28h] [rbp-28h]\n  _DWORD v20[7]; // [rsp+34h] [rbp-1Ch] BYREF\n\n  m_uniqueID = a2->m_uniqueID;\n  v20[0] = a2->m_uniqueID;\n  p_m_gameObjectPhysics = &a1->m_gameObjectPhysics;\n  value = a1->m_gameObjectPhysics.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_;\n  if ( !value )\n    goto LABEL_27;\n  v7 = (0x101010101010101LL\n      * ((((value - ((value >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)\n        + (((value - ((value >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)\n        + ((((value - ((value >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)\n          + (((value - ((value >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4))\n       & 0xF0F0F0F0F0F0F0FLL)) >> 56;\n  if ( v7 > 1 )\n  {\n    v8 = m_uniqueID;\n    if ( value <= m_uniqueID )\n    {\n      if ( !((value | m_uniqueID) >> 32) )\n      {\n        v8 = (unsigned int)m_uniqueID % (unsigned int)value;\n        v9 = p_m_gameObjectPhysics->__table_.__bucket_list_.__ptr_.__value_[v8];\n        if ( !v9 )\n          goto LABEL_27;\n        goto LABEL_9;\n      }\n      v8 = m_uniqueID % value;\n    }\n    v9 = p_m_gameObjectPhysics->__table_.__bucket_list_.__ptr_.__value_[v8];\n    if ( !v9 )\n      goto LABEL_27;\n    goto LABEL_9;\n  }\n  v8 = m_uniqueID & (value - 1);\n  v9 = p_m_gameObjectPhysics->__table_.__bucket_list_.__ptr_.__value_[v8];\n  if ( !v9 )\n    goto LABEL_27;\nLABEL_9:\n  next = (__int64)v9->__next_;\n  if ( next )\n  {\n    if ( (unsigned int)v7 < 2 )\n    {\n      v11 = value - 1;\n      while ( 1 )\n      {\n        v12 = *(_QWORD *)(next + 8);\n        if ( v12 == m_uniqueID )\n        {\n          if ( *(_DWORD *)(next + 16) == (_DWORD)m_uniqueID )\n            goto LABEL_28;\n        }\n        else if ( (v11 & v12) != v8 )\n        {\n          goto LABEL_27;\n        }\n        next = *(_QWORD *)next;\n        if ( !next )\n          goto LABEL_27;\n      }\n    }\n    do\n    {\n      v13 = *(_QWORD *)(next + 8);\n      if ( v13 == m_uniqueID )\n      {\n        if ( *(_DWORD *)(next + 16) == (_DWORD)m_uniqueID )\n          goto LABEL_28;\n      }\n      else\n      {\n        if ( v13 >= value )\n        {\n          if ( (value | v13) >> 32 )\n            v13 %= value;\n          else\n            v13 = (unsigned int)v13 % (unsigned int)value;\n        }\n        if ( v13 != v8 )\n          break;\n      }\n      next = *(_QWORD *)next;\n    }\n    while ( next );\n  }\nLABEL_27:\n  v15 = 0;\n  sub_10028CC30(v16);\n  sub_10028CC30(v17);\n  v18 = 0;\n  v19 = 0;\n  next = sub_1001662E0(p_m_gameObjectPhysics, v20, v20, &v15);\n  *(_QWORD *)(next + 24) = a2;\nLABEL_28:\n  result = (GameObjectPhysics *)(next + 24);\n  result->m_unkInt1 = a1->m_commandIndex;\n  return result;\n}", "assembly": "; \n; GJGameState::getGameObjectPhysics from 0x10010e7c0 to 0x10010e9a7 (487 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x10010e7c0\nmov     rbp, rsp                                                       ; +0x1, 0x10010e7c1\npush    r15                                                            ; +0x4, 0x10010e7c4\npush    r14                                                            ; +0x6, 0x10010e7c6\npush    rbx                                                            ; +0x8, 0x10010e7c8\nsub     rsp, 38h                                                       ; +0x9, 0x10010e7c9\nmov     r14, rsi                                                       ; +0xd, 0x10010e7cd\nmov     rbx, rdi                                                       ; +0x10, 0x10010e7d0\nmovsxd  rcx, dword ptr [rsi+394h]                                      ; +0x13, 0x10010e7d3\nmov     [rbp+var_1C], ecx                                              ; +0x1a, 0x10010e7da\nlea     r15, [rdi+288h]                                                ; +0x1d, 0x10010e7dd\nmov     rdi, [rdi+290h]                                                ; +0x24, 0x10010e7e4\ntest    rdi, rdi                                                       ; +0x2b, 0x10010e7eb\njz      loc_10010E950                                                  ; +0x2e, 0x10010e7ee\nmov     rax, rdi                                                       ; +0x34, 0x10010e7f4\nshr     rax, 1                                                         ; +0x37, 0x10010e7f7\nmov     rdx, 5555555555555555h                                         ; +0x3a, 0x10010e7fa\nand     rdx, rax                                                       ; +0x44, 0x10010e804\nmov     rax, rdi                                                       ; +0x47, 0x10010e807\nsub     rax, rdx                                                       ; +0x4a, 0x10010e80a\nmov     rdx, 3333333333333333h                                         ; +0x4d, 0x10010e80d\nmov     rsi, rax                                                       ; +0x57, 0x10010e817\nand     rsi, rdx                                                       ; +0x5a, 0x10010e81a\nshr     rax, 2                                                         ; +0x5d, 0x10010e81d\nand     rax, rdx                                                       ; +0x61, 0x10010e821\nadd     rax, rsi                                                       ; +0x64, 0x10010e824\nmov     rdx, rax                                                       ; +0x67, 0x10010e827\nshr     rdx, 4                                                         ; +0x6a, 0x10010e82a\nadd     rdx, rax                                                       ; +0x6e, 0x10010e82e\nmov     rax, 0F0F0F0F0F0F0F0Fh                                         ; +0x71, 0x10010e831\nand     rax, rdx                                                       ; +0x7b, 0x10010e83b\nmov     r8, 101010101010101h                                           ; +0x7e, 0x10010e83e\nimul    r8, rax                                                        ; +0x88, 0x10010e848\nshr     r8, 38h                                                        ; +0x8c, 0x10010e84c\ncmp     r8, 1                                                          ; +0x90, 0x10010e850\nja      short loc_10010E86E                                            ; +0x94, 0x10010e854\nlea     rsi, [rdi-1]                                                   ; +0x96, 0x10010e856\nand     rsi, rcx                                                       ; +0x9a, 0x10010e85a\nmov     rax, [r15]                                                     ; +0x9d, 0x10010e85d\nmov     rax, [rax+rsi*8]                                               ; +0xa0, 0x10010e860\ntest    rax, rax                                                       ; +0xa4, 0x10010e864\njnz     short loc_10010E8A1                                            ; +0xa7, 0x10010e867\njmp     loc_10010E950                                                  ; +0xa9, 0x10010e869\nmov     rsi, rcx                                                       ; +0xae, 0x10010e86e\ncmp     rdi, rcx                                                       ; +0xb1, 0x10010e871\nja      short loc_10010E891                                            ; +0xb4, 0x10010e874\nmov     rax, rcx                                                       ; +0xb6, 0x10010e876\nor      rax, rdi                                                       ; +0xb9, 0x10010e879\nshr     rax, 20h                                                       ; +0xbc, 0x10010e87c\njz      loc_10010E938                                                  ; +0xc0, 0x10010e880\nmov     rax, rcx                                                       ; +0xc6, 0x10010e886\nxor     edx, edx                                                       ; +0xc9, 0x10010e889\ndiv     rdi                                                            ; +0xcb, 0x10010e88b\nmov     rsi, rdx                                                       ; +0xce, 0x10010e88e\nmov     rax, [r15]                                                     ; +0xd1, 0x10010e891\nmov     rax, [rax+rsi*8]                                               ; +0xd4, 0x10010e894\ntest    rax, rax                                                       ; +0xd8, 0x10010e898\njz      loc_10010E950                                                  ; +0xdb, 0x10010e89b\nmov     rax, [rax]                                                     ; +0xe1, 0x10010e8a1\ntest    rax, rax                                                       ; +0xe4, 0x10010e8a4\njz      loc_10010E950                                                  ; +0xe7, 0x10010e8a7\ncmp     r8d, 2                                                         ; +0xed, 0x10010e8ad\njnb     short loc_10010E901                                            ; +0xf1, 0x10010e8b1\ndec     rdi                                                            ; +0xf3, 0x10010e8b3\njmp     short loc_10010E8D1                                            ; +0xf6, 0x10010e8b6\nalign 20h                                                              ; +0xf8, 0x10010e8b8\ncmp     [rax+10h], ecx                                                 ; +0x100, 0x10010e8c0\njz      loc_10010E98F                                                  ; +0x103, 0x10010e8c3\nmov     rax, [rax]                                                     ; +0x109, 0x10010e8c9\ntest    rax, rax                                                       ; +0x10c, 0x10010e8cc\njz      short loc_10010E950                                            ; +0x10f, 0x10010e8cf\nmov     rdx, [rax+8]                                                   ; +0x111, 0x10010e8d1\ncmp     rdx, rcx                                                       ; +0x115, 0x10010e8d5\njz      short loc_10010E8C0                                            ; +0x118, 0x10010e8d8\nand     rdx, rdi                                                       ; +0x11a, 0x10010e8da\ncmp     rdx, rsi                                                       ; +0x11d, 0x10010e8dd\njz      short loc_10010E8C9                                            ; +0x120, 0x10010e8e0\njmp     short loc_10010E950                                            ; +0x122, 0x10010e8e2\nalign 10h                                                              ; +0x124, 0x10010e8e4\ncmp     [rax+10h], ecx                                                 ; +0x130, 0x10010e8f0\njz      loc_10010E98F                                                  ; +0x133, 0x10010e8f3\nmov     rax, [rax]                                                     ; +0x139, 0x10010e8f9\ntest    rax, rax                                                       ; +0x13c, 0x10010e8fc\njz      short loc_10010E950                                            ; +0x13f, 0x10010e8ff\nmov     rdx, [rax+8]                                                   ; +0x141, 0x10010e901\ncmp     rdx, rcx                                                       ; +0x145, 0x10010e905\njz      short loc_10010E8F0                                            ; +0x148, 0x10010e908\ncmp     rdx, rdi                                                       ; +0x14a, 0x10010e90a\njb      short loc_10010E931                                            ; +0x14d, 0x10010e90d\nmov     r8, rax                                                        ; +0x14f, 0x10010e90f\nmov     rax, rdx                                                       ; +0x152, 0x10010e912\nor      rax, rdi                                                       ; +0x155, 0x10010e915\nshr     rax, 20h                                                       ; +0x158, 0x10010e918\njz      short loc_10010E928                                            ; +0x15c, 0x10010e91c\nmov     rax, rdx                                                       ; +0x15e, 0x10010e91e\nxor     edx, edx                                                       ; +0x161, 0x10010e921\ndiv     rdi                                                            ; +0x163, 0x10010e923\njmp     short loc_10010E92E                                            ; +0x166, 0x10010e926\nmov     eax, edx                                                       ; +0x168, 0x10010e928\nxor     edx, edx                                                       ; +0x16a, 0x10010e92a\ndiv     edi                                                            ; +0x16c, 0x10010e92c\nmov     rax, r8                                                        ; +0x16e, 0x10010e92e\ncmp     rdx, rsi                                                       ; +0x171, 0x10010e931\njz      short loc_10010E8F9                                            ; +0x174, 0x10010e934\njmp     short loc_10010E950                                            ; +0x176, 0x10010e936\nmov     eax, ecx                                                       ; +0x178, 0x10010e938\nxor     edx, edx                                                       ; +0x17a, 0x10010e93a\ndiv     edi                                                            ; +0x17c, 0x10010e93c\nmov     esi, edx                                                       ; +0x17e, 0x10010e93e\nmov     rax, [r15]                                                     ; +0x180, 0x10010e940\nmov     rax, [rax+rsi*8]                                               ; +0x183, 0x10010e943\ntest    rax, rax                                                       ; +0x187, 0x10010e947\njnz     loc_10010E8A1                                                  ; +0x18a, 0x10010e94a\nmov     [rbp+var_50], 0                                                ; +0x190, 0x10010e950\nlea     rdi, [rbp+var_48]                                              ; +0x198, 0x10010e958\ncall    sub_10028CC30                                                  ; +0x19c, 0x10010e95c\nlea     rdi, [rbp+var_40]                                              ; +0x1a1, 0x10010e961\ncall    sub_10028CC30                                                  ; +0x1a5, 0x10010e965\nxorps   xmm0, xmm0                                                     ; +0x1aa, 0x10010e96a\nmovups  [rbp+var_38], xmm0                                             ; +0x1ad, 0x10010e96d\nmov     [rbp+var_28], 0                                                ; +0x1b1, 0x10010e971\nlea     rdx, [rbp+var_1C]                                              ; +0x1b8, 0x10010e978\nlea     rcx, [rbp+var_50]                                              ; +0x1bc, 0x10010e97c\nmov     rdi, r15                                                       ; +0x1c0, 0x10010e980\nmov     rsi, rdx                                                       ; +0x1c3, 0x10010e983\ncall    sub_1001662E0                                                  ; +0x1c6, 0x10010e986\nmov     [rax+18h], r14                                                 ; +0x1cb, 0x10010e98b\nadd     rax, 18h                                                       ; +0x1cf, 0x10010e98f\nmov     ecx, [rbx+208h]                                                ; +0x1d3, 0x10010e993\nmov     [rax+20h], ecx                                                 ; +0x1d9, 0x10010e999\nadd     rsp, 38h                                                       ; +0x1dc, 0x10010e99c\npop     rbx                                                            ; +0x1e0, 0x10010e9a0\npop     r14                                                            ; +0x1e1, 0x10010e9a1\npop     r15                                                            ; +0x1e3, 0x10010e9a3\npop     rbp                                                            ; +0x1e5, 0x10010e9a5\nretn                                                                   ; +0x1e6, 0x10010e9a6", "xrefs": [], "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"}