//
// sub_D78620 from 0xd78620 to 0xd786b4 (148 bytes)
//
// 1 xrefs:
// > ??> @ 0x1122408
//
// 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_D78620(__int64 result)
{
__int64 v1; // x19
int v2; // w1
_DWORD *v3; // x20
int v4; // w0
v1 = result;
if ( result )
{
v2 = *(_DWORD *)(result + 28);
result = 1;
v3 = *(_DWORD **)(v1 + 48);
if ( v2 )
{
v4 = *(_DWORD *)(v1 + 40);
if ( v4 != -1 )
{
if ( *v3 == 5 )
{
shutdown(v4, 2);
v4 = *(_DWORD *)(v1 + 40);
}
BIO_closesocket(v4);
*(_DWORD *)(v1 + 40) = -1;
}
BIO_CONNECT_free((__int64)v3);
*(_QWORD *)(v1 + 48) = 0;
*(_DWORD *)(v1 + 32) = 0;
*(_DWORD *)(v1 + 24) = 0;
return 1;
}
}
return result;
}