//
// sub_100364710 from 0x100364710 to 0x100364844 (308 bytes)
//
// 2 xrefs:
// > sub_100364844 @ 0x1003649f0
// > sub_100365890 @ 0x100365a88
//
// 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
//
__int64 __fastcall sub_100364710(__int64 a1, std::vector *a2)
{
int v4; // w8
int *v5; // x1
__int64 result; // x0
char v7; // [xsp+Eh] [xbp-22h] BYREF
char v8; // [xsp+Fh] [xbp-21h] BYREF
v4 = *(_DWORD *)(a1 + 1028);
if ( v4 > 2067 )
{
if ( v4 == 2068 || v4 == 3607 )
{
ChanceTriggerGameObject::getTargetIDs((ChanceTriggerGameObject *)a1, a2);
goto LABEL_20;
}
if ( v4 != 3620 )
goto LABEL_17;
LABEL_13:
if ( *(int *)(a1 + 1464) >= 1 )
sub_10000CBA8((__int64)a2, (int *)(a1 + 1464));
if ( *(int *)(a1 + 1468) >= 1 )
{
v5 = (int *)(a1 + 1468);
goto LABEL_19;
}
goto LABEL_20;
}
if ( v4 == 1912 )
goto LABEL_13;
if ( v4 != 2063 )
{
LABEL_17:
if ( *(int *)(a1 + 1464) < 1 )
goto LABEL_20;
v5 = (int *)(a1 + 1464);
goto LABEL_19;
}
if ( *(int *)(a1 + 1464) >= 1 )
sub_10000CBA8((__int64)a2, (int *)(a1 + 1464));
if ( *(int *)(a1 + 1840) >= 1 )
{
v5 = (int *)(a1 + 1840);
LABEL_19:
sub_10000CBA8((__int64)a2, v5);
}
LABEL_20:
std::__sort &,int *>(a2->__begin_, a2->__end_, &v7);
result = sub_10036DC28(a2->__begin_, a2->__end_, &v8);
if ( (std::__vector_base::pointer)result != a2->__end_ )
a2->__end_ = (std::__vector_base::pointer)result;
return result;
}