{"type": "func", "start": 4298001808, "end": 4298002157, "name": "GJEffectManager::tryGetMoveCommandNode", "pseudocode": "// \n// GJEffectManager::tryGetMoveCommandNode from 0x1002e4d90 to 0x1002e4eed (349 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::processMoveActionsStep @ 0x100144619\n// > GJBaseGameLayer::update @ 0x1001520ea\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\nCCMoveCNode *__fastcall GJEffectManager::tryGetMoveCommandNode(GJEffectManager *a1, int a2)\n{\n  unsigned __int64 value; // r10\n  unsigned __int64 v3; // r8\n  unsigned __int64 v4; // r9\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, CCMoveCNode *>, void *> *> *v6; // rax\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, CCMoveCNode *>, void *> *>::__next_pointer next; // rdi\n  unsigned __int64 v8; // r10\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, CCMoveCNode *>, void *> *>::__next_pointer v9; // rax\n  unsigned __int64 v10; // rax\n\n  value = a1->m_unkMap618.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_;\n  if ( !value )\n    return nullptr;\n  v3 = (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 ( v3 > 1 )\n  {\n    v4 = a2;\n    if ( value <= a2 )\n    {\n      if ( (value | a2) >> 32 )\n        v4 = a2 % value;\n      else\n        v4 = a2 % (unsigned int)value;\n    }\n  }\n  else\n  {\n    v4 = a2 & (value - 1);\n  }\n  v6 = a1->m_unkMap618.__table_.__bucket_list_.__ptr_.__value_[v4];\n  if ( !v6 )\n    return nullptr;\n  next = v6->__next_;\n  if ( !v6->__next_ )\n    return nullptr;\n  if ( (unsigned int)v3 < 2 )\n  {\n    v8 = value - 1;\n    while ( 1 )\n    {\n      v9 = next[1].__next_;\n      if ( v9 == (std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, CCMoveCNode *>, void *> *>::__next_pointer)a2 )\n      {\n        if ( LODWORD(next[2].__next_) == a2 )\n          return (CCMoveCNode *)next[3].__next_;\n      }\n      else if ( (v8 & (unsigned __int64)v9) != v4 )\n      {\n        return nullptr;\n      }\n      next = next->__next_;\n      if ( !next )\n        return nullptr;\n    }\n  }\n  while ( 1 )\n  {\n    v10 = (unsigned __int64)next[1].__next_;\n    if ( v10 == a2 )\n      break;\n    if ( v10 < value )\n      goto LABEL_26;\n    if ( (value | v10) >> 32 )\n    {\n      v10 %= value;\nLABEL_26:\n      if ( v10 != v4 )\n        return nullptr;\n      goto LABEL_21;\n    }\n    if ( (unsigned int)v10 % (unsigned int)value != v4 )\n      return nullptr;\nLABEL_21:\n    next = next->__next_;\n    if ( !next )\n      return nullptr;\n  }\n  if ( LODWORD(next[2].__next_) != a2 )\n    goto LABEL_21;\n  return (CCMoveCNode *)next[3].__next_;\n}", "assembly": "; \n; GJEffectManager::tryGetMoveCommandNode from 0x1002e4d90 to 0x1002e4eed (349 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::processMoveActionsStep @ 0x100144619\n; > GJBaseGameLayer::update @ 0x1001520ea\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\nmov     r10, [rdi+568h]                                                ; +0x0, 0x1002e4d90\ntest    r10, r10                                                       ; +0x7, 0x1002e4d97\njz      short loc_1002E4E0A                                            ; +0xa, 0x1002e4d9a\nmovsxd  rcx, esi                                                       ; +0xc, 0x1002e4d9c\nmov     rax, r10                                                       ; +0xf, 0x1002e4d9f\nshr     rax, 1                                                         ; +0x12, 0x1002e4da2\nmov     rdx, 5555555555555555h                                         ; +0x15, 0x1002e4da5\nand     rdx, rax                                                       ; +0x1f, 0x1002e4daf\nmov     rax, r10                                                       ; +0x22, 0x1002e4db2\nsub     rax, rdx                                                       ; +0x25, 0x1002e4db5\nmov     rdx, 3333333333333333h                                         ; +0x28, 0x1002e4db8\nmov     r8, rax                                                        ; +0x32, 0x1002e4dc2\nand     r8, rdx                                                        ; +0x35, 0x1002e4dc5\nshr     rax, 2                                                         ; +0x38, 0x1002e4dc8\nand     rax, rdx                                                       ; +0x3c, 0x1002e4dcc\nadd     rax, r8                                                        ; +0x3f, 0x1002e4dcf\nmov     rdx, rax                                                       ; +0x42, 0x1002e4dd2\nshr     rdx, 4                                                         ; +0x45, 0x1002e4dd5\nadd     rdx, rax                                                       ; +0x49, 0x1002e4dd9\nmov     rax, 0F0F0F0F0F0F0F0Fh                                         ; +0x4c, 0x1002e4ddc\nand     rax, rdx                                                       ; +0x56, 0x1002e4de6\nmov     r8, 101010101010101h                                           ; +0x59, 0x1002e4de9\nimul    r8, rax                                                        ; +0x63, 0x1002e4df3\nshr     r8, 38h                                                        ; +0x67, 0x1002e4df7\ncmp     r8, 1                                                          ; +0x6b, 0x1002e4dfb\nja      short loc_1002E4E11                                            ; +0x6f, 0x1002e4dff\nlea     r9, [r10-1]                                                    ; +0x71, 0x1002e4e01\nand     r9, rcx                                                        ; +0x75, 0x1002e4e05\njmp     short loc_1002E4E3C                                            ; +0x78, 0x1002e4e08\nxor     r8d, r8d                                                       ; +0x7a, 0x1002e4e0a\nmov     rax, r8                                                        ; +0x7d, 0x1002e4e0d\nretn                                                                   ; +0x80, 0x1002e4e10\nmov     r9, rcx                                                        ; +0x81, 0x1002e4e11\ncmp     r10, rcx                                                       ; +0x84, 0x1002e4e14\nja      short loc_1002E4E3C                                            ; +0x87, 0x1002e4e17\nmov     rax, rcx                                                       ; +0x89, 0x1002e4e19\nor      rax, r10                                                       ; +0x8c, 0x1002e4e1c\nshr     rax, 20h                                                       ; +0x8f, 0x1002e4e1f\njz      short loc_1002E4E32                                            ; +0x93, 0x1002e4e23\nmov     rax, rcx                                                       ; +0x95, 0x1002e4e25\nxor     edx, edx                                                       ; +0x98, 0x1002e4e28\ndiv     r10                                                            ; +0x9a, 0x1002e4e2a\nmov     r9, rdx                                                        ; +0x9d, 0x1002e4e2d\njmp     short loc_1002E4E3C                                            ; +0xa0, 0x1002e4e30\nmov     eax, esi                                                       ; +0xa2, 0x1002e4e32\nxor     edx, edx                                                       ; +0xa4, 0x1002e4e34\ndiv     r10d                                                           ; +0xa6, 0x1002e4e36\nmov     r9d, edx                                                       ; +0xa9, 0x1002e4e39\npush    rbp                                                            ; +0xac, 0x1002e4e3c\nmov     rbp, rsp                                                       ; +0xad, 0x1002e4e3d\nmov     rax, [rdi+560h]                                                ; +0xb0, 0x1002e4e40\nmov     rax, [rax+r9*8]                                                ; +0xb7, 0x1002e4e47\ntest    rax, rax                                                       ; +0xbb, 0x1002e4e4b\njz      short loc_1002E4E93                                            ; +0xbe, 0x1002e4e4e\nmov     rdi, [rax]                                                     ; +0xc0, 0x1002e4e50\ntest    rdi, rdi                                                       ; +0xc3, 0x1002e4e53\njz      short loc_1002E4E93                                            ; +0xc6, 0x1002e4e56\ncmp     r8d, 2                                                         ; +0xc8, 0x1002e4e58\njnb     short loc_1002E4E9B                                            ; +0xcc, 0x1002e4e5c\ndec     r10                                                            ; +0xce, 0x1002e4e5e\nxor     r8d, r8d                                                       ; +0xd1, 0x1002e4e61\njmp     short loc_1002E4E7D                                            ; +0xd4, 0x1002e4e64\nalign 10h                                                              ; +0xd6, 0x1002e4e66\ncmp     [rdi+10h], esi                                                 ; +0xe0, 0x1002e4e70\njz      short loc_1002E4EE4                                            ; +0xe3, 0x1002e4e73\nmov     rdi, [rdi]                                                     ; +0xe5, 0x1002e4e75\ntest    rdi, rdi                                                       ; +0xe8, 0x1002e4e78\njz      short loc_1002E4E8E                                            ; +0xeb, 0x1002e4e7b\nmov     rax, [rdi+8]                                                   ; +0xed, 0x1002e4e7d\ncmp     rax, rcx                                                       ; +0xf1, 0x1002e4e81\njz      short loc_1002E4E70                                            ; +0xf4, 0x1002e4e84\nand     rax, r10                                                       ; +0xf6, 0x1002e4e86\ncmp     rax, r9                                                        ; +0xf9, 0x1002e4e89\njz      short loc_1002E4E75                                            ; +0xfc, 0x1002e4e8c\npop     rbp                                                            ; +0xfe, 0x1002e4e8e\nmov     rax, r8                                                        ; +0xff, 0x1002e4e8f\nretn                                                                   ; +0x102, 0x1002e4e92\nxor     r8d, r8d                                                       ; +0x103, 0x1002e4e93\npop     rbp                                                            ; +0x106, 0x1002e4e96\nmov     rax, r8                                                        ; +0x107, 0x1002e4e97\nretn                                                                   ; +0x10a, 0x1002e4e9a\nxor     r8d, r8d                                                       ; +0x10b, 0x1002e4e9b\njmp     short loc_1002E4EAD                                            ; +0x10e, 0x1002e4e9e\ncmp     [rdi+10h], esi                                                 ; +0x110, 0x1002e4ea0\njz      short loc_1002E4EE4                                            ; +0x113, 0x1002e4ea3\nmov     rdi, [rdi]                                                     ; +0x115, 0x1002e4ea5\ntest    rdi, rdi                                                       ; +0x118, 0x1002e4ea8\njz      short loc_1002E4E8E                                            ; +0x11b, 0x1002e4eab\nmov     rax, [rdi+8]                                                   ; +0x11d, 0x1002e4ead\ncmp     rax, rcx                                                       ; +0x121, 0x1002e4eb1\njz      short loc_1002E4EA0                                            ; +0x124, 0x1002e4eb4\ncmp     rax, r10                                                       ; +0x126, 0x1002e4eb6\njb      short loc_1002E4ECF                                            ; +0x129, 0x1002e4eb9\nmov     rdx, rax                                                       ; +0x12b, 0x1002e4ebb\nor      rdx, r10                                                       ; +0x12e, 0x1002e4ebe\nshr     rdx, 20h                                                       ; +0x131, 0x1002e4ec1\njz      short loc_1002E4ED6                                            ; +0x135, 0x1002e4ec5\nxor     edx, edx                                                       ; +0x137, 0x1002e4ec7\ndiv     r10                                                            ; +0x139, 0x1002e4ec9\nmov     rax, rdx                                                       ; +0x13c, 0x1002e4ecc\ncmp     rax, r9                                                        ; +0x13f, 0x1002e4ecf\njz      short loc_1002E4EA5                                            ; +0x142, 0x1002e4ed2\njmp     short loc_1002E4E8E                                            ; +0x144, 0x1002e4ed4\nxor     edx, edx                                                       ; +0x146, 0x1002e4ed6\ndiv     r10d                                                           ; +0x148, 0x1002e4ed8\nmov     eax, edx                                                       ; +0x14b, 0x1002e4edb\ncmp     rax, r9                                                        ; +0x14d, 0x1002e4edd\njz      short loc_1002E4EA5                                            ; +0x150, 0x1002e4ee0\njmp     short loc_1002E4E8E                                            ; +0x152, 0x1002e4ee2\nmov     r8, [rdi+18h]                                                  ; +0x154, 0x1002e4ee4\npop     rbp                                                            ; +0x158, 0x1002e4ee8\nmov     rax, r8                                                        ; +0x159, 0x1002e4ee9\nretn                                                                   ; +0x15c, 0x1002e4eec", "xrefs": ["GJBaseGameLayer::processMoveActionsStep @ 0x100144619", "GJBaseGameLayer::update @ 0x1001520ea"], "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"}