// // sub_D43F10 from 0xd43f10 to 0xd440a4 (404 bytes) // // 2 xrefs: // > SSL_use_certificate @ 0xd4437c // > SSL_CTX_use_certificate @ 0xd44c70 // // 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_D43F10(_QWORD *a1, __int64 a2) { __int64 v4; // x23 int v5; // w0 __int64 v6; // x19 __int64 v7; // x1 __int64 v8; // x0 unsigned int can_sign; // w24 __int64 v10; // x19 __int64 v12; // x0 __int64 v13; // x0 __int64 v14; // x0 v4 = X509_get0_pubkey(a2); if ( v4 ) { v5 = ssl_cert_type(a2, v4); v6 = v5; if ( v5 < 0 ) { can_sign = 0; ERR_put_error(20, 191, 247, "ssl/ssl_rsa.c", 324); } else if ( v5 != 3 || (v14 = EVP_PKEY_get0_EC_KEY(v4), (can_sign = EC_KEY_can_sign(v14)) != 0) ) { v7 = a1[5 * v6 + 5]; if ( v7 ) { v8 = EVP_PKEY_copy_parameters(v4, v7); ERR_clear_error(v8); if ( (unsigned int)EVP_PKEY_id(a1[5 * v6 + 5]) != 6 || (v12 = EVP_PKEY_get0_RSA(a1[5 * v6 + 5]), (RSA_flags(v12) & 1) == 0) ) { if ( !(unsigned int)X509_check_private_key(a2, a1[5 * v6 + 5]) ) { v13 = EVP_PKEY_free(a1[5 * v6 + 5]); a1[5 * v6 + 5] = 0; ERR_clear_error(v13); } } } can_sign = 1; v10 = 5 * v6; X509_free(a1[v10 + 4]); X509_up_ref(a2); a1[v10 + 4] = a2; *a1 = &a1[v10 + 4]; } else { ERR_put_error(20, 191, 318, "ssl/ssl_rsa.c", 329); } return can_sign; } else { ERR_put_error(20, 191, 268, "ssl/ssl_rsa.c", 318); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source