//
// sub_CCE2F4 from 0xcce2f4 to 0xcce37c (136 bytes)
//
// 2 xrefs:
// > sub_D2144C @ 0xd2148c
// > sub_D216A0 @ 0xd216e0
//
// 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_CCE2F4(__int64 a1, int a2, char a3)
{
char *v5; // x1
FILE *v7; // x0
v5 = sub_CCE0C0(a3);
if ( !v5 )
return 0;
if ( *(_QWORD *)a1 )
return 0;
v7 = fdopen(a2, v5);
*(_QWORD *)a1 = v7;
if ( !v7 )
return 0;
*(_BYTE *)(a1 + 8) = 1;
if ( !a2 )
setvbuf(v7, nullptr, 2, 0);
return a1;
}