//
// EventLinkTrigger::customObjectSetup from 0x4f7250 to 0x4f754c (764 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:51:17 +0000
//
int __fastcall EventLinkTrigger::customObjectSetup(unsigned int a1, int *a2, int a3)
{
int v6; // r0
int v7; // r0
const char *v8; // r0
int v9; // r0
const char *v10; // r0
int v11; // r0
const char *v12; // r0
int v13; // r0
const char *v14; // r0
int v15; // r3
unsigned __int8 *v16; // r7
int v17; // r5
unsigned __int8 *first_of; // r0
bool v19; // zf
unsigned int v20; // r7
int v21; // r9
int v22; // r3
int *v23; // r11
char *i; // r5
unsigned __int8 *v26; // r12
unsigned int v27; // r5
unsigned __int8 *v28; // r5
unsigned __int8 *v29; // r0
const char *v30; // r0
int v31; // r0
_DWORD *v32; // r3
int v33; // r8
int v34; // r2
_DWORD *v35; // r2
_DWORD *v36; // r7
_DWORD *v37; // r0
_DWORD *v38; // r3
int v39; // r3
unsigned __int8 *v40; // [sp+14h] [bp-38h]
_DWORD *v41; // [sp+1Ch] [bp-30h] BYREF
int v42; // [sp+20h] [bp-2Ch] BYREF
unsigned int v43; // [sp+24h] [bp-28h]
unsigned __int8 *v44; // [sp+28h] [bp-24h]
int *v45; // [sp+2Ch] [bp-20h] BYREF
int *v46; // [sp+30h] [bp-1Ch]
int *v47; // [sp+34h] [bp-18h]
int v48[3]; // [sp+38h] [bp-14h] BYREF
EffectGameObject::customObjectSetup(a1, a2, a3);
v6 = *(_DWORD *)(*(_DWORD *)a3 + 204);
if ( v6 )
{
v7 = *a2;
if ( (*(_BYTE *)(*a2 + 612) & 1) != 0 )
v8 = *(const char **)(v7 + 620);
else
v8 = (const char *)(v7 + 613);
v6 = atoi(v8);
}
*(_DWORD *)(a1 + 1284) = v6;
v9 = *(_DWORD *)(*(_DWORD *)a3 + 1788);
if ( v9 )
{
if ( (*(_BYTE *)(*a2 + 5364) & 1) != 0 )
v10 = *(const char **)(*a2 + 5372);
else
v10 = (const char *)(*a2 + 5365);
v9 = atoi(v10);
}
*(_DWORD *)(a1 + 1664) = v9;
v11 = *(_DWORD *)(*(_DWORD *)a3 + 2100);
if ( v11 )
{
if ( (*(_BYTE *)(*a2 + 6300) & 1) != 0 )
v12 = *(const char **)(*a2 + 6308);
else
v12 = (const char *)(*a2 + 6301);
v11 = atoi(v12);
}
*(_DWORD *)(a1 + 1668) = v11;
v13 = *(_DWORD *)(*(_DWORD *)a3 + 1724);
if ( v13 )
{
if ( (*(_BYTE *)(*a2 + 5172) & 1) != 0 )
v14 = *(const char **)(*a2 + 5180);
else
v14 = (const char *)(*a2 + 5173);
LOBYTE(v13) = atoi(v14) != 0;
}
*(_BYTE *)(a1 + 1660) = v13;
std::__tree::destroy(a1 + 1648, *(_DWORD **)(a1 + 1652));
*(_DWORD *)(a1 + 1648) = a1 + 1652;
*(_DWORD *)(a1 + 1656) = 0;
*(_DWORD *)(a1 + 1652) = 0;
if ( *(_DWORD *)(*(_DWORD *)a3 + 1720) )
{
std::string::basic_string(&v42, *a2 + 5160);
}
else
{
v42 = 0;
v43 = 0;
v44 = nullptr;
std::string::__init(&v42, &unk_B6B226, 0);
}
if ( (v42 & 1) != 0 )
{
v15 = v43;
if ( !v43 )
return std::string::~string((int)&v42);
v16 = v44;
v45 = nullptr;
v46 = nullptr;
v47 = nullptr;
}
else
{
v15 = (int)(unsigned __int8)v42 >> 1;
if ( !v15 )
return std::string::~string((int)&v42);
v16 = (unsigned __int8 *)&v42 + 1;
v45 = (int *)(v42 & 1);
v46 = v45;
v47 = v45;
}
v17 = (int)&v16[v15];
first_of = std::__find_first_of_ce(
v16,
&v16[v15],
(int)".",
(int)"",
(int (__fastcall *)(_DWORD, int))std::char_traits::eq);
v19 = first_of == (unsigned __int8 *)v17;
if ( first_of != (unsigned __int8 *)v17 )
v17 = first_of - v16;
v20 = 0;
if ( v19 )
v17 = -1;
if ( (v42 & 1) != 0 )
v21 = v43;
else
v21 = (int)(unsigned __int8)v42 >> 1;
while ( 1 )
{
std::string::basic_string(v48, (unsigned __int8 *)&v42, v20, v17 - v20);
if ( (v48[0] & 1) != 0 )
v22 = v48[1];
else
v22 = (int)LOBYTE(v48[0]) >> 1;
if ( v22 || v20 != v21 )
{
if ( v46 == v47 )
{
std::vector::__push_back_slow_path((int *)&v45, (int)v48);
}
else
{
if ( v46 )
std::string::basic_string(v46, (int)v48);
v46 += 3;
}
}
if ( v17 == -1 )
break;
v20 = v17 + 1;
if ( (v42 & 1) != 0 )
{
v26 = v44;
v27 = v43;
}
else
{
v27 = (int)(unsigned __int8)v42 >> 1;
v26 = (unsigned __int8 *)&v42 + 1;
}
if ( v20 >= v27
|| (v28 = &v26[v27],
v40 = v26,
v29 = std::__find_first_of_ce(
&v26[v20],
v28,
(int)".",
(int)"",
(int (__fastcall *)(_DWORD, int))std::char_traits::eq),
v29 == v28) )
{
v17 = -1;
}
else
{
v17 = v29 - v40;
}
std::string::~string((int)v48);
}
std::string::~string((int)v48);
v23 = v46;
for ( i = (char *)v45 + 1; v23 != (int *)(i - 1); i += 12 )
{
if ( (*(i - 1) & 1) != 0 )
v30 = *(const char **)(i + 7);
else
v30 = i;
v31 = atoi(v30);
v32 = *(_DWORD **)(a1 + 1652);
v33 = v31;
if ( v32 )
{
while ( 1 )
{
v34 = v32[4];
if ( v31 >= v34 )
{
if ( v34 >= v31 )
{
v41 = v32;
v36 = &v41;
goto LABEL_66;
}
v35 = (_DWORD *)v32[1];
if ( !v35 )
{
v41 = v32;
v36 = v32 + 1;
goto LABEL_66;
}
}
else
{
v35 = (_DWORD *)*v32;
if ( !*v32 )
{
v41 = v32;
v36 = v32;
goto LABEL_66;
}
}
v32 = v35;
}
}
v36 = (_DWORD *)(a1 + 1652);
v41 = (_DWORD *)(a1 + 1652);
LABEL_66:
if ( !*v36 )
{
v37 = (_DWORD *)operator new(0x14u);
v38 = v41;
v37[4] = v33;
*v37 = 0;
v37[1] = 0;
v37[2] = v38;
*v36 = v37;
v39 = **(_DWORD **)(a1 + 1648);
if ( v39 )
*(_DWORD *)(a1 + 1648) = v39;
std::__tree_balance_after_insert *>(*(_DWORD **)(a1 + 1652), (_DWORD *)*v36);
++*(_DWORD *)(a1 + 1656);
}
}
std::__vector_base::~__vector_base((int)&v45);
return std::string::~string((int)&v42);
}