{"type": "func", "start": 5371214128, "end": 5371214313, "name": "GJEffectManager::timeForItem", "pseudocode": "// \n// GJEffectManager::timeForItem from 0x140263930 to 0x1402639e9 (185 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::getItemValue @ 0x140234222\n// > GJBaseGameLayer::updateTimerLabels @ 0x1402352ea\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\ndouble GJEffectManager::timeForItem(GJEffectManager *a1, int a2)\n{\n  int v2; // r9d\n  std::_List_val<std::_List_simple_types<std::pair<const int, TimerItem>>>::_Nodeptr v4; // rax\n  std::_List_val<std::_List_simple_types<std::pair<const int, TimerItem>>>::_Nodeptr Myhead; // r10\n  std::_Vector_val<std::_Simple_types<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<const int, TimerItem>>>>>>::pointer Myfirst; // rdx\n  unsigned __int64 v7; // r11\n  __int64 v8; // rcx\n  __int64 v9; // rdx\n\n  v2 = a2;\n  v4 = nullptr;\n  if ( a2 < 0 )\n    v2 = 0;\n  if ( v2 > 9999 )\n    v2 = 9999;\n  Myhead = a1->m_timerItemMap._List._Mypair._Myval2._Myhead;\n  Myfirst = a1->m_timerItemMap._Vec._Mypair._Myval2._Myfirst;\n  v7 = 2\n     * ((0x100000001B3LL\n       * (HIBYTE(v2)\n        ^ (0x100000001B3LL\n         * (BYTE2(v2)\n          ^ (0x100000001B3LL * (BYTE1(v2) ^ (0x100000001B3LL * ((unsigned __int8)v2 ^ 0xCBF29CE484222325uLL))))))))\n      & a1->m_timerItemMap._Mask);\n  v8 = *((_QWORD *)Myfirst\n       + 2\n       * ((0x100000001B3LL\n         * (HIBYTE(v2)\n          ^ (0x100000001B3LL\n           * (BYTE2(v2)\n            ^ (0x100000001B3LL * (BYTE1(v2) ^ (0x100000001B3LL * ((unsigned __int8)v2 ^ 0xCBF29CE484222325uLL))))))))\n        & a1->m_timerItemMap._Mask)\n       + 1);\n  if ( (std::_List_val<std::_List_simple_types<std::pair<const int, TimerItem>>>::_Nodeptr)v8 != Myhead )\n  {\n    v9 = *((_QWORD *)Myfirst + v7);\n    if ( v2 == *(_DWORD *)(v8 + 16) )\n    {\nLABEL_9:\n      v4 = (std::_List_val<std::_List_simple_types<std::pair<const int, TimerItem>>>::_Nodeptr)v8;\n    }\n    else\n    {\n      while ( v8 != v9 )\n      {\n        v8 = *(_QWORD *)(v8 + 8);\n        if ( v2 == *(_DWORD *)(v8 + 16) )\n          goto LABEL_9;\n      }\n    }\n  }\n  if ( !v4 )\n    v4 = a1->m_timerItemMap._List._Mypair._Myval2._Myhead;\n  if ( v4 == Myhead )\n    return 0.0;\n  else\n    return *((double *)v4 + 4);\n}", "assembly": "; \n; GJEffectManager::timeForItem from 0x140263930 to 0x1402639e9 (185 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::getItemValue @ 0x140234222\n; > GJBaseGameLayer::updateTimerLabels @ 0x1402352ea\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     r9d, edx                                                       ; +0x0, 0x140263930\nmov     r8, rcx                                                        ; +0x3, 0x140263933\nmov     r10, 100000001B3h                                              ; +0x6, 0x140263936\nxor     eax, eax                                                       ; +0x10, 0x140263940\ntest    edx, edx                                                       ; +0x12, 0x140263942\nmov     ecx, 270Fh                                                     ; +0x14, 0x140263944\nmov     r11, [r8+4A0h]                                                 ; +0x19, 0x140263949\ncmovs   r9d, eax                                                       ; +0x20, 0x140263950\ncmp     r9d, ecx                                                       ; +0x24, 0x140263954\ncmovg   r9d, ecx                                                       ; +0x27, 0x140263957\nmov     rcx, 0CBF29CE484222325h                                        ; +0x2b, 0x14026395b\nmov     [rsp+arg_8], r9d                                               ; +0x35, 0x140263965\nmovzx   edx, r9b                                                       ; +0x3a, 0x14026396a\nxor     rdx, rcx                                                       ; +0x3e, 0x14026396e\nmovzx   ecx, byte ptr [rsp+arg_8+1]                                    ; +0x41, 0x140263971\nimul    rdx, r10                                                       ; +0x46, 0x140263976\nxor     rdx, rcx                                                       ; +0x4a, 0x14026397a\nmovzx   ecx, byte ptr [rsp+arg_8+2]                                    ; +0x4d, 0x14026397d\nimul    rdx, r10                                                       ; +0x52, 0x140263982\nxor     rdx, rcx                                                       ; +0x56, 0x140263986\nmovzx   ecx, byte ptr [rsp+arg_8+3]                                    ; +0x59, 0x140263989\nimul    rdx, r10                                                       ; +0x5e, 0x14026398e\nxor     rdx, rcx                                                       ; +0x62, 0x140263992\nimul    rdx, r10                                                       ; +0x65, 0x140263995\nmov     r10, [r8+478h]                                                 ; +0x69, 0x140263999\nand     r11, rdx                                                       ; +0x70, 0x1402639a0\nmov     rdx, [r8+488h]                                                 ; +0x73, 0x1402639a3\nadd     r11, r11                                                       ; +0x7a, 0x1402639aa\nmov     rcx, [rdx+r11*8+8]                                             ; +0x7d, 0x1402639ad\ncmp     rcx, r10                                                       ; +0x82, 0x1402639b2\njz      short loc_1402639D3                                            ; +0x85, 0x1402639b5\nmov     rdx, [rdx+r11*8]                                               ; +0x87, 0x1402639b7\ncmp     r9d, [rcx+10h]                                                 ; +0x8b, 0x1402639bb\njz      short loc_1402639D0                                            ; +0x8f, 0x1402639bf\ncmp     rcx, rdx                                                       ; +0x91, 0x1402639c1\njz      short loc_1402639D3                                            ; +0x94, 0x1402639c4\nmov     rcx, [rcx+8]                                                   ; +0x96, 0x1402639c6\ncmp     r9d, [rcx+10h]                                                 ; +0x9a, 0x1402639ca\njnz     short loc_1402639C1                                            ; +0x9e, 0x1402639ce\nmov     rax, rcx                                                       ; +0xa0, 0x1402639d0\ntest    rax, rax                                                       ; +0xa3, 0x1402639d3\ncmovz   rax, r10                                                       ; +0xa6, 0x1402639d6\ncmp     rax, r10                                                       ; +0xaa, 0x1402639da\njz      short loc_1402639E5                                            ; +0xad, 0x1402639dd\nmovsd   xmm0, qword ptr [rax+20h]                                      ; +0xaf, 0x1402639df\nretn                                                                   ; +0xb4, 0x1402639e4\nxorps   xmm0, xmm0                                                     ; +0xb5, 0x1402639e5\nretn                                                                   ; +0xb8, 0x1402639e8", "xrefs": ["GJBaseGameLayer::getItemValue @ 0x140234222", "GJBaseGameLayer::updateTimerLabels @ 0x1402352ea"], "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"}