//
// sub_61958C from 0x61958c to 0x619630 (164 bytes)
//
// 3 xrefs:
// > sub_61AB24 @ 0x61abd8
// > sub_61ABE8 @ 0x61b634
// > sub_61BFD4 @ 0x61c172
//
// 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_61958C(size_t *a1, int a2)
{
_DWORD *v3; // r5
_DWORD *v4; // r6
int result; // r0
v3 = (_DWORD *)*a1;
v4 = *(_DWORD **)(*a1 + 332);
if ( !*((_BYTE *)a1 + 634) )
{
if ( a1[299] != 33 )
{
LABEL_3:
sub_62A980(a1, 1, a1[300], a1[301], 0, *v4, -1, 0);
LABEL_4:
result = 0;
a1[298] = 0;
*((_BYTE *)a1 + 1104) = 1;
return result;
}
LABEL_8:
*(_QWORD *)*v4 = 0;
sub_610EC8(v3, a2, v3[8678], v3[8679]);
sub_62A980(a1, -1, -1, -1, 0, 0, 1, *v4);
goto LABEL_4;
}
sub_61807C(*a1, "Doing the SSL/TLS handshake on the data stream\n");
result = sub_645454(a1, 1);
if ( !result )
{
if ( a1[299] != 33 )
goto LABEL_3;
goto LABEL_8;
}
return result;
}