//
// ossl_statem_client_pre_work from 0xfc6f1c to 0xfc6fc0 (164 bytes)
//
// 4 xrefs:
// > sub_FC5998 @ 0xfc5b34
// > ??> @ 0x8d1f0
// > sub_FC5998 @ 0xfc5a9c
// > ??> @ 0x1543b88
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:24 +0000
//
__int64 __fastcall ossl_statem_client_pre_work(__int64 a1, __int64 a2)
{
__int64 v2; // x2
__int64 v4; // x1
v2 = *(unsigned int *)(a1 + 92);
switch ( (_DWORD)v2 )
{
case 0xC:
v4 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 68) = 0;
if ( (*(_DWORD *)(*(_QWORD *)(v4 + 192) + 104LL) & 8) != 0 && !(unsigned int)ssl3_init_finished_mac(a1) )
{
ossl_statem_set_error(a1);
return 0;
}
break;
case 0x10:
if ( (*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 192LL) + 104LL) & 8) != 0 && *(_DWORD *)(a1 + 176) )
{
*(_DWORD *)(a1 + 112) = 0;
return 2;
}
break;
case 1:
return tls_finish_handshake(a1, a2, v2, a1);
}
return 2;
}