//
// sub_1005DBE20 from 0x1005dbe20 to 0x1005dbee4 (196 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008610e0
//
// 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_1005DBE20(__int64 a1, char *__s)
{
int v4; // w21
ssize_t v5; // x20
int v7; // w8
v4 = strlen(__s);
*__error() = 0;
v5 = write(*(_DWORD *)(a1 + 40), __s, v4);
sub_1005DA600(a1, 15);
if ( (int)v5 <= 0 && (unsigned int)(v5 + 1) <= 1 )
{
v7 = *__error();
if ( v7 > 56 )
{
if ( v7 == 57 || v7 == 100 )
LABEL_14:
sub_1005DA61C(a1, 10);
}
else if ( (unsigned int)v7 <= 0x25 && ((1LL << v7) & 0x3800000010LL) != 0 )
{
goto LABEL_14;
}
}
return v5;
}