//
// sub_606CC4 from 0x606cc4 to 0x606d34 (112 bytes)
//
// 2 xrefs:
// > sub_60703C @ 0x607056
// > sub_60703C @ 0x60705e
//
// 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_606CC4(void (**a1)(), pugi::xml_attribute_struct *a2, pugi::xml_node_struct *a3)
{
pugi::xml_node_struct *v4; // r0
int v5; // r3
pugi::xml_attribute_struct *v7; // r0
pugi::xml_attribute v8[2]; // [sp+0h] [bp-8h] BYREF
v8[1]._attr = a2;
v8[0]._attr = pugi::xpath_node::node(a1, a2, a3);
v4 = pugi::xml_node::internal_object((pugi::xml_node *)v8);
if ( v4 )
{
v5 = *((_DWORD *)v4 + 2);
if ( !v5 || (*(_DWORD *)v4 & 0x10) != 0 )
{
v5 = *((_DWORD *)v4 + 3);
if ( !v5 || (*(_DWORD *)v4 & 8) != 0 )
return 0;
}
return v5;
}
else
{
v8[0]._attr = (pugi::xml_attribute_struct *)pugi::xpath_node::attribute((pugi::xpath_node *)a1);
v7 = pugi::xml_attribute::internal_object(v8);
if ( !v7 )
return 0;
if ( (*(_DWORD *)v7 & 0x10) == 0 )
return *((_DWORD *)v7 + 1);
if ( (*(_DWORD *)v7 & 8) != 0 )
return 0;
return *((_DWORD *)v7 + 2);
}
}