//
// EnhancedGameObject::customObjectSetup from 0x1005cc380 to 0x1005cc7c2 (1090 bytes)
//
// 5 xrefs:
// > EffectGameObject::customObjectSetup @ 0x100197e9a
// > ParticleGameObject::customObjectSetup @ 0x1001b17a8
// > SpecialAnimGameObject::customObjectSetup @ 0x1001b3b73
// > ??> @ 0x1008c45c0
// > ??> @ 0x100972128
//
// 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 EnhancedGameObject::customObjectSetup(
EnhancedGameObject *a1,
std::vector *a2,
std::vector *a3)
{
std::__vector_base::pointer begin; // r12
std::__vector_base::pointer v6; // rdi
const char *longStorage; // rdi
std::__vector_base::pointer v8; // rdi
const char *elems; // rdi
std::__vector_base::pointer v10; // rdi
const char *v11; // rdi
std::__vector_base::pointer v12; // rdi
const char *v13; // rdi
float m_rotationAngle; // xmm1_4
float v15; // xmm0_4
std::__vector_base::pointer v16; // r12
std::__vector_base::pointer v17; // rdi
const char *v18; // rdi
bool v19; // r13
std::__vector_base::pointer v20; // rdi
const char *v21; // rdi
float v22; // xmm0_4
std::__vector_base::pointer v23; // rdi
const char *v24; // rdi
std::__vector_base::pointer v25; // rdi
const char *v26; // rdi
bool v27; // al
std::__vector_base::pointer v28; // rdi
const char *v29; // rdi
std::__vector_base::pointer v30; // rdi
const char *v31; // rdi
std::__vector_base::pointer v32; // rdi
const char *v33; // rdi
bool v34; // al
std::__vector_base::pointer v35; // rdi
const char *v36; // rdi
begin = a3->__begin_;
if ( !*((_QWORD *)a3->__begin_ + 99) )
{
a1->m_isMultiActivate = 0;
if ( begin[444] )
goto LABEL_9;
LABEL_5:
a1->m_isNoMultiActivate = 0;
if ( a1->m_hasCustomRotation )
goto LABEL_13;
goto LABEL_27;
}
v6 = a2->__begin_;
if ( (a2->__begin_[99].m_data.m_short.sizex2 & 1) != 0 )
longStorage = v6[99].m_data.m_long.longStorage;
else
longStorage = v6[99].m_data.m_short.shortStorage.__elems_;
a1->m_isMultiActivate = atoi(longStorage) != 0;
if ( !begin[444] )
goto LABEL_5;
LABEL_9:
v8 = a2->__begin_;
if ( (a2->__begin_[444].m_data.m_short.sizex2 & 1) != 0 )
elems = v8[444].m_data.m_long.longStorage;
else
elems = v8[444].m_data.m_short.shortStorage.__elems_;
a1->m_isNoMultiActivate = atoi(elems) != 0;
if ( a1->m_hasCustomRotation )
{
LABEL_13:
if ( begin[98] )
{
v10 = a2->__begin_;
if ( (a2->__begin_[98].m_data.m_short.sizex2 & 1) != 0 )
v11 = v10[98].m_data.m_long.longStorage;
else
v11 = v10[98].m_data.m_short.shortStorage.__elems_;
a1->m_disableRotation = atoi(v11) != 0;
if ( begin[97] )
{
LABEL_20:
v12 = a2->__begin_;
if ( (a2->__begin_[97].m_data.m_short.sizex2 & 1) != 0 )
v13 = v12[97].m_data.m_long.longStorage;
else
v13 = v12[97].m_data.m_short.shortStorage.__elems_;
m_rotationAngle = atof(v13);
a1->m_rotationSpeed = m_rotationAngle;
if ( m_rotationAngle != 0.0 )
{
v15 = 1.0;
goto LABEL_26;
}
LABEL_24:
m_rotationAngle = a1->m_rotationAngle;
v15 = flt_100817B30[(float)((float)rand() * 4.6566129e-10) > 0.5];
LABEL_26:
a1->m_rotationDelta = m_rotationAngle * v15;
goto LABEL_27;
}
}
else
{
a1->m_disableRotation = 0;
if ( begin[97] )
goto LABEL_20;
}
a1->m_rotationSpeed = 0.0;
goto LABEL_24;
}
LABEL_27:
if ( !a1->m_hasCustomAnimation )
return;
v16 = a3->__begin_;
if ( !*((_QWORD *)a3->__begin_ + 106) )
{
a1->m_animationRandomizedStart = 0;
if ( v16[107] )
goto LABEL_37;
LABEL_32:
a1->m_animationSpeed = 0.0;
if ( v16[123] )
goto LABEL_41;
goto LABEL_33;
}
v17 = a2->__begin_;
if ( (a2->__begin_[106].m_data.m_short.sizex2 & 1) != 0 )
v18 = v17[106].m_data.m_long.longStorage;
else
v18 = v17[106].m_data.m_short.shortStorage.__elems_;
a1->m_animationRandomizedStart = atoi(v18) != 0;
if ( !v16[107] )
goto LABEL_32;
LABEL_37:
v20 = a2->__begin_;
if ( (a2->__begin_[107].m_data.m_short.sizex2 & 1) != 0 )
v21 = v20[107].m_data.m_long.longStorage;
else
v21 = v20[107].m_data.m_short.shortStorage.__elems_;
v22 = atof(v21);
a1->m_animationSpeed = v22;
if ( v16[123] )
{
LABEL_41:
v23 = a2->__begin_;
if ( (a2->__begin_[123].m_data.m_short.sizex2 & 1) != 0 )
v24 = v23[123].m_data.m_long.longStorage;
else
v24 = v23[123].m_data.m_short.shortStorage.__elems_;
v19 = atoi(v24) != 0;
a1->m_animateOnTrigger = v19;
if ( a1->m_animationShouldUseSpeed )
goto LABEL_52;
goto LABEL_45;
}
LABEL_33:
v19 = 0;
a1->m_animateOnTrigger = 0;
if ( a1->m_animationShouldUseSpeed )
goto LABEL_52;
LABEL_45:
if ( v16[122] )
{
v25 = a2->__begin_;
if ( (a2->__begin_[122].m_data.m_short.sizex2 & 1) != 0 )
v26 = v25[122].m_data.m_long.longStorage;
else
v26 = v25[122].m_data.m_short.shortStorage.__elems_;
v27 = atoi(v26) != 0;
}
else
{
v27 = 0;
}
a1->m_animationShouldUseSpeed = v27;
LABEL_52:
if ( !v19 )
{
if ( v16[126] )
goto LABEL_54;
LABEL_57:
a1->m_disableDelayedLoop = 0;
if ( v16[214] )
goto LABEL_64;
LABEL_58:
a1->m_animateOnlyWhenActive = 0;
if ( v16[462] )
goto LABEL_70;
goto LABEL_59;
}
EnhancedGameObject::waitForAnimationTrigger(a1);
v16 = a3->__begin_;
if ( !*((_QWORD *)a3->__begin_ + 126) )
goto LABEL_57;
LABEL_54:
v28 = a2->__begin_;
if ( (a2->__begin_[126].m_data.m_short.sizex2 & 1) != 0 )
v29 = v28[126].m_data.m_long.longStorage;
else
v29 = v28[126].m_data.m_short.shortStorage.__elems_;
a1->m_disableDelayedLoop = atoi(v29) != 0;
if ( !v16[214] )
goto LABEL_58;
LABEL_64:
v32 = a2->__begin_;
if ( (a2->__begin_[214].m_data.m_short.sizex2 & 1) != 0 )
v33 = v32[214].m_data.m_long.longStorage;
else
v33 = v32[214].m_data.m_short.shortStorage.__elems_;
a1->m_animateOnlyWhenActive = atoi(v33) != 0;
if ( v16[462] )
{
LABEL_70:
v35 = a2->__begin_;
if ( (a2->__begin_[462].m_data.m_short.sizex2 & 1) != 0 )
v36 = v35[462].m_data.m_long.longStorage;
else
v36 = v35[462].m_data.m_short.shortStorage.__elems_;
a1->m_singleFrame = atoi(v36);
if ( !v16[592] )
goto LABEL_74;
LABEL_60:
v30 = a2->__begin_;
if ( (a2->__begin_[592].m_data.m_short.sizex2 & 1) != 0 )
v31 = v30[592].m_data.m_long.longStorage;
else
v31 = v30[592].m_data.m_short.shortStorage.__elems_;
v34 = atoi(v31) != 0;
goto LABEL_75;
}
LABEL_59:
a1->m_singleFrame = 0;
if ( v16[592] )
goto LABEL_60;
LABEL_74:
v34 = 0;
LABEL_75:
a1->m_animationOffset = v34;
}