//
// sub_1005D8EF0 from 0x1005d8ef0 to 0x1005d8f7c (140 bytes)
//
// 1 xrefs:
// > sub_1005D64C4 @ 0x1005d6544
//
// 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_1005D8EF0(__int64 result)
{
__int64 v1; // x19
__int64 (__fastcall *v2)(__int64, _QWORD, __int64 *, _QWORD); // x8
__int64 v3; // x20
int v4; // w21
__int64 v5; // [xsp+0h] [xbp-30h] BYREF
void *v6; // [xsp+8h] [xbp-28h] BYREF
v1 = result;
v2 = *(__int64 (__fastcall **)(__int64, _QWORD, __int64 *, _QWORD))(result + 96);
if ( v2 )
{
result = v2(result, 0, &v5, 0);
if ( (int)result >= 1 )
{
v3 = 0;
v4 = result;
do
{
result = (*(__int64 (__fastcall **)(__int64, void **, _QWORD, _QWORD))(v1 + 96))(
v1,
&v6,
0,
*(unsigned int *)(v5 + 4 * v3));
if ( (_DWORD)result )
result = sub_1005F92DC(v6);
++v3;
}
while ( v4 != (_DWORD)v3 );
}
}
return result;
}