//
// sub_CEC508 from 0xcec508 to 0xcec574 (108 bytes)
//
// 1 xrefs:
// > ??> @ 0x121d6e8
//
// 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_CEC508(__int64 a1, wint_t wc)
{
__int64 result; // x0
wint_t v4; // w3
if ( wc != -1 )
{
result = ungetwc(wc, *(__FILE **)(a1 + 64));
LABEL_3:
*(_DWORD *)(a1 + 72) = -1;
return result;
}
v4 = *(_DWORD *)(a1 + 72);
result = 0xFFFFFFFFLL;
if ( v4 == -1 )
goto LABEL_3;
result = ungetwc(v4, *(__FILE **)(a1 + 64));
*(_DWORD *)(a1 + 72) = -1;
return result;
}