//
// sub_1800A6620 from 0x1800a6620 to 0x1800a66a9 (137 bytes)
//
// 2 xrefs:
// > sub_1800A65FC @ 0x1800a6603
// > ??> @ 0x1801c1cd4
//
// 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 11:22:16 +0000
//
void *__fastcall sub_1800A6620(__int64 a1, char a2)
{
void *v2; // rsi
__int64 v5; // r8
v2 = (void *)(a1 - 144);
*(_QWORD *)(*(int *)(*(_QWORD *)(a1 - 144) + 4LL) + a1 - 144) = &std::istringstream::`vftable';
v5 = *(int *)(*(_QWORD *)(a1 - 144) + 4LL);
*(_DWORD *)(v5 + a1 - 148) = v5 - 144;
sub_1800174E0(a1 - 144 + 16);
std::istream::~istream>(a1 - 120);
std::ios::~ios>(a1);
if ( (a2 & 1) != 0 )
j_j_free_0(v2);
return v2;
}