// // d2i_ECPrivateKey from 0x9fc048 to 0x9fc2ac (612 bytes) // // 8 xrefs: // > sub_9F9454 @ 0x9f94d0 // > sub_9F96E4 @ 0x9f96f4 // > PEM_X509_INFO_read_bio @ 0xacf3d4 // > @ 0x7ac1c // > d2i_ECPrivateKey_fp @ 0xa5d358 // > d2i_ECPrivateKey_bio @ 0xa5d3e0 // > PEM_X509_INFO_read_bio @ 0xacf200 // > @ 0xd1d778 // // 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:07:35 +0000 // _DWORD *__fastcall d2i_ECPrivateKey(_DWORD *a1, unsigned __int8 **a2, int a3) { int v5; // r5 _DWORD *v6; // r4 int v7; // r0 int v8; // r7 int v9; // r9 int v10; // r0 int v11; // r0 int v12; // r0 int v13; // r7 int v14; // r0 _DWORD *result; // r0 int (__fastcall *v16)(_DWORD *); // r3 unsigned __int8 *v17; // [sp+Ch] [bp-8h] BYREF v17 = *a2; v5 = d2i_EC_PRIVATEKEY(nullptr, &v17, a3); if ( !v5 ) { ERR_put_error(16, 146, 16, "crypto/ec/ec_asn1.c", 922); return nullptr; } if ( !a1 || (v6 = (_DWORD *)*a1) == nullptr ) { v6 = (_DWORD *)EC_KEY_new(); if ( !v6 ) { ERR_put_error(16, 146, 65, "crypto/ec/ec_asn1.c", 928); goto LABEL_17; } } v7 = v6[3]; if ( *(_DWORD *)(v5 + 8) ) { EC_GROUP_clear_free(v7); v7 = EC_GROUP_new_from_ecpkparameters(*(int **)(v5 + 8)); v6[3] = v7; } if ( v7 ) { v8 = *(_DWORD *)(v5 + 4); v6[2] = *(_DWORD *)v5; if ( v8 ) { v9 = ASN1_STRING_get0_data(v8); v10 = ASN1_STRING_length(v8); if ( !EC_KEY_oct2priv(v6, v9, v10) ) goto LABEL_17; EC_POINT_clear_free(v6[4]); v11 = EC_POINT_new(v6[3]); v6[4] = v11; if ( !v11 ) { ERR_put_error(16, 146, 16, "crypto/ec/ec_asn1.c", 959); goto LABEL_17; } v12 = *(_DWORD *)(v5 + 12); if ( !v12 ) { v16 = *(int (__fastcall **)(_DWORD *))(*(_DWORD *)v6[3] + 180); if ( !v16 || !v16(v6) ) goto LABEL_17; v6[6] |= 2u; LABEL_12: if ( a1 ) *a1 = v6; EC_PRIVATEKEY_free((_DWORD *)v5); result = v6; *a2 = v17; return result; } v13 = ASN1_STRING_get0_data(v12); v14 = ASN1_STRING_length(*(_DWORD *)(v5 + 12)); if ( EC_KEY_oct2key(v6, v13, v14, 0) ) goto LABEL_12; ERR_put_error(16, 146, 16, "crypto/ec/ec_asn1.c", 970); } else { ERR_put_error(16, 146, 125, "crypto/ec/ec_asn1.c", 952); } } else { ERR_put_error(16, 146, 16, "crypto/ec/ec_asn1.c", 940); } LABEL_17: if ( !a1 || (_DWORD *)*a1 != v6 ) EC_KEY_free(v6); EC_PRIVATEKEY_free((_DWORD *)v5); return nullptr; }
GD Web Decomp Icon

GD Web Decomp

Raw Source