//
// sub_100587328 from 0x100587328 to 0x100587460 (312 bytes)
//
// 1 xrefs:
// > sub_1005834D0 @ 0x10058423c
//
// 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 sub_100587328(__int64 *a1, __int64 a2)
{
_QWORD *v3; // x19
_BYTE *v4; // x8
unsigned __int64 v5; // x8
unsigned __int64 v6; // x21
__int64 v7; // x22
_QWORD *v8; // x23
__int64 v9; // x20
_BYTE *v10; // x8
v3 = (_QWORD *)*a1;
v4 = *(_BYTE **)(*a1 + 112);
if ( v4 && (*v4 & 0x10) != 0 )
sub_10056FCA8(*a1, 4);
v5 = v3[145];
if ( v5 )
{
v6 = 0;
v7 = v3[4398];
v8 = (_QWORD *)(v7 + 8);
while ( *v8 != a2 )
{
++v6;
v8 += 22;
if ( v6 >= v5 )
goto LABEL_11;
}
if ( a2 )
{
sub_100583484(a2);
*v8 = 0;
v9 = v7 + 176 * v6;
*(_QWORD *)(v9 + 24) = 0;
off_10085DEB8(*(void **)(v9 + 72));
*(_QWORD *)(v9 + 72) = 0;
off_10085DEB8(*(void **)(v9 + 64));
*(_QWORD *)(v9 + 64) = 0;
off_10085DEB8(*(void **)(v9 + 112));
*(_QWORD *)(v9 + 112) = 0;
off_10085DEB8(*(void **)(v9 + 104));
*(_QWORD *)(v9 + 104) = 0;
off_10085DEB8(*(void **)(v9 + 96));
*(_QWORD *)(v9 + 96) = 0;
off_10085DEB8(*(void **)v9);
*(_QWORD *)v9 = 0;
}
}
LABEL_11:
v10 = (_BYTE *)v3[14];
if ( v10 )
{
if ( (*v10 & 0x10) != 0 )
sub_10056FCF4((__int64)v3, 4);
}
}