// // d2i_ECPrivateKey from 0x7e7448 to 0x7e76ac (612 bytes) // // 8 xrefs: // > sub_7E4854 @ 0x7e48d0 // > sub_7E4AE4 @ 0x7e4af4 // > PEM_X509_INFO_read_bio @ 0x8ba3d4 // > @ 0x6119c // > d2i_ECPrivateKey_fp @ 0x848758 // > d2i_ECPrivateKey_bio @ 0x8487e0 // > PEM_X509_INFO_read_bio @ 0x8ba200 // > @ 0xab87b4 // // 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 // _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