//
// sub_88B108 from 0x88b108 to 0x88b1ec (228 bytes)
//
// 1 xrefs:
// > ??> @ 0xa3a2e8
//
// 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_88B108(int a1, int a2)
{
_BYTE *v4; // r0
_BYTE *v5; // r4
int v6; // r5
int v7; // r0
int *v8; // r0
_DWORD *v9; // r0
const void *v10; // r0
int v11; // r3
void *v12; // r0
v4 = CRYPTO_zalloc(&dword_20, (int)"crypto/ec/ec_pmeth.c", 45);
v5 = v4;
if ( v4 )
{
v4[12] = -1;
v4[13] = 1;
*(_DWORD *)(a1 + 20) = v4;
v6 = *(_DWORD *)(a2 + 20);
if ( !*(_DWORD *)v6 || (v7 = EC_GROUP_dup(*(int ***)v6), (*(_DWORD *)v5 = v7) != 0) )
{
v8 = *(int **)(v6 + 8);
*((_DWORD *)v5 + 1) = *(_DWORD *)(v6 + 4);
if ( !v8 || (v9 = EC_KEY_dup(v8), (*((_DWORD *)v5 + 2) = v9) != 0) )
{
v5[13] = *(_BYTE *)(v6 + 13);
v10 = *(const void **)(v6 + 20);
v11 = *(_DWORD *)(v6 + 28);
*((_DWORD *)v5 + 4) = *(_DWORD *)(v6 + 16);
*((_DWORD *)v5 + 7) = v11;
if ( !v10 )
{
*((_DWORD *)v5 + 5) = 0;
goto LABEL_8;
}
v12 = CRYPTO_memdup(v10, *(void **)(v6 + 24), (int)"crypto/ec/ec_pmeth.c", 78);
*((_DWORD *)v5 + 5) = v12;
if ( v12 )
{
LABEL_8:
*((_DWORD *)v5 + 6) = *(_DWORD *)(v6 + 24);
return 1;
}
}
}
}
return 0;
}