//
// sub_998F4E from 0x998f4e to 0x998f70 (34 bytes)
//
// 2 xrefs:
// > sub_997FF4 @ 0x998024
// > sub_997FF4 @ 0x99845a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:42 +0000
//
wint_t __fastcall sub_998F4E(wint_t result, int a2)
{
__int64 v2; // kr00_8
if ( *(_DWORD *)a2 )
return j_fputwc(result, *(__FILE **)a2);
v2 = *(_QWORD *)(a2 + 8);
if ( HIDWORD(v2) + 3 < (unsigned int)v2 )
{
*(_DWORD *)(*(_DWORD *)(a2 + 4) + HIDWORD(v2)) = result;
result = *(_DWORD *)(a2 + 12) + 4;
*(_DWORD *)(a2 + 12) = result;
}
return result;
}