//
// EventLinkTrigger::customObjectSetup from 0x10038e61c to 0x10038e938 (796 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007f7e60
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall EventLinkTrigger::customObjectSetup(
EventLinkTrigger *a1,
std::vector *a2,
std::vector *a3)
{
std::__vector_base::pointer begin; // x22
std::__vector_base::pointer capacitym1; // x0
int v8; // w0
std::__vector_base::pointer v9; // x0
int v10; // w0
std::__vector_base::pointer v11; // x0
int v12; // w0
void *v13; // x8
std::__vector_base::pointer 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);
begin = a3->__begin_;
if ( *((_QWORD *)a3->__begin_ + 51) )
{
capacitym1 = a2->__begin_ + 51;
if ( a2->__begin_[51].m_data.m_short.shortStorage.__elems_[22] < 0 )
capacitym1 = (std::__vector_base::pointer)capacitym1->m_data.m_long.capacitym1;
v8 = atoi((const char *)capacitym1);
}
else
{
v8 = 0;
}
a1->m_targetGroupID = v8;
if ( begin[447] )
{
v9 = a2->__begin_ + 447;
if ( a2->__begin_[447].m_data.m_short.shortStorage.__elems_[22] < 0 )
v9 = (std::__vector_base::pointer)v9->m_data.m_long.capacitym1;
v10 = atoi((const char *)v9);
}
else
{
v10 = 0;
}
a1->m_extraID = v10;
if ( begin[525] )
{
v11 = a2->__begin_ + 525;
if ( a2->__begin_[525].m_data.m_short.shortStorage.__elems_[22] < 0 )
v11 = (std::__vector_base::pointer)v11->m_data.m_long.capacitym1;
v12 = atoi((const char *)v11);
}
else
{
v12 = 0;
}
a1->m_extraID2 = v12;
v13 = begin[431];
if ( v13 )
{
v14 = a2->__begin_ + 431;
if ( a2->__begin_[431].m_data.m_short.shortStorage.__elems_[22] < 0 )
v14 = (std::__vector_base::pointer)v14->m_data.m_long.capacitym1;
LOBYTE(v13) = atoi((const char *)v14) != 0;
}
a1->m_resetRemap = (char)v13;
sub_100017D70((__int64)&a1->m_eventIDs, (_QWORD *)a1->m_eventIDs.__tree_.__pair1_.__value_.__left_);
a1->m_eventIDs.__tree_.__begin_node_ = &a1->m_eventIDs.__tree_.__pair1_.__value_;
*(_OWORD *)&a1->m_eventIDs.__tree_.__pair1_.__value_.__left_ = 0u;
if ( *((_QWORD *)a3->__begin_ + 430) )
{
v15 = (std::string *)a2->__begin_;
if ( a2->__begin_[430].m_data.m_short.shortStorage.__elems_[22] < 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_100017238((__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_1000B4D20((__int64)&a1->m_eventIDs, (int *)&v41, &v41);
v34 += 24;
}
v41.__r_.__value_.__r.__words[0] = (std::string::size_type)&v37;
sub_1000177FC((void ***)&v41);
v16 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
}
if ( v16 < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
}