// // X509_load_cert_file from 0x1062cc4 to 0x1062e78 (436 bytes) // // 4 xrefs: // > sub_10622C8 @ 0x10624dc // > X509_load_cert_crl_file @ 0x106305c // > sub_106317C @ 0x10631b0 // > @ 0xb76e8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 13:16:51 +0000 // __int64 __fastcall X509_load_cert_file(__int64 a1, __int64 a2, int a3) { void *v6; // x0 __int64 v7; // x0 _QWORD *v8; // x22 __int64 bio_X509_AUX; // x19 unsigned int v10; // w20 if ( !a2 ) return 1; v6 = BIO_s_file(); v7 = BIO_new((__int64)v6); v8 = (_QWORD *)v7; if ( v7 && (int)BIO_ctrl(v7, 0x6Cu, 3, a2) > 0 ) { if ( a3 == 1 ) { v10 = 0; while ( 1 ) { bio_X509_AUX = PEM_read_bio_X509_AUX((__int64)v8, 0, nullptr, nullptr); if ( !bio_X509_AUX ) break; ++v10; if ( !(unsigned int)X509_STORE_add_cert(*(_QWORD *)(a1 + 24), bio_X509_AUX) ) { v10 = 0; goto LABEL_7; } X509_free(bio_X509_AUX); } if ( (ERR_peek_last_error() & 0xFFF) == 0x6C && v10 ) { ERR_clear_error(); } else { v10 = 0; ERR_put_error(11, 111, 9, (__int64)"crypto/x509/by_file.c", 100); } } else if ( a3 == 2 ) { bio_X509_AUX = d2i_X509_bio(v8, 0); if ( bio_X509_AUX ) { v10 = X509_STORE_add_cert(*(_QWORD *)(a1 + 24), bio_X509_AUX); } else { v10 = 0; ERR_put_error(11, 111, 13, (__int64)"crypto/x509/by_file.c", 115); } } else { bio_X509_AUX = 0; v10 = 0; ERR_put_error(11, 111, 100, (__int64)"crypto/x509/by_file.c", 123); } } else { bio_X509_AUX = 0; ERR_put_error(11, 111, 2, (__int64)"crypto/x509/by_file.c", 87); v10 = 0; } LABEL_7: X509_free(bio_X509_AUX); BIO_free(v8); return v10; }
GD Web Decomp Icon

GD Web Decomp

Raw Source