{"type": "func", "start": 4298035024, "end": 4298035494, "name": "GJEffectManager::updateTimer", "pseudocode": "// \n// GJEffectManager::updateTimer from 0x1002ecf50 to 0x1002ed126 (470 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::activateItemEditTrigger @ 0x10014cb6b\n// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x10014d37c\n// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x10014d58a\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\nvoid __fastcall GJEffectManager::updateTimer(GJEffectManager *a1, int a2, double a3)\n{\n  int v4; // eax\n  unsigned int v5; // esi\n  double v6; // xmm0_8\n  unsigned __int64 value; // rcx\n  unsigned __int64 v8; // r11\n  __int64 v9; // r9\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, TimerItem>, void *> *> *v10; // rax\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, TimerItem>, void *> *>::__next_pointer next; // r10\n  unsigned __int64 v12; // rcx\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, TimerItem>, void *> *>::__next_pointer v13; // rax\n  unsigned __int64 v14; // rax\n  std::vector<int> v15; // [rsp+0h] [rbp-20h] BYREF\n\n  v4 = 0;\n  if ( a2 > 0 )\n    v4 = a2;\n  v5 = 9999;\n  if ( v4 < 9999 )\n    v5 = v4;\n  v6 = 9999999.0;\n  if ( a3 <= 9999999.0 )\n  {\n    v6 = a3;\n    if ( a3 < -9999999.0 )\n      v6 = -9999999.0;\n  }\n  value = a1->m_timerItemMap.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_;\n  if ( !value )\n    goto LABEL_21;\n  v8 = (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 ( v8 > 1 )\n  {\n    v9 = v5;\n    if ( value <= v5 )\n      v9 = (unsigned __int16)((unsigned __int16)v5 % (unsigned __int16)value);\n  }\n  else\n  {\n    v9 = ((_DWORD)value + 0x3FFF) & v5;\n  }\n  v10 = a1->m_timerItemMap.__table_.__bucket_list_.__ptr_.__value_[v9];\n  if ( !v10 || (next = v10->__next_) == nullptr )\n  {\nLABEL_21:\n    memset(&v15, 0, sizeof(v15));\n    GJEffectManager::startTimer(a1, v5, v6, 0.0, 0, 0, 1, 1.0, 0, 0, &v15, 0, 0);\n    return;\n  }\n  if ( (unsigned int)v8 < 2 )\n  {\n    v12 = value - 1;\n    while ( 1 )\n    {\n      v13 = next[1].__next_;\n      if ( v13 == (std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, TimerItem>, void *> *>::__next_pointer)v5 )\n      {\n        if ( LODWORD(next[2].__next_) == v5 )\n          goto LABEL_32;\n      }\n      else if ( (v12 & (unsigned __int64)v13) != v9 )\n      {\n        goto LABEL_21;\n      }\n      next = next->__next_;\n      if ( !next )\n        goto LABEL_21;\n    }\n  }\n  while ( 1 )\n  {\n    v14 = (unsigned __int64)next[1].__next_;\n    if ( v14 == v5 )\n      break;\n    if ( v14 < value )\n      goto LABEL_28;\n    if ( (value | v14) >> 32 )\n    {\n      v14 %= value;\nLABEL_28:\n      if ( v14 != v9 )\n        goto LABEL_21;\n      goto LABEL_23;\n    }\n    if ( (unsigned int)v14 % (unsigned int)value != v9 )\n      goto LABEL_21;\nLABEL_23:\n    next = next->__next_;\n    if ( !next )\n      goto LABEL_21;\n  }\n  if ( LODWORD(next[2].__next_) != v5 )\n    goto LABEL_23;\nLABEL_32:\n  *(double *)&next[4].__next_ = v6;\n}", "assembly": "; \n; GJEffectManager::updateTimer from 0x1002ecf50 to 0x1002ed126 (470 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::activateItemEditTrigger @ 0x10014cb6b\n; > GJBaseGameLayer::activatePersistentItemTrigger @ 0x10014d37c\n; > GJBaseGameLayer::activatePersistentItemTrigger @ 0x10014d58a\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, 0x1002ecf50\nmov     rbp, rsp                                                       ; +0x1, 0x1002ecf51\nsub     rsp, 20h                                                       ; +0x4, 0x1002ecf54\nmovapd  xmm1, xmm0                                                     ; +0x8, 0x1002ecf58\nxor     eax, eax                                                       ; +0xc, 0x1002ecf5c\ntest    esi, esi                                                       ; +0xe, 0x1002ecf5e\ncmovg   eax, esi                                                       ; +0x10, 0x1002ecf60\ncmp     eax, 270Fh                                                     ; +0x13, 0x1002ecf63\nmov     esi, 270Fh                                                     ; +0x18, 0x1002ecf68\ncmovl   esi, eax                                                       ; +0x1d, 0x1002ecf6d\nmovsd   xmm0, cs:qword_100819478                                       ; +0x20, 0x1002ecf70\nucomisd xmm1, xmm0                                                     ; +0x28, 0x1002ecf78\nja      short loc_1002ECF94                                            ; +0x2c, 0x1002ecf7c\nmovsd   xmm2, cs:qword_100819480                                       ; +0x2e, 0x1002ecf7e\nucomisd xmm2, xmm1                                                     ; +0x36, 0x1002ecf86\nmovapd  xmm0, xmm1                                                     ; +0x3a, 0x1002ecf8a\njbe     short loc_1002ECF94                                            ; +0x3e, 0x1002ecf8e\nmovapd  xmm0, xmm2                                                     ; +0x40, 0x1002ecf90\nmov     rcx, [rdi+398h]                                                ; +0x44, 0x1002ecf94\ntest    rcx, rcx                                                       ; +0x4b, 0x1002ecf9b\njz      loc_1002ED083                                                  ; +0x4e, 0x1002ecf9e\nmov     r8d, esi                                                       ; +0x54, 0x1002ecfa4\nmov     rax, rcx                                                       ; +0x57, 0x1002ecfa7\nshr     rax, 1                                                         ; +0x5a, 0x1002ecfaa\nmov     rdx, 5555555555555555h                                         ; +0x5d, 0x1002ecfad\nand     rdx, rax                                                       ; +0x67, 0x1002ecfb7\nmov     rax, rcx                                                       ; +0x6a, 0x1002ecfba\nsub     rax, rdx                                                       ; +0x6d, 0x1002ecfbd\nmov     rdx, 3333333333333333h                                         ; +0x70, 0x1002ecfc0\nmov     r9, rax                                                        ; +0x7a, 0x1002ecfca\nand     r9, rdx                                                        ; +0x7d, 0x1002ecfcd\nshr     rax, 2                                                         ; +0x80, 0x1002ecfd0\nand     rax, rdx                                                       ; +0x84, 0x1002ecfd4\nadd     rax, r9                                                        ; +0x87, 0x1002ecfd7\nmov     rdx, rax                                                       ; +0x8a, 0x1002ecfda\nshr     rdx, 4                                                         ; +0x8d, 0x1002ecfdd\nadd     rdx, rax                                                       ; +0x91, 0x1002ecfe1\nmov     rax, 0F0F0F0F0F0F0F0Fh                                         ; +0x94, 0x1002ecfe4\nand     rax, rdx                                                       ; +0x9e, 0x1002ecfee\nmov     r11, 101010101010101h                                          ; +0xa1, 0x1002ecff1\nimul    r11, rax                                                       ; +0xab, 0x1002ecffb\nshr     r11, 38h                                                       ; +0xaf, 0x1002ecfff\ncmp     r11, 1                                                         ; +0xb3, 0x1002ed003\nja      short loc_1002ED017                                            ; +0xb7, 0x1002ed007\nlea     eax, [rcx+3FFFh]                                               ; +0xb9, 0x1002ed009\nmov     r9d, r8d                                                       ; +0xbf, 0x1002ed00f\nand     r9d, eax                                                       ; +0xc2, 0x1002ed012\njmp     short loc_1002ED02A                                            ; +0xc5, 0x1002ed015\nmov     r9, r8                                                         ; +0xc7, 0x1002ed017\ncmp     rcx, r8                                                        ; +0xca, 0x1002ed01a\nja      short loc_1002ED02A                                            ; +0xcd, 0x1002ed01d\nmov     eax, esi                                                       ; +0xcf, 0x1002ed01f\nxor     edx, edx                                                       ; +0xd1, 0x1002ed021\ndiv     cx                                                             ; +0xd3, 0x1002ed023\nmovzx   r9d, dx                                                        ; +0xd6, 0x1002ed026\nmov     rax, [rdi+390h]                                                ; +0xda, 0x1002ed02a\nmov     rax, [rax+r9*8]                                                ; +0xe1, 0x1002ed031\ntest    rax, rax                                                       ; +0xe5, 0x1002ed035\njz      short loc_1002ED083                                            ; +0xe8, 0x1002ed038\nmov     r10, [rax]                                                     ; +0xea, 0x1002ed03a\ntest    r10, r10                                                       ; +0xed, 0x1002ed03d\njz      short loc_1002ED083                                            ; +0xf0, 0x1002ed040\ncmp     r11d, 2                                                        ; +0xf2, 0x1002ed042\njnb     loc_1002ED0DE                                                  ; +0xf6, 0x1002ed046\ndec     rcx                                                            ; +0xfc, 0x1002ed04c\njmp     short loc_1002ED072                                            ; +0xff, 0x1002ed04f\nalign 20h                                                              ; +0x101, 0x1002ed051\ncmp     [r10+10h], esi                                                 ; +0x110, 0x1002ed060\njz      loc_1002ED11A                                                  ; +0x114, 0x1002ed064\nmov     r10, [r10]                                                     ; +0x11a, 0x1002ed06a\ntest    r10, r10                                                       ; +0x11d, 0x1002ed06d\njz      short loc_1002ED083                                            ; +0x120, 0x1002ed070\nmov     rax, [r10+8]                                                   ; +0x122, 0x1002ed072\ncmp     rax, r8                                                        ; +0x126, 0x1002ed076\njz      short loc_1002ED060                                            ; +0x129, 0x1002ed079\nand     rax, rcx                                                       ; +0x12b, 0x1002ed07b\ncmp     rax, r9                                                        ; +0x12e, 0x1002ed07e\njz      short loc_1002ED06A                                            ; +0x131, 0x1002ed081\nxorpd   xmm1, xmm1                                                     ; +0x133, 0x1002ed083\nmovapd  [rbp+var_20], xmm1                                             ; +0x137, 0x1002ed087\nmov     [rbp+var_10], 0                                                ; +0x13c, 0x1002ed08c\nlea     rax, [rbp+var_20]                                              ; +0x144, 0x1002ed094\nmovss   xmm2, cs:alpha                                                 ; +0x148, 0x1002ed098\nxorpd   xmm1, xmm1                                                     ; +0x150, 0x1002ed0a0\nxor     edx, edx                                                       ; +0x154, 0x1002ed0a4\nxor     ecx, ecx                                                       ; +0x156, 0x1002ed0a6\nmov     r8d, 1                                                         ; +0x158, 0x1002ed0a8\nxor     r9d, r9d                                                       ; +0x15e, 0x1002ed0ae\npush    0                                                              ; +0x161, 0x1002ed0b1\npush    0                                                              ; +0x163, 0x1002ed0b3\npush    rax                                                            ; +0x165, 0x1002ed0b5\npush    0                                                              ; +0x166, 0x1002ed0b6\ncall    GJEffectManager__startTimer                                    ; +0x168, 0x1002ed0b8\nadd     rsp, 20h                                                       ; +0x16d, 0x1002ed0bd\nadd     rsp, 20h                                                       ; +0x171, 0x1002ed0c1\npop     rbp                                                            ; +0x175, 0x1002ed0c5\nretn                                                                   ; +0x176, 0x1002ed0c6\nalign 10h                                                              ; +0x177, 0x1002ed0c7\ncmp     [r10+10h], esi                                                 ; +0x180, 0x1002ed0d0\njz      short loc_1002ED11A                                            ; +0x184, 0x1002ed0d4\nmov     r10, [r10]                                                     ; +0x186, 0x1002ed0d6\ntest    r10, r10                                                       ; +0x189, 0x1002ed0d9\njz      short loc_1002ED083                                            ; +0x18c, 0x1002ed0dc\nmov     rax, [r10+8]                                                   ; +0x18e, 0x1002ed0de\ncmp     rax, r8                                                        ; +0x192, 0x1002ed0e2\njz      short loc_1002ED0D0                                            ; +0x195, 0x1002ed0e5\ncmp     rax, rcx                                                       ; +0x197, 0x1002ed0e7\njb      short loc_1002ED100                                            ; +0x19a, 0x1002ed0ea\nmov     rdx, rax                                                       ; +0x19c, 0x1002ed0ec\nor      rdx, rcx                                                       ; +0x19f, 0x1002ed0ef\nshr     rdx, 20h                                                       ; +0x1a2, 0x1002ed0f2\njz      short loc_1002ED10A                                            ; +0x1a6, 0x1002ed0f6\nxor     edx, edx                                                       ; +0x1a8, 0x1002ed0f8\ndiv     rcx                                                            ; +0x1aa, 0x1002ed0fa\nmov     rax, rdx                                                       ; +0x1ad, 0x1002ed0fd\ncmp     rax, r9                                                        ; +0x1b0, 0x1002ed100\njz      short loc_1002ED0D6                                            ; +0x1b3, 0x1002ed103\njmp     loc_1002ED083                                                  ; +0x1b5, 0x1002ed105\nxor     edx, edx                                                       ; +0x1ba, 0x1002ed10a\ndiv     ecx                                                            ; +0x1bc, 0x1002ed10c\nmov     eax, edx                                                       ; +0x1be, 0x1002ed10e\ncmp     rax, r9                                                        ; +0x1c0, 0x1002ed110\njz      short loc_1002ED0D6                                            ; +0x1c3, 0x1002ed113\njmp     loc_1002ED083                                                  ; +0x1c5, 0x1002ed115\nmovsd   qword ptr [r10+20h], xmm0                                      ; +0x1ca, 0x1002ed11a\nadd     rsp, 20h                                                       ; +0x1d0, 0x1002ed120\npop     rbp                                                            ; +0x1d4, 0x1002ed124\nretn                                                                   ; +0x1d5, 0x1002ed125", "xrefs": ["GJBaseGameLayer::activateItemEditTrigger @ 0x10014cb6b", "GJBaseGameLayer::activatePersistentItemTrigger @ 0x10014d37c", "GJBaseGameLayer::activatePersistentItemTrigger @ 0x10014d58a"], "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"}