//
// sub_CCE274 from 0xcce274 to 0xcce2f4 (128 bytes)
//
// 2 xrefs:
// > sub_D2150C @ 0xd2154c
// > sub_D21760 @ 0xd217a0
//
// 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_CCE274(__int64 a1, __int64 a2)
{
_DWORD *v4; // x20
FILE *v5; // x0
if ( !a2 || *(_QWORD *)a1 )
return 0;
v4 = (_DWORD *)__errno();
v5 = nullptr;
*v4 = 0;
while ( fflush(v5) )
{
if ( *v4 != 4 )
return 0;
v5 = *(FILE **)a1;
}
*(_QWORD *)a1 = a2;
*(_BYTE *)(a1 + 8) = 0;
return a1;
}