//
// sub_180018290 from 0x180018290 to 0x1800182e4 (84 bytes)
//
// 1 xrefs:
// > sub_180006640 @ 0x180006678
//
// 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:52:48 +0000
//
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;
}