{"type": "func", "start": 5371208688, "end": 5371208869, "name": "GJEffectManager::countForItem", "pseudocode": "// \n// GJEffectManager::countForItem from 0x1402623f0 to 0x1402624a5 (181 bytes)\n// \n// 9 xrefs:\n// > GJBaseGameLayer::getItemValue @ 0x140234231\n// > GJBaseGameLayer::refreshCounterLabels @ 0x140235631\n// > GJEffectManager::updateCountForItem @ 0x1402624df\n// > EffectGameObject::triggerObject @ 0x1404a6026\n// > CountTriggerGameObject::triggerObject @ 0x1404bb2f6\n// > CountTriggerGameObject::triggerObject @ 0x1404bb323\n// > CountTriggerGameObject::triggerObject @ 0x1404bb359\n// > CountTriggerGameObject::triggerObject @ 0x1404bb3cc\n// > CountTriggerGameObject::triggerObject @ 0x1404bb525\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\nint GJEffectManager::countForItem(GJEffectManager *a1, int a2)\n{\n  int v3; // r10d\n  std::_List_val<std::_List_simple_types<std::pair<const int, int>>>::_Nodeptr v4; // rax\n  std::_List_val<std::_List_simple_types<std::pair<const int, int>>>::_Nodeptr Myhead; // r8\n  std::_Simple_types<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<const int, int>>>>>::value_type *v6; // rdx\n  std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const int, int>>>, std::_Iterator_base0>::_Nodeptr Ptr; // rcx\n  std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const int, int>>>, std::_Iterator_base0>::_Nodeptr v8; // rdx\n\n  v3 = a2;\n  v4 = nullptr;\n  if ( a2 < 0 )\n    v3 = 0;\n  if ( v3 > 9999 )\n    v3 = 9999;\n  Myhead = a1->m_itemCountMap._List._Mypair._Myval2._Myhead;\n  v6 = &a1->m_itemCountMap._Vec._Mypair._Myval2._Myfirst[2\n                                                       * ((0x100000001B3LL\n                                                         * (HIBYTE(v3)\n                                                          ^ (0x100000001B3LL\n                                                           * (BYTE2(v3)\n                                                            ^ (0x100000001B3LL\n                                                             * (BYTE1(v3)\n                                                              ^ (0x100000001B3LL\n                                                               * ((unsigned __int8)v3 ^ 0xCBF29CE484222325uLL))))))))\n                                                        & a1->m_itemCountMap._Mask)];\n  Ptr = v6[1]._Ptr;\n  if ( Ptr != Myhead )\n  {\n    v8 = v6->_Ptr;\n    if ( v3 == *((_DWORD *)Ptr + 4) )\n    {\nLABEL_9:\n      v4 = Ptr;\n    }\n    else\n    {\n      while ( Ptr != v8 )\n      {\n        Ptr = *((std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const int, int>>>, std::_Iterator_base0>::_Nodeptr *)Ptr\n              + 1);\n        if ( v3 == *((_DWORD *)Ptr + 4) )\n          goto LABEL_9;\n      }\n    }\n  }\n  if ( !v4 )\n    v4 = a1->m_itemCountMap._List._Mypair._Myval2._Myhead;\n  if ( v4 == Myhead )\n    return 0;\n  else\n    return *((_DWORD *)v4 + 5);\n}", "assembly": "; \n; GJEffectManager::countForItem from 0x1402623f0 to 0x1402624a5 (181 bytes)\n; \n; 9 xrefs:\n; > GJBaseGameLayer::getItemValue @ 0x140234231\n; > GJBaseGameLayer::refreshCounterLabels @ 0x140235631\n; > GJEffectManager::updateCountForItem @ 0x1402624df\n; > EffectGameObject::triggerObject @ 0x1404a6026\n; > CountTriggerGameObject::triggerObject @ 0x1404bb2f6\n; > CountTriggerGameObject::triggerObject @ 0x1404bb323\n; > CountTriggerGameObject::triggerObject @ 0x1404bb359\n; > CountTriggerGameObject::triggerObject @ 0x1404bb3cc\n; > CountTriggerGameObject::triggerObject @ 0x1404bb525\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     r9, rcx                                                        ; +0x0, 0x1402623f0\nmov     r10d, edx                                                      ; +0x3, 0x1402623f3\nxor     eax, eax                                                       ; +0x6, 0x1402623f6\nmov     ecx, 270Fh                                                     ; +0x8, 0x1402623f8\ntest    edx, edx                                                       ; +0xd, 0x1402623fd\nmov     rdx, 100000001B3h                                              ; +0xf, 0x1402623ff\ncmovs   r10d, eax                                                      ; +0x19, 0x140262409\ncmp     r10d, ecx                                                      ; +0x1d, 0x14026240d\ncmovg   r10d, ecx                                                      ; +0x20, 0x140262410\nmov     rcx, 0CBF29CE484222325h                                        ; +0x24, 0x140262414\nmov     [rsp+arg_8], r10d                                              ; +0x2e, 0x14026241e\nmovzx   r8d, r10b                                                      ; +0x33, 0x140262423\nxor     r8, rcx                                                        ; +0x37, 0x140262427\nmovzx   ecx, byte ptr [rsp+arg_8+1]                                    ; +0x3a, 0x14026242a\nimul    r8, rdx                                                        ; +0x3f, 0x14026242f\nxor     r8, rcx                                                        ; +0x43, 0x140262433\nmovzx   ecx, byte ptr [rsp+arg_8+2]                                    ; +0x46, 0x140262436\nimul    r8, rdx                                                        ; +0x4b, 0x14026243b\nxor     r8, rcx                                                        ; +0x4f, 0x14026243f\nmovzx   ecx, byte ptr [rsp+arg_8+3]                                    ; +0x52, 0x140262442\nimul    r8, rdx                                                        ; +0x57, 0x140262447\nxor     r8, rcx                                                        ; +0x5b, 0x14026244b\nimul    r8, rdx                                                        ; +0x5e, 0x14026244e\nmov     rdx, [r9+360h]                                                 ; +0x62, 0x140262452\nand     rdx, r8                                                        ; +0x69, 0x140262459\nmov     r8, [r9+338h]                                                  ; +0x6c, 0x14026245c\nshl     rdx, 4                                                         ; +0x73, 0x140262463\nadd     rdx, [r9+348h]                                                 ; +0x77, 0x140262467\nmov     rcx, [rdx+8]                                                   ; +0x7e, 0x14026246e\ncmp     rcx, r8                                                        ; +0x82, 0x140262472\njz      short loc_140262492                                            ; +0x85, 0x140262475\nmov     rdx, [rdx]                                                     ; +0x87, 0x140262477\ncmp     r10d, [rcx+10h]                                                ; +0x8a, 0x14026247a\njz      short loc_14026248F                                            ; +0x8e, 0x14026247e\ncmp     rcx, rdx                                                       ; +0x90, 0x140262480\njz      short loc_140262492                                            ; +0x93, 0x140262483\nmov     rcx, [rcx+8]                                                   ; +0x95, 0x140262485\ncmp     r10d, [rcx+10h]                                                ; +0x99, 0x140262489\njnz     short loc_140262480                                            ; +0x9d, 0x14026248d\nmov     rax, rcx                                                       ; +0x9f, 0x14026248f\ntest    rax, rax                                                       ; +0xa2, 0x140262492\ncmovz   rax, r8                                                        ; +0xa5, 0x140262495\ncmp     rax, r8                                                        ; +0xa9, 0x140262499\njz      short loc_1402624A2                                            ; +0xac, 0x14026249c\nmov     eax, [rax+14h]                                                 ; +0xae, 0x14026249e\nretn                                                                   ; +0xb1, 0x1402624a1\nxor     eax, eax                                                       ; +0xb2, 0x1402624a2\nretn                                                                   ; +0xb4, 0x1402624a4", "xrefs": ["GJBaseGameLayer::getItemValue @ 0x140234231", "GJBaseGameLayer::refreshCounterLabels @ 0x140235631", "GJEffectManager::updateCountForItem @ 0x1402624df", "EffectGameObject::triggerObject @ 0x1404a6026", "CountTriggerGameObject::triggerObject @ 0x1404bb2f6", "CountTriggerGameObject::triggerObject @ 0x1404bb323", "CountTriggerGameObject::triggerObject @ 0x1404bb359", "CountTriggerGameObject::triggerObject @ 0x1404bb3cc", "CountTriggerGameObject::triggerObject @ 0x1404bb525"], "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"}