//
// sub_1005814B0 from 0x1005814b0 to 0x100581530 (128 bytes)
//
// 2 xrefs:
// > sub_10055CD64 @ 0x10055e43c
// > sub_10056B898 @ 0x10056b8f4
//
// 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_1005814B0(__int64 result, __int64 a2, __int64 (__fastcall *a3)(__int64, __int64))
{
__int64 *v5; // x21
__int64 v6; // x22
__int64 *v7; // x22
__int64 v8; // x0
__int64 *v9[3]; // [xsp+8h] [xbp-38h] BYREF
if ( result )
{
sub_10056C468(result, (__int64)v9);
result = sub_10056C478(v9);
v5 = (__int64 *)result;
while ( v5 )
{
v6 = *v5;
result = sub_10056C478(v9);
v5 = (__int64 *)result;
v7 = **(__int64 ***)(v6 + 16);
while ( v7 )
{
v8 = *v7;
v7 = (__int64 *)v7[2];
result = a3(v8, a2);
if ( (_DWORD)result == 1 )
return result;
}
}
}
return result;
}