//
// sub_1004CF990 from 0x1004cf990 to 0x1004cfa1c (140 bytes)
//
// 8 xrefs:
// > sub_10043FA1C @ 0x100440314
// > sub_10043FA1C @ 0x100440674
// > sub_10043FA1C @ 0x1004408e0
// > sub_10043FA1C @ 0x10044129c
// > sub_100442B9C @ 0x100442c08
// > sub_100442C1C @ 0x100442c54
// > sub_1004A0E78 @ 0x1004a0f3c
// > sub_1004B7A3C @ 0x1004b7c6c
//
// 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_1004CF990(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
_QWORD *v8; // x23
__int64 v9; // x20
v8 = (_QWORD *)(a1 + 69600);
if ( a1 )
sub_100442B5C(a1, 0x16u);
if ( !*v8
|| (v9 = ((__int64 (__fastcall *)(__int64, __int64, __int64, __int64, _QWORD))*v8)(a1, a2, a3, a4, v8[1]),
!(_DWORD)v9) )
{
v9 = 0;
}
sub_100442B7C(a1, 0x16u);
return v9;
}