//
// tinyxml2::XMLElement::DeleteAttribute from 0xd97238 to 0xd97360 (296 bytes)
//
// 1 xrefs:
// > ??> @ 0x713e0
//
// This function is hookable on this platform (idp: arm, 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 13:08:22 +0000
//
__int64 __fastcall tinyxml2::XMLElement::DeleteAttribute(__int64 this, char *a2, __int64 a3, int *a4)
{
__int64 v4; // x19
__int64 v5; // x23
__int64 v6; // x21
const char *v8; // x22
const char *Str; // x0
__int64 v10; // x2
int *v11; // x3
__int64 v12; // x1
int v13; // w6
int v14; // w4
int v15; // t1
int v16; // w7
int v17; // w0
__int64 v18; // x19
v4 = 0;
v5 = *(_QWORD *)(this + 96);
if ( !v5 )
return this;
v6 = this;
v8 = a2 + 0x7FFFFFFF;
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v5 + 8), (__int64)a2, a3, a4);
if ( a2 == Str )
{
LABEL_16:
if ( !v4 )
goto LABEL_22;
goto LABEL_17;
}
while ( 1 )
{
v12 = (unsigned __int8)*a2;
if ( !*a2 )
{
v17 = *(unsigned __int8 *)Str;
LABEL_13:
if ( !v17 )
goto LABEL_16;
goto LABEL_14;
}
v10 = *(unsigned __int8 *)Str;
if ( *Str )
{
if ( (_DWORD)v12 == (_DWORD)v10 )
break;
}
LABEL_14:
this = *(_QWORD *)(v5 + 56);
v4 = v5;
if ( !this )
return this;
v5 = *(_QWORD *)(v5 + 56);
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(this + 8), v12, v10, v11);
if ( a2 == Str )
goto LABEL_16;
}
v10 = (__int64)Str;
v11 = (int *)a2;
while ( 1 )
{
v15 = *((unsigned __int8 *)v11 + 1);
v11 = (int *)((char *)v11 + 1);
v14 = v15;
v16 = v10 + 1 - (_DWORD)Str;
if ( !v15 )
{
if ( v16 == 0x7FFFFFFF )
goto LABEL_16;
v17 = *(unsigned __int8 *)(v10 + 1);
goto LABEL_13;
}
v13 = *(unsigned __int8 *)++v10;
if ( !v13 || v14 != v13 )
break;
if ( v11 == (int *)v8 )
goto LABEL_16;
}
if ( v16 != 0x7FFFFFFF )
goto LABEL_14;
if ( v4 )
{
LABEL_17:
*(_QWORD *)(v4 + 56) = *(_QWORD *)(v5 + 56);
goto LABEL_18;
}
LABEL_22:
*(_QWORD *)(v6 + 96) = *(_QWORD *)(v5 + 56);
LABEL_18:
v18 = *(_QWORD *)(v5 + 64);
(**(void (__fastcall ***)(__int64))v5)(v5);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 32LL))(v18, v5);
}