//
// sub_10045E820 from 0x10045e820 to 0x10045e904 (228 bytes)
//
// 1 xrefs:
// > ??> @ 0x100827c38
//
// 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_10045E820(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)
{
int v6; // w24
__int64 result; // x0
__int64 v13; // x8
__int64 v14; // x24
int v15; // w8
__int64 v16; // [xsp+8h] [xbp-38h] BYREF
v6 = a6;
result = sub_100508B28(a1, a2, a3, a4, a5, a6);
if ( !(_DWORD)result )
{
v13 = *(_QWORD *)(a1 + 472);
if ( v13 && *(_QWORD *)(a1 + 32) )
{
if ( v6 && (*(_BYTE *)(v13 + 56) & 0x10) != 0 )
{
return 0;
}
else
{
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64 *))(*(_QWORD *)a1 + 288LL))(
a1,
4294967294LL,
&v16);
if ( !(_DWORD)result )
{
v14 = v16;
v15 = *(_DWORD *)(a1 + 72);
if ( (v15 & 0x10000) != 0 )
{
sub_10050BB84(v16);
v15 = *(_DWORD *)(a1 + 72);
}
return sub_10050BB7C(
v14,
a2,
a3,
a4,
a5,
(unsigned __int8)((v15 & 0xC0000) == 0) << 6,
(*(_DWORD *)(*(_QWORD *)(a1 + 472) + 60LL) & 0x10000) == 0);
}
}
}
else
{
return 30;
}
}
return result;
}