//
// PlayLayer::addLiveStartPosObject from 0x10014b0e8 to 0x10014b248 (352 bytes)
//
// 1 xrefs:
// > CreateStartPosPopup::onCreate @ 0x1001c22d0
//
// 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:59:36 +0000
//
void __fastcall PlayLayer::addLiveStartPosObject(_QWORD *a1, __int64 a2)
{
__int64 v4; // x8
__int64 v5; // x8
char *v6; // x1
void **v7; // x1
std::string::size_type v8; // x2
__int64 v9; // x19
std::string __str; // [xsp+8h] [xbp-88h] BYREF
void *__dst[2]; // [xsp+20h] [xbp-70h] BYREF
__int64 v12; // [xsp+30h] [xbp-60h]
void *__p[2]; // [xsp+40h] [xbp-50h] BYREF
unsigned __int8 v14; // [xsp+57h] [xbp-39h]
std::string v15; // [xsp+58h] [xbp-38h] BYREF
PlayLayer::addObject(a1, a2);
GJBaseGameLayer::sortStartPosObjects(a1);
v4 = a1[242];
if ( *(char *)(v4 + 415) < 0 )
{
sub_1000097D0(__dst, *(void **)(v4 + 392), *(_QWORD *)(v4 + 400));
}
else
{
v5 = v4 + 392;
*(_OWORD *)__dst = *(_OWORD *)v5;
v12 = *(_QWORD *)(v5 + 16);
}
if ( v12 >= 0 )
v6 = (char *)__dst;
else
v6 = (char *)__dst[0];
sub_100009900(__p, v6);
cocos2d::ZipUtils::decompressString(&v15, __p, 0, 11);
if ( (char)v14 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v12) < 0 )
operator delete(__dst[0]);
(*(void (__fastcall **)(void **__return_ptr, __int64, _QWORD *))(*(_QWORD *)a2 + 1392LL))(__p, a2, a1);
if ( (v14 & 0x80u) == 0 )
v7 = __p;
else
v7 = (void **)__p[0];
if ( (v14 & 0x80u) == 0 )
v8 = v14;
else
v8 = (std::string::size_type)__p[1];
std::string::append(&v15, (const std::string::value_type *)v7, v8);
if ( (char)v14 < 0 )
operator delete(__p[0]);
std::string::append(&v15, ";");
v9 = a1[242];
cocos2d::ZipUtils::compressString(&__str, &v15, 0, 0xFFFFFFFFLL, 11);
std::string::operator=((std::string *)(v9 + 392), &__str);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( SHIBYTE(v15.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v15.__r_.__value_.__l.__data_);
}