//
// sub_DD0490 from 0xdd0490 to 0xdd07dc (844 bytes)
//
// 2 xrefs:
// > sub_DD4FC4 @ 0xdd5194
// > sub_DD4FC4 @ 0xdd51e0
//
// 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:58 +0000
//
char *__fastcall sub_DD0490(pugi::xpath_node *a1)
{
__int64 v2; // x25
char *v3; // x21
char *v4; // x0
signed __int64 v5; // x20
char *v6; // x0
char *v7; // x1
const char *v8; // x3
int v9; // w2
int v10; // t1
__int64 v12; // x1
char *v13; // x20
char *v14; // x0
signed __int64 v15; // x21
char *v16; // x0
char *v17; // x1
const char *v18; // x3
int v19; // w2
int v20; // t1
__int64 v21; // x1
__int64 v22; // [xsp+58h] [xbp+58h] BYREF
__int64 v23; // [xsp+60h] [xbp+60h] BYREF
__int64 i; // [xsp+68h] [xbp+68h] BYREF
__int64 attribute; // [xsp+70h] [xbp+70h] BYREF
v22 = pugi::xpath_node::attribute(a1);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&v22) )
{
v23 = pugi::xpath_node::node(a1);
v13 = pugi::xml_node::name((pugi::xml_node *)&v23);
v14 = strchr(v13, 58);
v15 = v14 - v13;
if ( !v14 )
{
v13 = nullptr;
v15 = 0;
}
for ( i = v23; ; i = pugi::xml_node::parent((pugi::xml_node *)&i) )
{
if ( !pugi::xml_node::operator void (*)(pugi::xml_node***)(&i) )
return &byte_11B8890;
if ( i )
{
attribute = pugi::xml_node::first_attribute((pugi::xml_node *)&i);
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
break;
}
LABEL_36:
pugi::xml_attribute::xml_attribute(&attribute);
LABEL_43:
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
return pugi::xml_attribute::value((pugi::xml_attribute *)&attribute);
}
while ( 1 )
{
v16 = pugi::xml_attribute::name((pugi::xml_attribute *)&attribute);
if ( *v16 == 120 )
{
v17 = v16;
v18 = "xmlns";
while ( 1 )
{
v20 = *(unsigned __int8 *)++v18;
v19 = v20;
++v17;
if ( !v20 )
break;
if ( (unsigned __int8)*v17 != v19 )
goto LABEL_35;
}
if ( v13 )
{
if ( v16[5] == 58 )
{
if ( v15 )
{
if ( v16[6] != *v13 )
goto LABEL_35;
v21 = 0;
while ( ++v21 != v15 )
{
if ( v16[v21 + 6] != v13[v21] )
goto LABEL_35;
}
}
if ( !v16[v15 + 6] )
goto LABEL_43;
}
}
else if ( !v16[5] )
{
goto LABEL_43;
}
}
LABEL_35:
attribute = pugi::xml_attribute::next_attribute((pugi::xml_attribute *)&attribute);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
goto LABEL_36;
}
}
v23 = pugi::xpath_node::attribute(a1);
v2 = pugi::xpath_node::parent(a1);
v3 = pugi::xml_attribute::name((pugi::xml_attribute *)&v23);
v4 = strchr(v3, 58);
if ( !v4 )
return &byte_11B8890;
v5 = v4 - v3;
i = v2;
if ( !pugi::xml_node::operator void (*)(pugi::xml_node***)(&i) )
return &byte_11B8890;
while ( i )
{
attribute = pugi::xml_node::first_attribute((pugi::xml_node *)&i);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
break;
while ( 1 )
{
v6 = pugi::xml_attribute::name((pugi::xml_attribute *)&attribute);
if ( *v6 != 120 )
goto LABEL_11;
v7 = v6;
v8 = "xmlns";
while ( 1 )
{
v10 = *(unsigned __int8 *)++v8;
v9 = v10;
++v7;
if ( !v10 )
break;
if ( (unsigned __int8)*v7 != v9 )
goto LABEL_11;
}
if ( v6[5] != 58 )
goto LABEL_11;
if ( !v5 )
break;
if ( v6[6] == *v3 )
{
v12 = 0;
while ( v5 != ++v12 )
{
if ( v6[v12 + 6] != v3[v12] )
goto LABEL_11;
}
break;
}
LABEL_11:
attribute = pugi::xml_attribute::next_attribute((pugi::xml_attribute *)&attribute);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
goto LABEL_12;
}
if ( v6[v5 + 6] )
goto LABEL_11;
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
return pugi::xml_attribute::value((pugi::xml_attribute *)&attribute);
LABEL_21:
i = pugi::xml_node::parent((pugi::xml_node *)&i);
if ( !pugi::xml_node::operator void (*)(pugi::xml_node***)(&i) )
return &byte_11B8890;
}
LABEL_12:
pugi::xml_attribute::xml_attribute(&attribute);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&attribute) )
goto LABEL_21;
return pugi::xml_attribute::value((pugi::xml_attribute *)&attribute);
}