//
// SSL_get_peer_certificate from 0x796c10 to 0x796c4c (60 bytes)
//
// 2 xrefs:
// > sub_642BAC @ 0x642c2a
// > ??> @ 0x54ebc
//
// 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 __fastcall SSL_get_peer_certificate(int a1)
{
int v1; // r4
if ( !a1 )
return 0;
v1 = *(_DWORD *)(a1 + 240);
if ( v1 )
{
v1 = *(_DWORD *)(v1 + 140);
if ( v1 )
X509_up_ref(v1);
}
return v1;
}