//
// sub_18012CDE0 from 0x18012cde0 to 0x18012ce54 (116 bytes)
//
// 3 xrefs:
// > __crt_stdio_output::output_processor,__crt_stdio_output::standard_base>>::process @ 0x18012c8a2
// > ??> @ 0x180202c18
// > ??> @ 0x180202c24
//
// 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
//
char __fastcall sub_18012CDE0(__int64 a1)
{
__int64 v2; // rcx
char v3; // r8
if ( (unsigned __int8)unknown_libname_40(a1, 0) )
{
v2 = *(_QWORD *)(a1 + 1128);
v3 = *(_BYTE *)(a1 + 65);
if ( *(_QWORD *)(v2 + 16) == *(_QWORD *)(v2 + 8) )
{
if ( *(_BYTE *)(v2 + 24) )
++*(_DWORD *)(a1 + 40);
else
*(_DWORD *)(a1 + 40) = -1;
}
else
{
++*(_DWORD *)(a1 + 40);
++*(_QWORD *)(v2 + 16);
*(_BYTE *)(**(_QWORD **)(a1 + 1128))++ = v3;
}
return 1;
}
else
{
*errno() = 22;
invalid_parameter_noinfo();
return 0;
}
}