//
// sub_A4510C from 0xa4510c to 0xa45204 (248 bytes)
//
// 1 xrefs:
// > ??> @ 0xc80100
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:08:15 +0000
//
int __fastcall sub_A4510C(_DWORD *a1, int a2)
{
_DWORD *v4; // r0
_DWORD *v5; // r4
int *v6; // r5
int v7; // r0
int v8; // r3
int v9; // r0
int v10; // r3
int v11; // r1
int v12; // r2
void *v13; // r0
v4 = CRYPTO_zalloc(&word_2C, (int)"crypto/rsa/rsa_pmeth.c", 48);
v5 = v4;
if ( !v4 )
return 0;
*v4 = 1024;
v4[4] = 1;
v4[7] = -2;
a1[5] = v4;
v6 = *(int **)(a2 + 20);
v7 = v6[1];
v8 = *v6;
a1[8] = v5 + 2;
a1[9] = 2;
*v5 = v8;
if ( v7 )
{
v9 = BN_dup(v7);
v5[1] = v9;
if ( !v9 )
return 0;
}
v10 = v6[9];
v11 = v6[4];
v12 = v6[5];
v5[6] = v6[6];
v5[4] = v11;
v5[5] = v12;
if ( v10 )
{
CRYPTO_free((void *)v5[9], (int)"crypto/rsa/rsa_pmeth.c", 78);
v13 = CRYPTO_memdup((const void *)v6[9], (void *)v6[10], (int)"crypto/rsa/rsa_pmeth.c", 79);
v5[9] = v13;
if ( v13 )
{
v5[10] = v6[10];
return 1;
}
return 0;
}
return 1;
}