//
// sub_1005DBD58 from 0x1005dbd58 to 0x1005dbe20 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008610d8
//
// 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
//
ssize_t __fastcall sub_1005DBD58(__int64 a1, void *a2, int a3)
{
ssize_t v6; // x20
int v8; // w8
if ( !a2 )
return 0;
*__error() = 0;
v6 = read(*(_DWORD *)(a1 + 40), a2, a3);
sub_1005DA600(a1, 15);
if ( (int)v6 <= 0 && (unsigned int)(v6 + 1) <= 1 )
{
v8 = *__error();
if ( v8 > 56 )
{
if ( v8 == 57 || v8 == 100 )
LABEL_16:
sub_1005DA61C(a1, 9);
}
else if ( (unsigned int)v8 <= 0x25 && ((1LL << v8) & 0x3800000010LL) != 0 )
{
goto LABEL_16;
}
}
return v6;
}