//
// ERR_clear_error from 0x7fa6a8 to 0x7fab04 (1116 bytes)
//
// 63 xrefs:
// > sub_641BFC @ 0x641c0c
// > sub_641F78 @ 0x641f94
// > sub_644B1C @ 0x644b6c
// > sub_645094 @ 0x6450aa
// > SSL_load_client_CA_file @ 0x791e38
// > SSL_add_file_cert_subjects_to_stack @ 0x791f90
// > ssl_add_cert_chain @ 0x792244
// > ssl_build_cert_chain @ 0x7926c4
// > ssl_build_cert_chain @ 0x792714
// > ssl_build_cert_chain @ 0x7927a4
// > SSL_CTX_set_default_verify_dir @ 0x799900
// > SSL_CTX_set_default_verify_file @ 0x79994c
// > sub_79B558 @ 0x79b5b8
// > sub_79B558 @ 0x79b648
// > sub_79B6F4 @ 0x79b740
// > SSL_use_PrivateKey @ 0x79bedc
// > SSL_CTX_use_PrivateKey @ 0x79c7a8
// > SSL_CTX_use_certificate_chain_file @ 0x79cac4
// > SSL_CTX_use_certificate_chain_file @ 0x79cc50
// > SSL_use_certificate_chain_file @ 0x79cca8
// > SSL_use_certificate_chain_file @ 0x79ce24
// > sub_79ED8C @ 0x79edd0
// > tls_process_server_certificate @ 0x7a14ec
// > tls_process_client_key_exchange @ 0x7ab988
// > tls_check_serverhello_tlsext_early @ 0x7b05d4
// > DTLSv1_listen @ 0x7b6610
// > sub_7D14BC @ 0x7d1698
// > sub_7D14BC @ 0x7d1888
// > sub_7D1D44 @ 0x7d1f90
// > sub_7D1D44 @ 0x7d2204
// > sub_7D2244 @ 0x7d2498
// > sub_7D2244 @ 0x7d2714
// > CONF_get_number @ 0x7da088
// > CONF_modules_load @ 0x7da42c
// > CONF_modules_load @ 0x7da78c
// > CONF_modules_load_file @ 0x7dad38
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2248
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f264c
// > sub_7F5E14 @ 0x7f62b0
// > ENGINE_ctrl_cmd @ 0x7f68b0
// > ENGINE_ctrl_cmd_string @ 0x7f6a10
// > PKCS7_dataDecode @ 0x8276a0
// > PKCS7_dataDecode @ 0x827770
// > PKCS7_dataDecode @ 0x82797c
// > X509_load_cert_file @ 0x83cc08
// > X509_load_crl_file @ 0x83cdd4
// > X509_STORE_set_default_paths @ 0x83f110
// > ASN1_d2i_bio @ 0x860068
// > ASN1_d2i_bio @ 0x860248
// > ASN1_item_d2i_bio @ 0x86050c
// > ASN1_item_d2i_bio @ 0x8606ec
// > openssl_config_int @ 0x879dd4
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888e40
// > ec_GF2m_simple_set_compressed_coordinates @ 0x889084
// > sub_8B3090 @ 0x8b35ec
// > engine_load_dynamic_int @ 0x8b39fc
// > engine_load_openssl_int @ 0x8b42e8
// > PEM_X509_INFO_read_bio @ 0x8ba42c
// > PKCS8_encrypt @ 0x8bbc4c
// > PKCS5_pbe2_set_iv @ 0x8c73fc
// > cms_EncryptedContent_init_bio @ 0x8cf7ec
// > cms_EncryptedContent_init_bio @ 0x8cf818
// > ??> @ 0x54adc
//
// 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 *ERR_clear_error()
{
_DWORD *result; // r0
int v1; // r3
_DWORD *v2; // r4
bool v3; // zf
result = (_DWORD *)ERR_get_state();
v1 = result[48];
v2 = result;
*result = 0;
result[16] = 0;
if ( (v1 & 1) != 0 )
{
result = (_DWORD *)CRYPTO_free(result[32], "crypto/err/err.c", 378);
v2[32] = 0;
}
v3 = (v2[49] & 1) == 0;
v2[48] = 0;
v2[64] = 0;
v2[1] = 0;
v2[17] = 0;
v2[80] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[33], "crypto/err/err.c", 378);
v2[33] = 0;
}
v3 = (v2[50] & 1) == 0;
v2[49] = 0;
v2[65] = 0;
v2[2] = 0;
v2[18] = 0;
v2[81] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[34], "crypto/err/err.c", 378);
v2[34] = 0;
}
v3 = (v2[51] & 1) == 0;
v2[50] = 0;
v2[66] = 0;
v2[3] = 0;
v2[19] = 0;
v2[82] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[35], "crypto/err/err.c", 378);
v2[35] = 0;
}
v3 = (v2[52] & 1) == 0;
v2[51] = 0;
v2[67] = 0;
v2[4] = 0;
v2[20] = 0;
v2[83] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[36], "crypto/err/err.c", 378);
v2[36] = 0;
}
v3 = (v2[53] & 1) == 0;
v2[52] = 0;
v2[68] = 0;
v2[5] = 0;
v2[21] = 0;
v2[84] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[37], "crypto/err/err.c", 378);
v2[37] = 0;
}
v3 = (v2[54] & 1) == 0;
v2[53] = 0;
v2[69] = 0;
v2[6] = 0;
v2[22] = 0;
v2[85] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[38], "crypto/err/err.c", 378);
v2[38] = 0;
}
v3 = (v2[55] & 1) == 0;
v2[54] = 0;
v2[70] = 0;
v2[7] = 0;
v2[23] = 0;
v2[86] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[39], "crypto/err/err.c", 378);
v2[39] = 0;
}
v3 = (v2[56] & 1) == 0;
v2[55] = 0;
v2[71] = 0;
v2[8] = 0;
v2[24] = 0;
v2[87] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[40], "crypto/err/err.c", 378);
v2[40] = 0;
}
v3 = (v2[57] & 1) == 0;
v2[56] = 0;
v2[72] = 0;
v2[9] = 0;
v2[25] = 0;
v2[88] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[41], "crypto/err/err.c", 378);
v2[41] = 0;
}
v3 = (v2[58] & 1) == 0;
v2[57] = 0;
v2[73] = 0;
v2[10] = 0;
v2[26] = 0;
v2[89] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[42], "crypto/err/err.c", 378);
v2[42] = 0;
}
v3 = (v2[59] & 1) == 0;
v2[58] = 0;
v2[74] = 0;
v2[11] = 0;
v2[27] = 0;
v2[90] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[43], "crypto/err/err.c", 378);
v2[43] = 0;
}
v3 = (v2[60] & 1) == 0;
v2[59] = 0;
v2[75] = 0;
v2[12] = 0;
v2[28] = 0;
v2[91] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[44], "crypto/err/err.c", 378);
v2[44] = 0;
}
v3 = (v2[61] & 1) == 0;
v2[60] = 0;
v2[76] = 0;
v2[13] = 0;
v2[29] = 0;
v2[92] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[45], "crypto/err/err.c", 378);
v2[45] = 0;
}
v3 = (v2[62] & 1) == 0;
v2[61] = 0;
v2[77] = 0;
v2[14] = 0;
v2[30] = 0;
v2[93] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[46], "crypto/err/err.c", 378);
v2[46] = 0;
}
v3 = (v2[63] & 1) == 0;
v2[62] = 0;
v2[78] = 0;
v2[15] = 0;
v2[31] = 0;
v2[94] = -1;
if ( !v3 )
{
result = (_DWORD *)CRYPTO_free(v2[47], "crypto/err/err.c", 378);
v2[47] = 0;
}
v2[63] = 0;
v2[79] = 0;
v2[97] = 0;
v2[96] = 0;
v2[95] = -1;
return result;
}