//
// sub_1005E33FC from 0x1005e33fc to 0x1005e3528 (300 bytes)
//
// 14 xrefs:
// > sub_10052677C @ 0x10052692c
// > sub_1005C8E34 @ 0x1005c8ef8
// > sub_1005C9388 @ 0x1005c9758
// > sub_1005CD3AC @ 0x1005cd698
// > sub_1005CD3AC @ 0x1005cd6b8
// > sub_1005CD3AC @ 0x1005cd83c
// > sub_1005CD3AC @ 0x1005cd85c
// > sub_1005CD3AC @ 0x1005cd9f8
// > sub_1005CDE7C @ 0x1005ce1f0
// > sub_1005CDE7C @ 0x1005ce340
// > sub_1005F1018 @ 0x1005f1070
// > sub_1005FEEBC @ 0x1005fef10
// > sub_10060418C @ 0x1006041d8
// > sub_10060A0CC @ 0x10060a1f0
//
// 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
//
bool __fastcall sub_1005E33FC(__int64 a1, __int64 a2, __int64 a3, _DWORD *a4, int *a5, __int64 a6)
{
int v12; // w3
int v13; // w4
int v14; // w5
int v15; // w6
int v16; // w7
int v17; // w20
__int64 v18; // x8
void (__fastcall *v19)(_QWORD *); // x9
_BOOL8 v20; // x19
_QWORD v22[3]; // [xsp+0h] [xbp-60h] BYREF
void *v23; // [xsp+18h] [xbp-48h]
__int64 v24; // [xsp+20h] [xbp-40h]
unsigned int (__fastcall *v25)(_QWORD *, __int64, __int64); // [xsp+28h] [xbp-38h]
v24 = 0;
v25 = nullptr;
v23 = nullptr;
memset(v22, 0, sizeof(v22));
sub_1005EB2FC(v22, 1);
if ( (unsigned int)sub_1005E2E4C((__int64)v22, a5, a6) )
{
if ( v25(v22, a1, a2) )
{
if ( *(int *)(v22[0] + 8LL) >= 65 )
sub_1005884E4((char)"digest.c", 277, (int)"ctx->digest->md_size <= EVP_MAX_MD_SIZE", v12, v13, v14, v15, v16);
v17 = (*(__int64 (__fastcall **)(_QWORD *, __int64))(v22[0] + 40LL))(v22, a3);
v18 = v22[0];
if ( a4 )
*a4 = *(_DWORD *)(v22[0] + 8LL);
v19 = *(void (__fastcall **)(_QWORD *))(v18 + 56);
if ( v19 )
{
v19(v22);
sub_1005EB2FC(v22, 2);
v18 = v22[0];
}
bzero(v23, *(int *)(v18 + 104));
v20 = v17 != 0;
}
else
{
v20 = 0;
}
}
else
{
v20 = 0;
}
sub_1005E31A4((__int64)v22);
return v20;
}