//
// SSL_CONF_cmd_argv from 0x7bc970 to 0x7bca6c (252 bytes)
//
// 1 xrefs:
// > ??> @ 0x5e0bc
//
// 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 SSL_CONF_cmd_argv(int *a1, int *a2, int *a3)
{
int v5; // r12
int v6; // r2
char *v7; // r1
int v8; // r2
int v9; // r3
int result; // r0
int v11; // r2
char *v12; // r1
int v13; // r2
if ( a2 )
{
v5 = *a2;
if ( *a2 <= 0 )
return 0;
v6 = *a3;
v7 = *(char **)v6;
if ( !*(_DWORD *)v6 )
return 0;
if ( v5 == 1 )
{
*a1 = *a1 & 0xFFFFFFFC | 1;
v9 = SSL_CONF_cmd(a1, v7, 0);
if ( v9 > 0 )
goto LABEL_6;
}
else
{
v8 = *(_DWORD *)(v6 + 4);
*a1 = *a1 & 0xFFFFFFFC | 1;
v9 = SSL_CONF_cmd(a1, v7, v8);
if ( v9 > 0 )
{
LABEL_6:
*a3 += 4 * v9;
*a2 -= v9;
return v9;
}
}
}
else
{
v11 = *a3;
v12 = *(char **)v11;
if ( !*(_DWORD *)v11 )
return 0;
v13 = *(_DWORD *)(v11 + 4);
*a1 = *a1 & 0xFFFFFFFC | 1;
result = SSL_CONF_cmd(a1, v12, v13);
v9 = result;
if ( result > 0 )
{
*a3 += 4 * result;
return result;
}
}
if ( v9 == -2 )
return 0;
if ( v9 )
return v9;
else
return -1;
}