//
// sub_100087598 from 0x100087598 to 0x10008763c (164 bytes)
//
// 2 xrefs:
// > sub_100087414 @ 0x100087508
// > sub_100087658 @ 0x100087764
//
// 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 10:58:19 +0000
//
std::string *__fastcall sub_100087598(std::string *a1, std::string *__str)
{
void (__fastcall ***data)(_QWORD, _QWORD, _QWORD); // x21
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
std::string::size_type v7; // [xsp+10h] [xbp-30h]
data = (void (__fastcall ***)(_QWORD, _QWORD, _QWORD))a1[27].__r_.__value_.__l.__data_;
if ( data && !sub_1000045BC(__str, a1[26].__r_.__value_.__r.__words) )
{
if ( SHIBYTE(__str->__r_.__value_.__r.__words[2]) < 0 )
{
sub_1000097D0(__p, __str->__r_.__value_.__l.__data_, __str->__r_.__value_.__l.__size_);
}
else
{
*(_OWORD *)__p = *(_OWORD *)&__str->__r_.__value_.__l.__data_;
v7 = __str->__r_.__value_.__r.__words[2];
}
(**data)(data, a1, __p);
if ( SHIBYTE(v7) < 0 )
operator delete(__p[0]);
}
return std::string::operator=(a1 + 26, __str);
}