//
// sub_7D1CA8 from 0x7d1ca8 to 0x7d1d44 (156 bytes)
//
// 1 xrefs:
// > ??> @ 0xa307c0
//
// 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
//
int __fastcall sub_7D1CA8(int a1, char *a2)
{
size_t v4; // r0
int *v5; // r1
size_t v6; // r7
int result; // r0
ssize_t v8; // r4
v4 = strlen(a2);
v5 = *(int **)(a1 + 32);
v6 = v4;
if ( *v5 == 5 || (result = sub_7D14BC(a1, v5), result > 0) )
{
*(_DWORD *)_errno() = 0;
v8 = write(*(_DWORD *)(a1 + 28), a2, v6);
BIO_clear_flags(a1, 15);
result = v8;
if ( v8 <= 0 )
{
if ( BIO_sock_should_retry(v8) )
BIO_set_flags(a1, 10);
return v8;
}
}
return result;
}