//
// sub_DBF364 from 0xdbf364 to 0xdbf434 (208 bytes)
//
// 2 xrefs:
// > pugi::xml_node::append_attribute @ 0xdc816c
// > sub_DCBC04 @ 0xdcc5a4
//
// 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:46 +0000
//
_QWORD *__fastcall sub_DBF364(__int64 *a1, __int64 *a2)
{
__int64 v3; // x2
__int64 v4; // x0
_QWORD *v5; // x1
__int64 v6; // x2
__int64 v7; // x3
_QWORD *result; // x0
__int64 v9; // [xsp+20h] [xbp+20h] BYREF
v3 = a2[1];
if ( (unsigned __int64)(v3 + 40) <= 0x8000 )
{
v4 = *a2;
a2[1] = v3 + 40;
v9 = v4;
v5 = (_QWORD *)(v4 + v3 + 48);
if ( v5 )
goto LABEL_3;
return nullptr;
}
v5 = sub_DBE65C((__int64)a2, 0x28u, &v9);
if ( !v5 )
return nullptr;
LABEL_3:
*v5 = v9;
v5[1] = 0;
v5[2] = 0;
v5[3] = 0;
v5[4] = 0;
v6 = *a1;
if ( *a1 )
{
v7 = *(_QWORD *)(v6 + 24);
result = v5;
*(_QWORD *)(v7 + 32) = v5;
v5[3] = v7;
*(_QWORD *)(v6 + 24) = v5;
}
else
{
*a1 = (__int64)v5;
v5[3] = v5;
return v5;
}
return result;
}