//
// sub_880174 from 0x880174 to 0x880270 (252 bytes)
//
// 2 xrefs:
// > ??> @ 0xa3a1a4
// > ??> @ 0xa3a210
//
// 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_880174(_DWORD *a1, int a2)
{
_BYTE *v4; // r0
_BYTE *v5; // r4
int *v6; // r5
int v7; // r0
int v8; // r8
int v9; // lr
int v10; // r12
int v11; // r1
int v12; // r2
const char **v13; // r0
const void *v14; // r0
void *v15; // r0
v4 = CRYPTO_zalloc(&dword_38, (int)"crypto/dh/dh_pmeth.c", 51);
v5 = v4;
if ( v4 )
{
v4[32] = 1;
*(_DWORD *)v4 = 1024;
*((_DWORD *)v4 + 3) = -1;
*((_DWORD *)v4 + 1) = 2;
a1[5] = v4;
v6 = *(int **)(a2 + 20);
v7 = v6[2];
v8 = *v6;
v9 = v6[3];
v10 = v6[1];
v11 = v6[4];
v12 = v6[5];
a1[9] = 2;
a1[8] = v5 + 24;
*((_DWORD *)v5 + 2) = v7;
*(_DWORD *)v5 = v8;
*((_DWORD *)v5 + 3) = v9;
*((_DWORD *)v5 + 1) = v10;
*((_DWORD *)v5 + 4) = v11;
*((_DWORD *)v5 + 5) = v12;
v5[32] = *((_BYTE *)v6 + 32);
v13 = OBJ_dup((const char **)v6[9]);
*((_DWORD *)v5 + 9) = v13;
if ( v13 )
{
v14 = (const void *)v6[11];
*((_DWORD *)v5 + 10) = v6[10];
if ( !v14 )
{
LABEL_6:
*((_DWORD *)v5 + 13) = v6[13];
return 1;
}
v15 = CRYPTO_memdup(v14, (void *)v6[12], (int)"crypto/dh/dh_pmeth.c", 97);
*((_DWORD *)v5 + 11) = v15;
if ( v15 )
{
*((_DWORD *)v5 + 12) = v6[12];
goto LABEL_6;
}
}
}
return 0;
}