//
// SSL_set_ssl_method from 0x79924c to 0x7992cc (128 bytes)
//
// 3 xrefs:
// > SSL_dup @ 0x79b154
// > SSL_set_session @ 0x79ea9c
// > ??> @ 0x5c09c
//
// 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_set_ssl_method(int a1, int a2)
{
int v2; // r6
int v4; // r7
bool v5; // zf
int result; // r0
v2 = *(_DWORD *)(a1 + 4);
if ( v2 == a2 )
return 1;
v4 = *(_DWORD *)(a1 + 24);
v5 = *(_DWORD *)v2 == *(_DWORD *)a2;
if ( *(_DWORD *)v2 == *(_DWORD *)a2 )
*(_DWORD *)(a1 + 4) = a2;
if ( v5 )
{
result = 1;
}
else
{
(*(void (**)(void))(v2 + 20))();
*(_DWORD *)(a1 + 4) = a2;
result = (*(int (__fastcall **)(int))(a2 + 12))(a1);
}
if ( *(_DWORD *)(v2 + 28) == v4 )
{
*(_DWORD *)(a1 + 24) = *(_DWORD *)(a2 + 28);
}
else if ( *(_DWORD *)(v2 + 24) == v4 )
{
*(_DWORD *)(a1 + 24) = *(_DWORD *)(a2 + 24);
}
return result;
}