// // sub_D85BB0 from 0xd85bb0 to 0xd85d24 (372 bytes) // // 2 xrefs: // > @ 0x1122688 // > @ 0x1122760 // // 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 // __int64 __fastcall sub_D85BB0(__int64 a1, __int64 a2) { __int64 result; // x0 __int64 v4; // x19 __int64 v5; // x21 bool v6; // zf __int64 v7; // x2 __int64 v8; // x0 int v9; // [xsp+38h] [xbp+38h] BYREF int v10; // [xsp+3Ch] [xbp+3Ch] BYREF char *v11; // [xsp+40h] [xbp+40h] BYREF __int64 v12; // [xsp+48h] [xbp+48h] BYREF int *v13; // [xsp+50h] [xbp+50h] BYREF _QWORD *v14; // [xsp+58h] [xbp+58h] BYREF result = PKCS8_pkey_get0(nullptr, (__int64 *)&v11, &v9, &v14, a2); if ( (_DWORD)result ) { X509_ALGOR_get0(0, &v10, (__int64 *)&v13, v14); if ( v10 == 16 && (v4 = d2i_ASN1_INTEGER(nullptr, &v11, v9)) != 0 ) { v6 = *(_QWORD *)(a1 + 16) == (_QWORD)&dhx_asn1_meth; v12 = *((_QWORD *)v13 + 1); v7 = *v13; if ( v6 ) v5 = d2i_DHxparams(0, &v12, v7); else v5 = d2i_DHparams(0, &v12, v7); if ( v5 ) { v8 = BN_secure_new(); *(_QWORD *)(v5 + 40) = v8; if ( v8 && ASN1_INTEGER_to_BN(v4, v8) ) { if ( (unsigned int)DH_generate_key(v5) ) { EVP_PKEY_assign(a1, **(unsigned int **)(a1 + 16), v5); ASN1_STRING_clear_free(v4); return 1; } } else { ERR_put_error(5, 110, 106, "crypto/dh/dh_ameth.c", 181); } LABEL_5: DH_free(v5); ASN1_STRING_clear_free(v4); return 0; } } else { v4 = 0; } v5 = 0; ERR_put_error(5, 110, 114, "crypto/dh/dh_ameth.c", 195); goto LABEL_5; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source