//
// sub_100566D18 from 0x100566d18 to 0x100566db4 (156 bytes)
//
// 1 xrefs:
// > sub_10056D378 @ 0x10056d3d8
//
// 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_100566D18(__int64 *a1, _DWORD *a2, int a3)
{
__int64 (__fastcall *v4)(__int64 *); // x3
__int64 result; // x0
__int64 v6; // x10
int v7; // w9
int v8; // w9
char v9; // w8
v4 = *(__int64 (__fastcall **)(__int64 *))(a1[100] + 88);
if ( v4 )
return v4(a1);
if ( a3 < 2 )
return 0;
v6 = *a1;
v7 = *(_DWORD *)(*a1 + 484);
if ( (v7 & 0x15) == 1 )
{
*a2 = *((_DWORD *)a1 + 206);
v7 = *(_DWORD *)(v6 + 484);
result = 1;
}
else
{
result = 0;
}
if ( (v7 & 0x2A) == 2 )
{
v8 = *((_DWORD *)a1 + 207);
if ( (_DWORD)result && *((_DWORD *)a1 + 206) == v8 )
{
v9 = 16;
}
else
{
a2[(unsigned int)result] = v8;
v9 = result | 0x10;
}
return (1 << v9) | (unsigned int)result;
}
return result;
}