//
// SSL_SESSION_get_master_key from 0x799a04 to 0x799a54 (80 bytes)
//
// 1 xrefs:
// > ??> @ 0x5c28c
//
// 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
//
size_t __fastcall SSL_SESSION_get_master_key(int a1, void *a2, size_t a3)
{
int v3; // r12
size_t v4; // r4
v3 = *(_DWORD *)(a1 + 4);
if ( v3 < 0 )
return 0;
if ( !a3 )
return *(_DWORD *)(a1 + 4);
if ( a3 >= v3 )
v4 = *(_DWORD *)(a1 + 4);
else
v4 = a3;
memcpy(a2, (const void *)(a1 + 8), v4);
return v4;
}