//
// SRP_create_verifier_BN from 0xde0038 to 0xde01a0 (360 bytes)
//
// 3 xrefs:
// > SSL_set_srp_server_param_pw @ 0xd5c6ac
// > SRP_create_verifier @ 0xde02c8
// > ??> @ 0x2be18
//
// 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 SRP_create_verifier_BN(
const char *a1,
const char *a2,
unsigned __int64 **a3,
__int64 *a4,
__int64 a5,
__int64 a6)
{
__int64 v12; // x22
unsigned __int64 *v13; // x19
unsigned __int64 *v14; // x23
__int64 v15; // x0
unsigned int v16; // w21
unsigned __int64 *v17; // x0
_BYTE v19[2504]; // [xsp+68h] [xbp+68h] BYREF
v12 = BN_CTX_new(a1, a2, a3);
if ( !a1 || !a2 || !a3 || !a4 )
{
if ( !a3 )
{
v14 = nullptr;
v16 = 0;
goto LABEL_16;
}
goto LABEL_12;
}
if ( a5 == 0 || a6 == 0 || !v12 )
{
LABEL_12:
v13 = nullptr;
goto LABEL_13;
}
v13 = *a3;
if ( !*a3 )
{
if ( (int)RAND_bytes((__int64)v19, 20) > 0 )
{
v13 = BN_bin2bn(v19, 20, 0);
goto LABEL_8;
}
LABEL_13:
v17 = *a3;
v14 = nullptr;
v16 = 0;
goto LABEL_14;
}
LABEL_8:
v14 = SRP_Calc_x(v13, a1, a2);
v15 = BN_new();
*a4 = v15;
v16 = v15;
if ( v15 )
{
v16 = BN_mod_exp(v15, a6, v14, a5, v12);
if ( v16 )
{
*a3 = v13;
v17 = v13;
v16 = 1;
goto LABEL_14;
}
BN_clear_free((_BYTE *)*a4);
}
v17 = *a3;
LABEL_14:
if ( v13 != v17 )
BN_clear_free(v13);
LABEL_16:
BN_clear_free(v14);
BN_CTX_free(v12);
return v16;
}