//
// sub_1800A2BB0 from 0x1800a2bb0 to 0x1800a2c42 (146 bytes)
//
// 2 xrefs:
// > sub_1800A2AF8 @ 0x1800a2aff
// > ??> @ 0x1801b7a34
//
// 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_1800A2BB0(__int64 a1, char a2)
{
__int64 v4; // r8
*(_QWORD *)(*(int *)(*(_QWORD *)(a1 - 136) + 4LL) + a1 - 136) = &std::ostringstream::`vftable';
v4 = *(int *)(*(_QWORD *)(a1 - 136) + 4LL);
*(_DWORD *)(v4 + a1 - 140) = v4 - 136;
sub_1800179A0(a1 - 128);
std::ostream::~ostream>(a1 - 120);
std::ios::~ios>(a1);
if ( (a2 & 1) != 0 )
j_j_free_0((void *)(a1 - 136));
return a1 - 136;
}