//
// sub_18009C620 from 0x18009c620 to 0x18009c666 (70 bytes)
//
// 15 xrefs:
// > ??> @ 0x1801ac210
// > ??> @ 0x1801ac820
// > ??> @ 0x1801acc20
// > ??> @ 0x1801acd50
// > ??> @ 0x1801ace40
// > ??> @ 0x1801acf30
// > ??> @ 0x1801ad140
// > ??> @ 0x1801ad320
// > ??> @ 0x1801ad410
// > ??> @ 0x1801ad510
// > ??> @ 0x1801ad730
// > ??> @ 0x1801ad830
// > ??> @ 0x1801ae740
// > ??> @ 0x1801ae860
// > ??> @ 0x1801aff30
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_18009C620(__int64 *a1, int a2, unsigned int a3)
{
__int64 v3; // r9
unsigned int v5; // ecx
unsigned int v6; // eax
v3 = *a1;
if ( a2 )
{
v5 = *(_DWORD *)(v3 + 436);
if ( v5 )
{
v6 = v5 - a3;
if ( v5 <= a3 )
v6 = 0;
*(_DWORD *)(v3 + 436) = v6;
return 0;
}
else
{
return 11;
}
}
else
{
*(_DWORD *)(v3 + 436) = *(_DWORD *)(*(_QWORD *)(v3 + 168) + 1752LL);
return 0;
}
}