//
// sub_1005B8208 from 0x1005b8208 to 0x1005b8278 (112 bytes)
//
// 1 xrefs:
// > sub_1005BC950 @ 0x1005bc998
//
// 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_1005B8208(void **a1, void *a2, void (__fastcall *a3)(void *), void *a4)
{
void **v4; // x19
void **v5; // x8
void *v6; // x20
v4 = a1;
if ( a1 )
{
v5 = (void **)*a1;
if ( *a1 )
{
while ( v5[2] != a2 || v5[3] != a3 || v5[4] != a4 )
{
v4 = v5;
v5 = (void **)*v5;
if ( !v5 )
return;
}
v6 = *v5;
a3(v5[1]);
sub_100588C44(*v4);
*v4 = v6;
}
}
}