//
// EventLinkTrigger::customObjectSetup from 0x100434ec4 to 0x1004351e0 (796 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009500f0
//
// 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 11:05:07 +0000
//
void __fastcall EventLinkTrigger::customObjectSetup(__int64 a1, __int64 a2, __int64 a3)
{
_QWORD *v6; // x22
const char *v7; // x0
int v8; // w0
const char *v9; // x0
int v10; // w0
const char *v11; // x0
int v12; // w0
__int64 v13; // x8
const char *v14; // x0
std::string *v15; // x8
char v16; // w8
std::string::size_type size; // x21
std::string *p_str; // x8
std::string *v19; // x9
std::string::size_type v20; // x11
std::string *v21; // x10
std::string::size_type v22; // x20
__int64 v23; // x8
__int64 v24; // x22
std::string::size_type v25; // x8
__int64 v26; // x24
bool v27; // zf
std::string::size_type v28; // x11
std::string *v29; // x8
_BYTE *v30; // x9
_BYTE *v31; // x10
std::string::size_type v32; // x11
__int64 v33; // x8
__int64 v34; // x20
__int64 v35; // x21
const char *v36; // x0
__int64 v37; // [xsp+8h] [xbp-88h] BYREF
__int64 v38; // [xsp+10h] [xbp-80h]
__int64 v39; // [xsp+18h] [xbp-78h]
std::string __str; // [xsp+20h] [xbp-70h] BYREF
std::string v41; // [xsp+38h] [xbp-58h] BYREF
std::allocator __a; // [xsp+57h] [xbp-39h] BYREF
EffectGameObject::customObjectSetup(a1, a2, a3);
v6 = *(_QWORD **)a3;
if ( *(_QWORD *)(*(_QWORD *)a3 + 408LL) )
{
v7 = (const char *)(*(_QWORD *)a2 + 1224LL);
if ( *(char *)(*(_QWORD *)a2 + 1247LL) < 0 )
v7 = *(const char **)v7;
v8 = atoi(v7);
}
else
{
v8 = 0;
}
*(_DWORD *)(a1 + 1464) = v8;
if ( v6[447] )
{
v9 = (const char *)(*(_QWORD *)a2 + 10728LL);
if ( *(char *)(*(_QWORD *)a2 + 10751LL) < 0 )
v9 = *(const char **)v9;
v10 = atoi(v9);
}
else
{
v10 = 0;
}
*(_DWORD *)(a1 + 1868) = v10;
if ( v6[525] )
{
v11 = (const char *)(*(_QWORD *)a2 + 12600LL);
if ( *(char *)(*(_QWORD *)a2 + 12623LL) < 0 )
v11 = *(const char **)v11;
v12 = atoi(v11);
}
else
{
v12 = 0;
}
*(_DWORD *)(a1 + 1872) = v12;
v13 = v6[431];
if ( v13 )
{
v14 = (const char *)(*(_QWORD *)a2 + 10344LL);
if ( *(char *)(*(_QWORD *)a2 + 10367LL) < 0 )
v14 = *(const char **)v14;
LOBYTE(v13) = atoi(v14) != 0;
}
*(_BYTE *)(a1 + 1864) = v13;
sub_1000187C4(a1 + 1840, *(_QWORD **)(a1 + 1848));
*(_QWORD *)(a1 + 1840) = a1 + 1848;
*(_OWORD *)(a1 + 1848) = 0u;
if ( *(_QWORD *)(*(_QWORD *)a3 + 3440LL) )
{
v15 = *(std::string **)a2;
if ( *(char *)(*(_QWORD *)a2 + 10343LL) < 0 )
sub_1000097D0(&__str, v15[430].__r_.__value_.__l.__data_, v15[430].__r_.__value_.__l.__size_);
else
__str = v15[430];
}
else
{
sub_100009900(&__str, "");
}
v16 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = HIBYTE(__str.__r_.__value_.__r.__words[2]);
else
size = __str.__r_.__value_.__l.__size_;
if ( size )
{
v37 = 0;
v38 = 0;
v39 = 0;
p_str = &__str;
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
p_str = (std::string *)__str.__r_.__value_.__r.__words[0];
v19 = (std::string *)((char *)p_str + size);
v20 = size;
v21 = p_str;
while ( v21->__r_.__value_.__s.__data_[0] != 46 )
{
v21 = (std::string *)((char *)v21 + 1);
if ( !--v20 )
{
v21 = (std::string *)((char *)p_str + size);
break;
}
}
v22 = 0;
v23 = (char *)v21 - (char *)p_str;
if ( v21 == v19 )
v24 = -1;
else
v24 = v23;
do
{
std::string::basic_string(&v41, &__str, v22, v24 - v22, &__a);
v25 = HIBYTE(v41.__r_.__value_.__r.__words[2]);
if ( (v41.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v25 = v41.__r_.__value_.__l.__size_;
if ( v22 != size || v25 )
sub_100017C70((__int64)&v37);
if ( v24 == -1 )
goto LABEL_44;
v22 = v24 + 1;
v28 = __str.__r_.__value_.__l.__size_;
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v29 = &__str;
else
v29 = (std::string *)__str.__r_.__value_.__r.__words[0];
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v28 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
if ( v28 <= v22 )
{
LABEL_44:
v26 = -1;
}
else
{
v30 = (char *)v29 + v28;
v31 = (char *)v29 + v22;
v32 = ~v24 + v28;
while ( *v31 != 46 )
{
++v31;
if ( !--v32 )
{
v31 = v30;
break;
}
}
v33 = v31 - (_BYTE *)v29;
if ( v31 == v30 )
v26 = -1;
else
v26 = v33;
}
if ( SHIBYTE(v41.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v41.__r_.__value_.__l.__data_);
v27 = v24 == -1;
v24 = v26;
}
while ( !v27 );
v34 = v37;
v35 = v38;
while ( v34 != v35 )
{
v36 = (const char *)v34;
if ( *(char *)(v34 + 23) < 0 )
v36 = *(const char **)v34;
LODWORD(v41.__r_.__value_.__l.__data_) = atoi(v36);
sub_1000D8E78(a1 + 1840, (int *)&v41, &v41);
v34 += 24;
}
v41.__r_.__value_.__r.__words[0] = (std::string::size_type)&v37;
sub_100018250((void ***)&v41);
v16 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
}
if ( v16 < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
}