//
// ossl_statem_server_read_transition from 0x9bca6c to 0x9bcca0 (564 bytes)
//
// 4 xrefs:
// > sub_9B3990 @ 0x9b3d7c
// > ??> @ 0x7697c
// > sub_9B3990 @ 0x9b3cac
// > ??> @ 0xd1d4fc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:07:02 +0000
//
int __fastcall ossl_statem_server_read_transition(_DWORD *a1, int a2)
{
int v2; // r3
_BOOL4 v3; // r1
switch ( a1[16] )
{
case 0:
case 0x15:
if ( a2 != 1 )
goto LABEL_7;
a1[16] = 20;
return a2;
case 0x1A:
v2 = *(_DWORD *)(a1[26] + 588);
if ( a2 == 16 )
{
if ( !v2 )
goto LABEL_21;
if ( *a1 != 768 )
goto LABEL_7;
if ( (a1[62] & 3) != 3 )
goto LABEL_21;
ssl3_send_alert(a1, 2, 40);
ERR_put_error(20, 418, 199, "ssl/statem/statem_srvr.c", 117);
return 0;
}
else
{
v3 = a2 == 11;
if ( !v2 )
v3 = 0;
if ( !v3 )
goto LABEL_7;
a1[16] = 27;
return 1;
}
case 0x1B:
if ( a2 != 16 )
goto LABEL_7;
LABEL_21:
a1[16] = 28;
return 1;
case 0x1C:
if ( !*(_DWORD *)(a1[60] + 140) || a1[20] )
goto LABEL_11;
if ( a2 != 15 )
goto LABEL_7;
a1[16] = 29;
return 1;
case 0x1D:
case 0x24:
LABEL_11:
if ( a2 != 257 )
goto LABEL_7;
a1[16] = 31;
return 1;
case 0x1E:
goto LABEL_14;
case 0x1F:
if ( *(_DWORD *)(a1[26] + 836) )
{
if ( a2 == 67 )
{
a1[16] = 30;
return 1;
}
LABEL_7:
ssl3_send_alert(a1, 2, 10);
ERR_put_error(20, 418, 244, "ssl/statem/statem_srvr.c", 217);
return 0;
}
LABEL_14:
if ( a2 != 20 )
goto LABEL_7;
a1[16] = 32;
return 1;
default:
goto LABEL_7;
}
}