//
// 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 (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:57 +0000
//
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;
}
}