//
// sub_8102A8 from 0x8102a8 to 0x8102f8 (80 bytes)
//
// 4 xrefs:
// > sub_8111E0 @ 0x8111e6
// > pugi::xml_node::prepend_attribute @ 0x812a38
// > pugi::xml_node::insert_attribute_before @ 0x812af2
// > pugi::xml_node::insert_attribute_after @ 0x812ba2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:36 +0000
//
char *__fastcall sub_8102A8(int *a1, int a2, int a3)
{
int v4; // r3
char *result; // r0
int v6; // r0
_DWORD v7[3]; // [sp+0h] [bp-Ch] BYREF
v7[0] = a1;
v7[1] = a2;
v7[2] = a3;
v4 = a1[1];
if ( (unsigned int)(v4 + 20) <= 0x8000 )
{
v6 = *a1;
a1[1] = v4 + 20;
v7[0] = v6;
result = (char *)(v6 + v4 + 24);
}
else
{
result = sub_810228((int)a1, 0x14u, v7);
}
if ( result )
{
*(_DWORD *)result = v7[0];
*((_DWORD *)result + 1) = 0;
*((_DWORD *)result + 2) = 0;
*((_DWORD *)result + 3) = 0;
*((_DWORD *)result + 4) = 0;
}
return result;
}