//
// sub_759504 from 0x759504 to 0x75958c (136 bytes)
//
// 2 xrefs:
// > pugi::xml_writer_stream::write @ 0x601a7e
// > fmt::print @ 0x60d74a
//
// 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
//
int *__fastcall sub_759504(int *a1, int a2, int a3)
{
int v6; // r0
char *v7; // r5
int v8; // r0
_BYTE v10[4]; // [sp+0h] [bp-Ch] BYREF
_DWORD *v11; // [sp+4h] [bp-8h]
sub_75928C((int)v10, a1);
if ( v10[0] )
{
v6 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120);
if ( a3 != (*(int (__fastcall **)(int, int, int))(*(_DWORD *)v6 + 48))(v6, a2, a3) )
sub_7446A4((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1);
}
v7 = (char *)v11 + *(_DWORD *)(*v11 - 12);
if ( (*((_DWORD *)v7 + 3) & 0x2000) == 0 )
return a1;
if ( std::uncaught_exception() )
return a1;
v8 = *((_DWORD *)v7 + 30);
if ( !v8 || (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 24))(v8) != -1 )
return a1;
sub_7446A4(
(_DWORD *)((char *)v11 + *(_DWORD *)(*v11 - 12)),
*(_DWORD *)((char *)v11 + *(_DWORD *)(*v11 - 12) + 20) | 1);
return a1;
}