//
// sub_EAB78 from 0xeab78 to 0xeac3c (196 bytes)
//
// 1 xrefs:
// > sub_EA754 @ 0xea75c
//
// 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_EAB78(__int64 a1, __int64 a2, int a3, int *a4)
{
__int64 result; // x0
unsigned int v9; // w9
__int64 v10; // x4
unsigned int v11; // w0
unsigned int v12; // [xsp+Ch] [xbp-24h] BYREF
result = sub_E667C();
if ( !(_DWORD)result )
{
sub_8A454(1u, &v12, *(_QWORD *)(a1 + 8));
v9 = *(_DWORD *)(a1 + 416);
if ( v12 * a3 >= v9 )
v10 = v9;
else
v10 = v12 * a3;
v11 = sub_E7D08(0, *(_QWORD *)(a1 + 376), *(_QWORD *)(a1 + 400), *(_QWORD *)(a1 + 384), v10);
if ( v11 == -1 )
{
*a4 = 0;
return 16;
}
else
{
*a4 = v11 / v12;
MEMORY[0x10102464C4BBF](0, *(_QWORD *)(a1 + 384), 0, v11, a2);
return 0;
}
}
return result;
}