{"type": "func", "start": 4296047104, "end": 4296047311, "name": "GJBaseGameLayer::activateProgressTrigger", "pseudocode": "// \n// GJBaseGameLayer::activateProgressTrigger from 0x100107a00 to 0x100107acf (207 bytes)\n// \n// 1 xrefs:\n// > EffectGameObject::triggerObject @ 0x10019a52d\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 12:21:32 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::activateProgressTrigger(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n  __int64 v5; // rdi\n  int v6; // r15d\n  int v7; // eax\n  int v8; // ecx\n  __int64 v9; // rsi\n  unsigned int v10; // eax\n  unsigned int v11; // r14d\n  unsigned int v12; // eax\n\n  if ( *(_BYTE *)(a1 + 12238) == 1 )\n  {\n    v5 = *(_QWORD *)(a1 + 2152);\n    v6 = *(_DWORD *)(v5 + 832);\n    if ( *(_BYTE *)(a2 + 1845) == 1 )\n    {\n      v7 = GJEffectManager::countForItem(v5, *(unsigned int *)(a2 + 1668));\n      v5 = *(_QWORD *)(a1 + 2152);\n    }\n    else\n    {\n      v7 = *(_DWORD *)(a2 + 1840);\n    }\n    v8 = 0;\n    if ( v7 > 0 )\n      v8 = v7;\n    v9 = 99;\n    if ( v8 < 99 )\n      v9 = (unsigned int)v8;\n    v10 = v9 + v6;\n    if ( v6 > (int)v9 )\n      v9 = (unsigned int)v6;\n    if ( *(_BYTE *)(a2 + 1844) )\n      v9 = v10;\n    result = sub_1002D5530(v5, v9);\n    v11 = *(_DWORD *)(a2 + 1680);\n    if ( (int)v11 > 0 )\n    {\n      GJEffectManager::updateCountForItem(\n        *(_QWORD *)(a1 + 2152),\n        v11,\n        *(unsigned int *)(*(_QWORD *)(a1 + 2152) + 832LL));\n      v12 = GJEffectManager::countForItem(*(_QWORD *)(a1 + 2152), v11);\n      return GJBaseGameLayer::updateCounters(a1, v11, v12);\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::activateProgressTrigger from 0x100107a00 to 0x100107acf (207 bytes)\n; \n; 1 xrefs:\n; > EffectGameObject::triggerObject @ 0x10019a52d\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 12:21:32 +0000\n; \npush    rbp                                                            ; +0x0, 0x100107a00\nmov     rbp, rsp                                                       ; +0x1, 0x100107a01\npush    r15                                                            ; +0x4, 0x100107a04\npush    r14                                                            ; +0x6, 0x100107a06\npush    rbx                                                            ; +0x8, 0x100107a08\npush    rax                                                            ; +0x9, 0x100107a09\ncmp     byte ptr [rdi+2FCEh], 1                                        ; +0xa, 0x100107a0a\njnz     loc_100107AC4                                                  ; +0x11, 0x100107a11\nmov     r14, rsi                                                       ; +0x17, 0x100107a17\nmov     rbx, rdi                                                       ; +0x1a, 0x100107a1a\nmov     rdi, [rdi+868h]                                                ; +0x1d, 0x100107a1d\nmov     r15d, [rdi+340h]                                               ; +0x24, 0x100107a24\ncmp     byte ptr [rsi+735h], 1                                         ; +0x2b, 0x100107a2b\njnz     short loc_100107A49                                            ; +0x32, 0x100107a32\nmov     esi, [r14+684h]                                                ; +0x34, 0x100107a34\ncall    GJEffectManager__countForItem                                  ; +0x3b, 0x100107a3b\nmov     rdi, [rbx+868h]                                                ; +0x40, 0x100107a40\njmp     short loc_100107A50                                            ; +0x47, 0x100107a47\nmov     eax, [r14+730h]                                                ; +0x49, 0x100107a49\nxor     ecx, ecx                                                       ; +0x50, 0x100107a50\ntest    eax, eax                                                       ; +0x52, 0x100107a52\ncmovg   ecx, eax                                                       ; +0x54, 0x100107a54\ncmp     ecx, 63h ; 'c'                                                 ; +0x57, 0x100107a57\nmov     esi, 63h ; 'c'                                                 ; +0x5a, 0x100107a5a\ncmovl   esi, ecx                                                       ; +0x5f, 0x100107a5f\nlea     eax, [rsi+r15]                                                 ; +0x62, 0x100107a62\ncmp     r15d, esi                                                      ; +0x66, 0x100107a66\ncmovg   esi, r15d                                                      ; +0x69, 0x100107a69\ncmp     byte ptr [r14+734h], 0                                         ; +0x6d, 0x100107a6d\ncmovnz  esi, eax                                                       ; +0x75, 0x100107a75\ncall    sub_1002D5530                                                  ; +0x78, 0x100107a78\nmov     r14d, [r14+690h]                                               ; +0x7d, 0x100107a7d\ntest    r14d, r14d                                                     ; +0x84, 0x100107a84\njle     short loc_100107AC4                                            ; +0x87, 0x100107a87\nmov     rdi, [rbx+868h]                                                ; +0x89, 0x100107a89\nmov     edx, [rdi+340h]                                                ; +0x90, 0x100107a90\nmov     esi, r14d                                                      ; +0x96, 0x100107a96\ncall    GJEffectManager__updateCountForItem                            ; +0x99, 0x100107a99\nmov     rdi, [rbx+868h]                                                ; +0x9e, 0x100107a9e\nmov     esi, r14d                                                      ; +0xa5, 0x100107aa5\ncall    GJEffectManager__countForItem                                  ; +0xa8, 0x100107aa8\nmov     rdi, rbx                                                       ; +0xad, 0x100107aad\nmov     esi, r14d                                                      ; +0xb0, 0x100107ab0\nmov     edx, eax                                                       ; +0xb3, 0x100107ab3\nadd     rsp, 8                                                         ; +0xb5, 0x100107ab5\npop     rbx                                                            ; +0xb9, 0x100107ab9\npop     r14                                                            ; +0xba, 0x100107aba\npop     r15                                                            ; +0xbc, 0x100107abc\npop     rbp                                                            ; +0xbe, 0x100107abe\njmp     GJBaseGameLayer__updateCounters                                ; +0xbf, 0x100107abf\nadd     rsp, 8                                                         ; +0xc4, 0x100107ac4\npop     rbx                                                            ; +0xc8, 0x100107ac8\npop     r14                                                            ; +0xc9, 0x100107ac9\npop     r15                                                            ; +0xcb, 0x100107acb\npop     rbp                                                            ; +0xcd, 0x100107acd\nretn                                                                   ; +0xce, 0x100107ace", "xrefs": ["EffectGameObject::triggerObject @ 0x10019a52d"], "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"}