//
// SSL_SRP_CTX_init from 0x7b5544 to 0x7b5784 (576 bytes)
//
// 2 xrefs:
// > ssl3_new @ 0x78e100
// > ??> @ 0x5ac7c
//
// 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_SRP_CTX_init(int result)
{
_DWORD *v1; // r5
_DWORD *v2; // r4
int v3; // r0
int v4; // r6
int v5; // lr
int v6; // r12
int v7; // r1
int v8; // r2
int v9; // r0
int v10; // r0
int v11; // r0
int v12; // r0
int v13; // r0
int v14; // r0
int v15; // r0
int v16; // r0
int v17; // r0
int v18; // r0
if ( result )
{
v1 = *(_DWORD **)(result + 276);
if ( v1 )
{
v2 = (_DWORD *)result;
v3 = v1[102];
v4 = v1[98];
v5 = v1[99];
v6 = v1[100];
v7 = v1[110];
v8 = v1[111];
v2[122] = v1[97];
v2[123] = v4;
v2[124] = v5;
v2[125] = v6;
v2[127] = 0;
v2[128] = 0;
v2[129] = 0;
v2[130] = 0;
v2[131] = 0;
v2[132] = 0;
v2[133] = 0;
v2[134] = 0;
v2[126] = 0;
v2[135] = v7;
v2[136] = v8;
if ( v3 )
{
v9 = BN_dup();
v2[127] = v9;
if ( !v9 )
goto LABEL_22;
}
if ( v1[103] )
{
v10 = BN_dup();
v2[128] = v10;
if ( !v10 )
goto LABEL_22;
}
if ( v1[104] )
{
v11 = BN_dup();
v2[129] = v11;
if ( !v11 )
goto LABEL_22;
}
if ( v1[105] )
{
v12 = BN_dup();
v2[130] = v12;
if ( !v12 )
goto LABEL_22;
}
if ( v1[106] )
{
v13 = BN_dup();
v2[131] = v13;
if ( !v13 )
goto LABEL_22;
}
if ( v1[107] && (v14 = BN_dup(), (v2[132] = v14) == 0)
|| v1[109] && (v15 = BN_dup(), (v2[134] = v15) == 0)
|| v1[108] && (v16 = BN_dup(), (v2[133] = v16) == 0) )
{
LABEL_22:
ERR_put_error(20, 313, 3, "ssl/tls_srp.c", 127);
}
else
{
v17 = v1[101];
if ( !v17 || (v18 = CRYPTO_strdup(v17, "ssl/tls_srp.c", 131), (v2[126] = v18) != 0) )
{
v2[137] = v1[112];
return 1;
}
ERR_put_error(20, 313, 68, "ssl/tls_srp.c", 132);
}
CRYPTO_free(v2[126], "ssl/tls_srp.c", 139);
BN_free(v2[127]);
BN_free(v2[128]);
BN_free(v2[129]);
BN_free(v2[130]);
BN_free(v2[131]);
BN_free(v2[132]);
BN_free(v2[133]);
BN_free(v2[134]);
return 0;
}
else
{
return 0;
}
}
return result;
}