//
// ERR_peek_error from 0x7fb0fc to 0x7fb138 (60 bytes)
//
// 8 xrefs:
// > sub_643938 @ 0x643e1c
// > SSL_get_error @ 0x799ac4
// > SSL_CTX_use_certificate_chain_file @ 0x79cb2c
// > SSL_use_certificate_chain_file @ 0x79cd08
// > PEM_bytes_read_bio @ 0x823204
// > ASN1_d2i_bio @ 0x860238
// > ASN1_item_d2i_bio @ 0x8606dc
// > ??> @ 0x5521c
//
// 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
//
int ERR_peek_error()
{
int state; // r0
int v1; // r3
state = ERR_get_state();
v1 = *(_DWORD *)(state + 388);
if ( v1 == *(_DWORD *)(state + 384) )
return 0;
else
return *(_DWORD *)(state + 4 * ((v1 + 1) % 16 + 16));
}