//
// sub_FF5EB8 from 0xff5eb8 to 0xff5f74 (188 bytes)
//
// 1 xrefs:
// > ??> @ 0x13ff978
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:15:48 +0000
//
__int64 __fastcall sub_FF5EB8(__int64 a1, char *a2)
{
int v4; // w0
unsigned int *v5; // x1
int v6; // w22
__int64 result; // x0
int v8; // w19
v4 = strlen(a2);
v5 = *(unsigned int **)(a1 + 48);
v6 = v4;
if ( *v5 != 5 )
{
LODWORD(result) = sub_FF571C(a1, v5);
if ( (int)result <= 0 )
return (unsigned int)result;
}
*(_DWORD *)__errno() = 0;
v8 = write(*(_DWORD *)(a1 + 40), a2, v6);
BIO_clear_flags(a1, 15);
if ( v8 <= 0 )
{
if ( (unsigned int)BIO_sock_should_retry((unsigned int)v8) )
BIO_set_flags(a1, 10);
}
return (unsigned int)v8;
}