//
// sub_100493E94 from 0x100493e94 to 0x100493f8c (248 bytes)
//
// 1 xrefs:
// > sub_10049434C @ 0x100494350
//
// 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_100493E94(__int64 a1)
{
__int64 v1; // x8
unsigned int v2; // w9
unsigned int v3; // w10
int v4; // w9
__int64 v5; // x8
__int64 i; // x20
__int64 result; // x0
__int64 v9; // x8
*(_DWORD *)(a1 + 540) = 1;
v1 = *(_QWORD *)(a1 + 168) + 70104LL;
v2 = *(_DWORD *)v1 ^ (*(_DWORD *)v1 << 11);
*(_QWORD *)v1 = *(_QWORD *)(*(_QWORD *)(a1 + 168) + 70108LL);
v3 = *(_DWORD *)(v1 + 12);
v4 = (v2 >> 8) ^ (v3 >> 19) ^ v2;
*(_DWORD *)(v1 + 8) = v3;
*(_DWORD *)(v1 + 12) = v4 ^ v3;
*(_DWORD *)(a1 + 548) = v4 ^ v3;
LODWORD(v1) = v4 ^ ~v3;
*(_DWORD *)(a1 + 552) = v1;
*(_DWORD *)(a1 + 556) = 572572263 * (v4 ^ v3);
*(_DWORD *)(a1 + 560) = -1474208055 * v1;
v5 = *(_QWORD *)(a1 + 232);
if ( *(int *)(v5 + 96) >= 1 )
{
for ( i = 0; i < *(int *)(v5 + 96); ++i )
{
v9 = *(_QWORD *)(*(_QWORD *)(v5 + 104) + 8 * i);
if ( *(_DWORD *)v9 == 1 )
{
result = sub_1004A7A60(a1, i, *(unsigned int *)(v9 + 56));
if ( (_DWORD)result )
return result;
}
else if ( !*(_DWORD *)v9 )
{
result = sub_1004A79E0(a1, i, *(float *)(v9 + 56));
if ( (_DWORD)result )
return result;
}
v5 = *(_QWORD *)(a1 + 232);
}
}
return 0;
}