//
// sub_10042AC48 from 0x10042ac48 to 0x10042acb0 (104 bytes)
//
// 1 xrefs:
// > sub_1004E90CC @ 0x1004e9da4
//
// 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_10042AC48(__int64 a1)
{
unsigned int v1; // w8
unsigned int v2; // w9
unsigned int v3; // w10
unsigned int v4; // w11
unsigned int v5; // w12
v1 = *(_DWORD *)(a1 + 24);
if ( v1 )
{
v2 = *(_DWORD *)(a1 + 32);
if ( v2 < v1 )
{
v3 = *(_DWORD *)(*(_QWORD *)a1 + 4LL * *(unsigned int *)(a1 + 20));
v4 = *(_DWORD *)(a1 + 28);
v5 = 24 - v2;
do
{
v4 = ((unsigned __int8)v4 << 8) ^ dword_10084C640[(unsigned __int8)(v3 >> v5) ^ (v4 >> 8)];
v2 += 8;
*(_DWORD *)(a1 + 28) = v4;
*(_DWORD *)(a1 + 32) = v2;
v5 -= 8;
}
while ( v2 < v1 );
}
}
return *(unsigned __int16 *)(a1 + 28);
}