//
// sub_100476EB0 from 0x100476eb0 to 0x100476f11 (97 bytes)
//
// 1 xrefs:
// > ??> @ 0x10093a6d0
//
// 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_100476EB0(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rcx
int v4; // ecx
__int64 v5; // rdx
__int64 v6; // rcx
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (unsigned int)result <= 0x34 )
{
result = (unsigned int)result;
v3 = 960;
if ( _bittest64(&v3, (unsigned int)result) )
{
v4 = 3;
}
else
{
v4 = 1;
v5 = 0x14000000000C00LL;
if ( !_bittest64(&v5, (unsigned int)result) )
{
v6 = 12288;
if ( !_bittest64(&v6, (unsigned int)result) )
return result;
v4 = 2;
}
}
result = *(_QWORD *)(a1 + 120);
*(_DWORD *)(result + 548) = v4;
}
return result;
}