//
// sub_1800A2B10 from 0x1800a2b10 to 0x1800a2ba2 (146 bytes)
//
// 2 xrefs:
// > sub_1800A2AEC @ 0x1800a2af3
// > ??> @ 0x1801b7a28
//
// 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_1800A2B10(__int64 a1, char a2)
{
__int64 v4; // r8
*(_QWORD *)(*(int *)(*(_QWORD *)(a1 - 144) + 4LL) + a1 - 144) = &std::istringstream::`vftable';
v4 = *(int *)(*(_QWORD *)(a1 - 144) + 4LL);
*(_DWORD *)(v4 + a1 - 148) = v4 - 144;
sub_1800179A0(a1 - 128);
std::istream::~istream>(a1 - 120);
std::ios::~ios>(a1);
if ( (a2 & 1) != 0 )
j_j_free_0((void *)(a1 - 144));
return a1 - 144;
}