//
// sub_1800AF050 from 0x1800af050 to 0x1800af07b (43 bytes)
//
// 3 xrefs:
// > sub_1800E3470 @ 0x1800e3477
// > ??> @ 0x180140ea5
// > ??> @ 0x1801b8460
//
// 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
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall sub_1800AF050(__int64 a1)
{
__int64 result; // rax
result = std::ios::rdbuf(*(_QWORD *)a1 + *(int *)(**(_QWORD **)a1 + 4LL));
if ( result )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 16LL))(result);
return result;
}