//
// ERR_peek_error from 0xda0e8c to 0xda0edc (80 bytes)
//
// 8 xrefs:
// > sub_BB78D0 @ 0xbb7de0
// > SSL_get_error @ 0xd42604
// > SSL_CTX_use_certificate_chain_file @ 0xd4556c
// > SSL_use_certificate_chain_file @ 0xd45738
// > PEM_bytes_read_bio @ 0xdc89d4
// > ASN1_d2i_bio @ 0xe0827c
// > ASN1_item_d2i_bio @ 0xe086e8
// > ??> @ 0x96300
//
// 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 ERR_peek_error()
{
__int64 state; // x0
int v1; // w1
state = ERR_get_state();
v1 = *(_DWORD *)(state + 580);
if ( v1 == *(_DWORD *)(state + 576) )
return 0;
else
return *(_QWORD *)(state + 8LL * ((v1 + 1) % 16) + 64);
}