//
// ssl3_send_alert from 0xfb7bdc to 0xfb7ca4 (200 bytes)
//
// 68 xrefs:
// > dtls1_read_bytes @ 0xfaedb0
// > ssl3_read_bytes @ 0xfb1548
// > ssl3_read_bytes @ 0xfb1a24
// > ssl3_get_record @ 0xfb3a08
// > ssl3_get_record @ 0xfb3b30
// > dtls1_process_record @ 0xfb41b4
// > ssl3_shutdown @ 0xfb6400
// > ssl_get_prev_session @ 0xfc5340
// > sub_FC5998 @ 0xfc5f14
// > sub_FC5998 @ 0xfc61d0
// > sub_FC5998 @ 0xfc6220
// > sub_FC5998 @ 0xfc6258
// > sub_FC5998 @ 0xfc62a8
// > ossl_statem_client_read_transition @ 0xfc6b78
// > tls_construct_client_hello @ 0xfc739c
// > tls_construct_client_hello @ 0xfc74cc
// > dtls_process_hello_verify @ 0xfc7550
// > tls_process_server_hello @ 0xfc7658
// > tls_process_server_certificate @ 0xfc7c3c
// > tls_process_certificate_request @ 0xfc7ff0
// > tls_process_certificate_request @ 0xfc8204
// > tls_process_certificate_request @ 0xfc8234
// > tls_process_certificate_request @ 0xfc8320
// > tls_process_certificate_request @ 0xfc83d0
// > tls_process_certificate_request @ 0xfc8434
// > tls_process_certificate_request @ 0xfc84b0
// > tls_process_certificate_request @ 0xfc84dc
// > tls_process_new_session_ticket @ 0xfc85a4
// > tls_process_cert_status @ 0xfc87cc
// > tls_construct_client_key_exchange @ 0xfc8a88
// > tls_construct_client_key_exchange @ 0xfc8ab8
// > tls_construct_client_key_exchange @ 0xfc8d60
// > tls_client_key_exchange_post_work @ 0xfc9020
// > tls_client_key_exchange_post_work @ 0xfc9080
// > tls_construct_client_certificate @ 0xfc9508
// > ssl3_check_cert_and_algorithm @ 0xfc9594
// > tls_process_key_exchange @ 0xfc9888
// > tls_process_server_done @ 0xfca4f4
// > tls_process_server_done @ 0xfca510
// > tls_process_server_done @ 0xfca554
// > tls_process_server_done @ 0xfca56c
// > tls_process_server_done @ 0xfca594
// > tls_process_server_done @ 0xfca5c8
// > tls_prepare_client_certificate @ 0xfca984
// > tls_prepare_client_certificate @ 0xfca9b8
// > dtls_get_message @ 0xfcbdfc
// > dtls_get_message @ 0xfcbfb8
// > tls_process_change_cipher_spec @ 0xfcc778
// > tls_process_finished @ 0xfcc8e0
// > tls_get_message_header @ 0xfcce0c
// > tls_get_message_body @ 0xfcd0c8
// > ossl_statem_server_read_transition @ 0xfce0fc
// > ossl_statem_server_read_transition @ 0xfce220
// > tls_process_client_hello @ 0xfcead8
// > tls_post_process_client_hello @ 0xfcf9b4
// > tls_construct_server_hello @ 0xfcfcb4
// > tls_construct_server_key_exchange @ 0xfd0364
// > tls_process_client_key_exchange @ 0xfd0bcc
// > tls_process_cert_verify @ 0xfd1a14
// > tls_process_client_certificate @ 0xfd1de0
// > ssl_parse_serverhello_tlsext @ 0xfd50ec
// > ssl_parse_serverhello_tlsext @ 0xfd52e4
// > ssl_parse_serverhello_tlsext @ 0xfd533c
// > ssl_parse_clienthello_tlsext @ 0xfd8500
// > ssl_parse_clienthello_tlsext @ 0xfd8538
// > ssl_parse_clienthello_tlsext @ 0xfd854c
// > tls1_set_server_sigalgs @ 0xfd8c20
// > ??> @ 0xb45c8
//
// 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:15:15 +0000
//
__int64 __fastcall ssl3_send_alert(__int64 a1, int a2, unsigned int a3)
{
int v5; // w0
char v6; // w21
__int64 v7; // x1
__int64 v9; // x1
v5 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 192LL) + 88LL))(a3);
if ( v5 == 70 && *(_DWORD *)a1 == 768 )
{
v6 = 40;
if ( a2 != 2 )
goto LABEL_5;
goto LABEL_8;
}
v6 = v5;
if ( v5 < 0 )
return 0xFFFFFFFFLL;
if ( a2 == 2 )
{
LABEL_8:
v9 = *(_QWORD *)(a1 + 376);
if ( v9 )
SSL_CTX_remove_session(*(_QWORD *)(a1 + 720), v9);
}
LABEL_5:
v7 = *(_QWORD *)(a1 + 144);
*(_BYTE *)(v7 + 248) = a2;
*(_DWORD *)(v7 + 244) = 1;
*(_BYTE *)(*(_QWORD *)(a1 + 144) + 249LL) = v6;
if ( !(unsigned int)RECORD_LAYER_write_pending(a1 + 928) )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a1 + 8) + 120LL))(a1);
return 0xFFFFFFFFLL;
}