//
// pugi::xml_document::save_string from 0xb5b228 to 0xb5b324 (252 bytes)
//
// 2 xrefs:
// > DS_Dictionary::saveRootSubDictToString @ 0xb426a4
// > ??> @ 0xa5f90
//
// 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 __usercall pugi::xml_document::save_string@(
pugi::xml_node *a1@,
char *a2@,
unsigned int a3@,
int a4@,
__int64 a5@)
{
char *v6; // x0
unsigned int *v8; // x1
int v9; // w2
void (__fastcall **v10)(xml_string_writer *__hidden); // [xsp+48h] [xbp+48h] BYREF
char *v11; // [xsp+50h] [xbp+50h]
v11 = &byte_124B6C8;
v10 = off_121BEE0;
pugi::xml_document::save(a1, (__int64)&v10, a2, a3, a4);
sub_D18D28(a5);
v10 = off_121BEE0;
v6 = v11 - 24;
if ( v11 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v11 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)v11 - 2);
*((_DWORD *)v11 - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v6);
}
return a5;
}