//
// ERR_peek_error from 0x101f1ec to 0x101f23c (80 bytes)
//
// 8 xrefs:
// > sub_E2DA90 @ 0xe2dfa0
// > SSL_get_error @ 0xfc0958
// > SSL_CTX_use_certificate_chain_file @ 0xfc38c0
// > SSL_use_certificate_chain_file @ 0xfc3a8c
// > PEM_bytes_read_bio @ 0x1046d34
// > ASN1_d2i_bio @ 0x108657c
// > ASN1_item_d2i_bio @ 0x10869e8
// > ??> @ 0xc6628
//
// 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:09 +0000
//
__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);
}