//
// sub_60730C from 0x60730c to 0x607412 (262 bytes)
//
// 2 xrefs:
// > sub_609260 @ 0x60937c
// > sub_609260 @ 0x6093aa
//
// 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
//
void *__fastcall sub_60730C(pugi::xpath_node *a1)
{
pugi::xml_node_struct *v2; // r1
pugi::xml_node_struct *v3; // r2
pugi::xml_node_struct *v4; // r7
char *v5; // r4
char *v6; // r0
bool v7; // zf
pugi::xml_attribute_struct *v8; // r3
pugi::xml_node_struct *v10; // r1
char *v11; // r4
char *v12; // r0
bool v13; // zf
pugi::xml_attribute_struct *v14; // r3
pugi::xml_node_struct *v15; // r1
void (*v16)(); // [sp+4h] [bp-20h] BYREF
pugi::xml_attribute v17; // [sp+8h] [bp-1Ch] BYREF
pugi::xml_node v18; // [sp+Ch] [bp-18h] BYREF
pugi::xml_attribute v19; // [sp+10h] [bp-14h] BYREF
pugi::xml_attribute_struct *v20; // [sp+14h] [bp-10h]
char *v21; // [sp+18h] [bp-Ch]
v16 = (void (*)())pugi::xpath_node::attribute(a1);
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)(&v16) )
{
v17._attr = (pugi::xml_attribute_struct *)pugi::xpath_node::attribute(a1);
v4 = pugi::xpath_node::parent(a1);
v5 = (char *)pugi::xml_attribute::name(&v17);
v6 = strchr(v5, 58);
v7 = v6 == nullptr;
if ( v6 )
v6 -= (int)v5;
v21 = v6;
if ( v7 )
v8 = nullptr;
else
v8 = (pugi::xml_attribute_struct *)v5;
v20 = v8;
if ( v8 )
{
for ( v18._root = v4;
pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v18);
v18._root = pugi::xml_node::parent(&v18, v10) )
{
v19._attr = sub_602D1C(&v18, v20, (int)v21);
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v19) )
return pugi::xml_attribute::value(&v19);
}
}
return &unk_939830;
}
else
{
v17._attr = pugi::xpath_node::node((void (**)())a1, v2, v3);
v11 = (char *)pugi::xml_node::name((pugi::xml_node *)&v17);
v12 = strchr(v11, 58);
v13 = v12 == nullptr;
if ( v12 )
v12 -= (int)v11;
v21 = v12;
if ( v13 )
v14 = nullptr;
else
v14 = (pugi::xml_attribute_struct *)v11;
v20 = v14;
for ( v18._root = v17._attr;
pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v18);
v18._root = pugi::xml_node::parent(&v18, v15) )
{
v19._attr = sub_602D1C(&v18, v20, (int)v21);
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v19) )
return pugi::xml_attribute::value(&v19);
}
return &unk_939830;
}
}