//
// sub_6065F8 from 0x6065f8 to 0x6066c8 (208 bytes)
//
// 24 xrefs:
// > sub_6066CC @ 0x6066e6
// > sub_6066CC @ 0x606706
// > sub_60672C @ 0x60676e
// > sub_6067EC @ 0x606804
// > sub_6067EC @ 0x606832
// > sub_6068B0 @ 0x606914
// > sub_60697C @ 0x606a0a
// > sub_606A28 @ 0x606aaa
// > sub_606A28 @ 0x606b3c
// > sub_606C20 @ 0x606c62
// > sub_607BBC @ 0x607d52
// > sub_607BBC @ 0x607d7c
// > sub_607BBC @ 0x607dd2
// > sub_607BBC @ 0x607dfc
// > sub_607BBC @ 0x608012
// > sub_607BBC @ 0x60809a
// > sub_607BBC @ 0x6080f6
// > sub_607BBC @ 0x6083dc
// > sub_607BBC @ 0x608438
// > sub_607BBC @ 0x6084d4
// > sub_607BBC @ 0x608548
// > sub_607BBC @ 0x60867a
// > sub_607BBC @ 0x6086d6
// > sub_607BBC @ 0x608740
//
// 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
//
pugi::xml_node_struct *__fastcall sub_6065F8(
int a1,
pugi::xml_attribute_struct *a2,
pugi::xml_attribute_struct *a3,
pugi::xml_attribute_struct *a4)
{
pugi::xml_node_struct *result; // r0
bool v9; // zf
bool v10; // zf
const char *v11; // r0
void *v12; // r0
pugi::xml_attribute v13[3]; // [sp+4h] [bp-Ch] BYREF
v13[0]._attr = a2;
v13[1]._attr = a3;
v13[2]._attr = a4;
result = (pugi::xml_node_struct *)pugi::xml_node::operator!(a3);
if ( !result )
{
switch ( *(_BYTE *)(a1 + 3) )
{
case 1:
result = pugi::xml_node::type((pugi::xml_node *)a3);
v9 = result == (pugi::xml_node_struct *)((char *)&dword_0 + 2);
goto LABEL_9;
case 2:
goto LABEL_19;
case 3:
result = pugi::xml_node::type((pugi::xml_node *)a3);
v10 = result == (pugi::xml_node_struct *)&byte_5;
goto LABEL_13;
case 4:
result = pugi::xml_node::type((pugi::xml_node *)a3);
v10 = result == (pugi::xml_node_struct *)&byte_6;
goto LABEL_13;
case 5:
if ( pugi::xml_node::type((pugi::xml_node *)a3) == (pugi::xml_node_struct *)((char *)&dword_0 + 3) )
goto LABEL_19;
result = pugi::xml_node::type((pugi::xml_node *)a3);
v10 = result == (pugi::xml_node_struct *)byte_4;
LABEL_13:
if ( !v10 )
return result;
goto LABEL_19;
case 6:
result = pugi::xml_node::type((pugi::xml_node *)a3);
v9 = result == (pugi::xml_node_struct *)&byte_6;
LABEL_9:
if ( !v9 )
return result;
v11 = (const char *)pugi::xml_node::name((pugi::xml_node *)a3);
result = (pugi::xml_node_struct *)sub_6006BA(v11, *(const char **)(a1 + 16));
goto LABEL_18;
case 7:
result = pugi::xml_node::type((pugi::xml_node *)a3);
v10 = result == (pugi::xml_node_struct *)((char *)&dword_0 + 2);
goto LABEL_13;
case 8:
result = pugi::xml_node::type((pugi::xml_node *)a3);
if ( result != (pugi::xml_node_struct *)((char *)&dword_0 + 2) )
return result;
v12 = pugi::xml_node::name((pugi::xml_node *)a3);
result = (pugi::xml_node_struct *)sub_600170((int)v12, *(_DWORD *)(a1 + 16));
LABEL_18:
if ( result )
{
LABEL_19:
pugi::xpath_node::xpath_node(v13, (const pugi::xml_node *)a3);
result = (pugi::xml_node_struct *)sub_601BA4(a2, (int *)v13, (int)a4);
}
break;
default:
return result;
}
}
return result;
}