//
// sub_180018290 from 0x180018290 to 0x1800182e4 (84 bytes)
//
// 1 xrefs:
// > sub_180006640 @ 0x180006678
//
// 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
//
unsigned __int64 __fastcall sub_180018290(int a1, int a2)
{
__int64 v2; // r9
int v3; // r8d
unsigned __int64 v4; // rcx
v2 = qword_1801B2810;
if ( !qword_1801B2810 || dword_1801B2818 <= 0 )
return 0;
v3 = ((qword_1801B2810 + 3) & 0xFFFFFFFC) - qword_1801B2810;
v4 = (a2 * a1 + 3) & 0xFFFFFFFFFFFFFFFCuLL;
qword_1801B2810 = ((qword_1801B2810 + 3) & 0xFFFFFFFFFFFFFFFCuLL) + v4;
dword_1801B2818 -= v3 + v4;
return (v2 + 3) & 0xFFFFFFFFFFFFFFFCuLL;
}