//
// sub_10045BB80 from 0x10045bb80 to 0x10045bbcc (76 bytes)
//
// 2 xrefs:
// > sub_1004D30B4 @ 0x1004d32b8
// > sub_1004D32E0 @ 0x1004d33b4
//
// 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_10045BB80(__int64 a1, int a2)
{
unsigned int v2; // w9
unsigned int v3; // w9
int v4; // w9
__int64 v5; // x8
v2 = *(_DWORD *)(a1 + 80);
if ( (a2 & 1) == 0 )
v2 = *(_DWORD *)(a1 + 468);
v3 = (unsigned __int16)(v2 >> 1);
if ( v3 <= 0xFFFD )
v4 = 2 * v3 + 2;
else
v4 = 2;
v5 = *(_DWORD *)(a1 + 80) & 0xFFFE0000 | v4 | 1;
*(_QWORD *)(a1 + 80) = v5;
if ( a2 )
*(_DWORD *)(a1 + 468) = v5;
return 0;
}