//
// sub_ECFA0 from 0xecfa0 to 0xed01c (124 bytes)
//
// 6 xrefs:
// > sub_F05B8 @ 0xf07a8
// > sub_F05B8 @ 0xf08f4
// > sub_F05B8 @ 0xf091c
// > sub_F05B8 @ 0xf0be0
// > sub_F05B8 @ 0xf0d28
// > sub_F05B8 @ 0xf0e44
//
// 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_ECFA0(__int64 a1, __int64 a2, unsigned __int64 *a3, unsigned int a4)
{
__int64 result; // x0
__int64 v6; // x1
unsigned int v7; // w9
unsigned __int64 v8; // x8
unsigned int v9; // [xsp+8h] [xbp-18h] BYREF
unsigned int v10; // [xsp+Ch] [xbp-14h] BYREF
if ( a4 < 0x21 )
{
result = sub_ED9F4(a1, a2, &v9);
if ( !(_DWORD)result )
return result;
v8 = v9;
goto LABEL_7;
}
result = sub_ED9F4(a1, a2, &v10);
if ( (_DWORD)result )
{
result = sub_ED9F4(result, v6, &v9);
if ( (_DWORD)result )
{
v7 = v10;
*a3 = (unsigned __int64)v10 << 32;
v8 = v9 | ((unsigned __int64)v7 << 32);
LABEL_7:
*a3 = v8;
return 1;
}
}
return result;
}