//
// sub_18004C3B0 from 0x18004c3b0 to 0x18004c3cd (29 bytes)
//
// 3 xrefs:
// > sub_180050C10 @ 0x180050cda
// > sub_180053230 @ 0x1800532e5
// > sub_180053530 @ 0x1800535e6
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:53:15 +0000
//
__int64 __fastcall sub_18004C3B0(__int64 a1, int a2)
{
int v2; // r8d
int v3; // edx
v2 = *(_DWORD *)(a1 + 8);
if ( v2 < 0 )
return 0xFFFFFFFFLL;
v3 = *(_DWORD *)(a1 + 12) + a2;
if ( v3 > v2 )
return 0xFFFFFFFFLL;
*(_DWORD *)(a1 + 12) = v3;
return 0;
}