//
// SSL_get_peer_certificate from 0xd3fbe8 to 0xd3fc28 (64 bytes)
//
// 3 xrefs:
// > sub_BB678C @ 0xbb6854
// > sub_BB678C @ 0xbb6c58
// > ??> @ 0x4c920
//
// 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 __fastcall SSL_get_peer_certificate(__int64 a1)
{
__int64 v1; // x19
if ( !a1 )
return 0;
v1 = *(_QWORD *)(a1 + 376);
if ( v1 )
{
v1 = *(_QWORD *)(v1 + 152);
if ( v1 )
X509_up_ref(v1);
}
return v1;
}