//
// sub_ED0B4 from 0xed0b4 to 0xed150 (156 bytes)
//
// 3 xrefs:
// > sub_F05B8 @ 0xf0c28
// > sub_F05B8 @ 0xf0dcc
// > sub_F05B8 @ 0xf0e80
//
// 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_ED0B4(__int64 result, __int64 a2, unsigned int a3)
{
unsigned int v3; // w19
unsigned int v4; // w22
__int64 v5; // x0
__int64 v6; // x1
_DWORD *v7; // x2
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x1
_DWORD *v11; // x2
if ( !a3 )
return 1;
v3 = a3;
if ( (*(_DWORD *)(a2 + 24) & 7) != 0 )
{
if ( 8 - (*(_DWORD *)(a2 + 24) & 7u) >= a3 )
v4 = a3;
else
v4 = 8 - (*(_DWORD *)(a2 + 24) & 7);
v5 = sub_EDAF8(result);
result = sub_ECD60(v5, v6, v7, v4);
if ( !(_DWORD)result )
return result;
v3 -= v4;
}
if ( v3 >> 3 )
{
v8 = sub_EDAF8(result);
result = sub_ED150(v8);
if ( !(_DWORD)result )
return result;
v3 &= 7u;
}
if ( !v3 )
return 1;
v9 = sub_EDAF8(result);
result = sub_ECD60(v9, v10, v11, v3);
if ( (_DWORD)result )
return 1;
return result;
}