{"type": "func", "start": 5372300144, "end": 5372300329, "name": "GJEffectManager::countForItem", "pseudocode": "// \n// GJEffectManager::countForItem from 0x14036cb70 to 0x14036cc29 (185 bytes)\n// \n// 11 xrefs:\n// > GJBaseGameLayer::getItemValue @ 0x14033cf21\n// > GJBaseGameLayer::refreshCounterLabels @ 0x14033e30c\n// > GJEffectManager::updateCountForItem @ 0x14036cc5f\n// > EffectGameObject::triggerObject @ 0x140647ce4\n// > EffectGameObject::triggerObject @ 0x14064969c\n// > EffectGameObject::triggerObject @ 0x14064970b\n// > CountTriggerGameObject::triggerObject @ 0x14065c390\n// > CountTriggerGameObject::triggerObject @ 0x14065c3bd\n// > CountTriggerGameObject::triggerObject @ 0x14065c3f3\n// > CountTriggerGameObject::triggerObject @ 0x14065c45f\n// > CountTriggerGameObject::triggerObject @ 0x14065c5c7\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:30:58 +0000\n// \n\n__int64 __fastcall GJEffectManager::countForItem(_QWORD *a1, int a2)\n{\n  int v3; // r10d\n  __int64 v4; // r9\n  __int64 v5; // rdx\n  __int64 *v6; // rcx\n  __int64 v7; // rax\n  __int64 v8; // rcx\n\n  v3 = a2;\n  v4 = 0;\n  if ( a2 < 0 )\n    v3 = 0;\n  if ( v3 > 9999 )\n    v3 = 9999;\n  v5 = a1[103];\n  v6 = (__int64 *)(a1[105]\n                 + 16\n                 * (a1[108]\n                  & (0x100000001B3LL\n                   * (((unsigned __int64)(unsigned int)v3 >> 24)\n                    ^ (0x100000001B3LL\n                     * ((0x100000001B3LL\n                       * ((0x100000001B3LL * ((unsigned __int8)v3 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(v3)))\n                      ^ BYTE2(v3)))))));\n  v7 = v6[1];\n  if ( v7 != v5 )\n  {\n    v8 = *v6;\n    if ( v3 == *(_DWORD *)(v7 + 16) )\n    {\nLABEL_9:\n      v4 = v7;\n    }\n    else\n    {\n      while ( v7 != v8 )\n      {\n        v7 = *(_QWORD *)(v7 + 8);\n        if ( v3 == *(_DWORD *)(v7 + 16) )\n          goto LABEL_9;\n      }\n    }\n  }\n  if ( !v4 )\n    v4 = a1[103];\n  if ( v4 == v5 )\n    return 0;\n  else\n    return *(unsigned int *)(v4 + 20);\n}", "assembly": "; \n; GJEffectManager::countForItem from 0x14036cb70 to 0x14036cc29 (185 bytes)\n; \n; 11 xrefs:\n; > GJBaseGameLayer::getItemValue @ 0x14033cf21\n; > GJBaseGameLayer::refreshCounterLabels @ 0x14033e30c\n; > GJEffectManager::updateCountForItem @ 0x14036cc5f\n; > EffectGameObject::triggerObject @ 0x140647ce4\n; > EffectGameObject::triggerObject @ 0x14064969c\n; > EffectGameObject::triggerObject @ 0x14064970b\n; > CountTriggerGameObject::triggerObject @ 0x14065c390\n; > CountTriggerGameObject::triggerObject @ 0x14065c3bd\n; > CountTriggerGameObject::triggerObject @ 0x14065c3f3\n; > CountTriggerGameObject::triggerObject @ 0x14065c45f\n; > CountTriggerGameObject::triggerObject @ 0x14065c5c7\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:30:58 +0000\n; \nmov     r8, rcx                                                        ; +0x0, 0x14036cb70\nmov     r10d, edx                                                      ; +0x3, 0x14036cb73\nxor     r9d, r9d                                                       ; +0x6, 0x14036cb76\nmov     eax, 270Fh                                                     ; +0x9, 0x14036cb79\ntest    edx, edx                                                       ; +0xe, 0x14036cb7e\nmov     r11, 100000001B3h                                              ; +0x10, 0x14036cb80\nmov     rcx, 0CBF29CE484222325h                                        ; +0x1a, 0x14036cb8a\ncmovs   r10d, r9d                                                      ; +0x24, 0x14036cb94\ncmp     r10d, eax                                                      ; +0x28, 0x14036cb98\ncmovg   r10d, eax                                                      ; +0x2b, 0x14036cb9b\nmov     eax, r10d                                                      ; +0x2f, 0x14036cb9f\nshr     eax, 8                                                         ; +0x32, 0x14036cba2\nmovzx   edx, al                                                        ; +0x35, 0x14036cba5\nmovzx   eax, r10b                                                      ; +0x38, 0x14036cba8\nxor     rax, rcx                                                       ; +0x3c, 0x14036cbac\nimul    rax, r11                                                       ; +0x3f, 0x14036cbaf\nxor     rdx, rax                                                       ; +0x43, 0x14036cbb3\nmov     eax, r10d                                                      ; +0x46, 0x14036cbb6\nshr     eax, 10h                                                       ; +0x49, 0x14036cbb9\nmovzx   ecx, al                                                        ; +0x4c, 0x14036cbbc\nimul    rdx, r11                                                       ; +0x4f, 0x14036cbbf\nmov     eax, r10d                                                      ; +0x53, 0x14036cbc3\nxor     rcx, rdx                                                       ; +0x56, 0x14036cbc6\nshr     rax, 18h                                                       ; +0x59, 0x14036cbc9\nmov     rdx, [r8+338h]                                                 ; +0x5d, 0x14036cbcd\nimul    rcx, r11                                                       ; +0x64, 0x14036cbd4\nxor     rcx, rax                                                       ; +0x68, 0x14036cbd8\nimul    rcx, r11                                                       ; +0x6b, 0x14036cbdb\nand     rcx, [r8+360h]                                                 ; +0x6f, 0x14036cbdf\nshl     rcx, 4                                                         ; +0x76, 0x14036cbe6\nadd     rcx, [r8+348h]                                                 ; +0x7a, 0x14036cbea\nmov     rax, [rcx+8]                                                   ; +0x81, 0x14036cbf1\ncmp     rax, rdx                                                       ; +0x85, 0x14036cbf5\njz      short loc_14036CC15                                            ; +0x88, 0x14036cbf8\nmov     rcx, [rcx]                                                     ; +0x8a, 0x14036cbfa\ncmp     r10d, [rax+10h]                                                ; +0x8d, 0x14036cbfd\njz      short loc_14036CC12                                            ; +0x91, 0x14036cc01\ncmp     rax, rcx                                                       ; +0x93, 0x14036cc03\njz      short loc_14036CC15                                            ; +0x96, 0x14036cc06\nmov     rax, [rax+8]                                                   ; +0x98, 0x14036cc08\ncmp     r10d, [rax+10h]                                                ; +0x9c, 0x14036cc0c\njnz     short loc_14036CC03                                            ; +0xa0, 0x14036cc10\nmov     r9, rax                                                        ; +0xa2, 0x14036cc12\ntest    r9, r9                                                         ; +0xa5, 0x14036cc15\ncmovz   r9, rdx                                                        ; +0xa8, 0x14036cc18\ncmp     r9, rdx                                                        ; +0xac, 0x14036cc1c\njz      short loc_14036CC26                                            ; +0xaf, 0x14036cc1f\nmov     eax, [r9+14h]                                                  ; +0xb1, 0x14036cc21\nretn                                                                   ; +0xb5, 0x14036cc25\nxor     eax, eax                                                       ; +0xb6, 0x14036cc26\nretn                                                                   ; +0xb8, 0x14036cc28", "xrefs": ["GJBaseGameLayer::getItemValue @ 0x14033cf21", "GJBaseGameLayer::refreshCounterLabels @ 0x14033e30c", "GJEffectManager::updateCountForItem @ 0x14036cc5f", "EffectGameObject::triggerObject @ 0x140647ce4", "EffectGameObject::triggerObject @ 0x14064969c", "EffectGameObject::triggerObject @ 0x14064970b", "CountTriggerGameObject::triggerObject @ 0x14065c390", "CountTriggerGameObject::triggerObject @ 0x14065c3bd", "CountTriggerGameObject::triggerObject @ 0x14065c3f3", "CountTriggerGameObject::triggerObject @ 0x14065c45f", "CountTriggerGameObject::triggerObject @ 0x14065c5c7"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}