//
// sub_100530EC4 from 0x100530ec4 to 0x100530f70 (172 bytes)
//
// 2 xrefs:
// > sub_10051F7D0 @ 0x10051f860
// > sub_100528544 @ 0x100528588
//
// 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_100530EC4(__int64 a1, _QWORD *a2)
{
__int64 v2; // x8
int v3; // w9
void *v4; // x8
__int64 v6; // x9
__int64 v7; // x8
v2 = *(_QWORD *)(a1 + 256);
v3 = *(_DWORD *)(v2 + 108) & 0x30000;
switch ( v3 )
{
case 65536:
v4 = &unk_10085B8E0;
goto LABEL_5;
case 131072:
v4 = &unk_10085B8E2;
LABEL_5:
*a2 = v4;
return 2;
case 196608:
*a2 = &unk_10085B8E0;
return 4;
default:
if ( *(_DWORD *)(a1 + 56) && (v6 = *(_QWORD *)(v2 + 608)) != 0 )
{
*a2 = v6;
return *(_QWORD *)(*(_QWORD *)(a1 + 256) + 616LL);
}
else
{
v7 = *(_QWORD *)(v2 + 592);
if ( v7 )
{
*a2 = v7;
return *(_QWORD *)(*(_QWORD *)(a1 + 256) + 600LL);
}
else
{
*a2 = &unk_10085B8FC;
return 30;
}
}
}
}