//
// sub_8087E0 from 0x8087e0 to 0x808850 (112 bytes)
//
// 1 xrefs:
// > ??> @ 0xa3231c
//
// 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 sub_8087E0(int a1, int a2, int *a3, int a4)
{
int v4; // r6
int v7; // r0
int v8; // r0
int result; // r0
int v10; // [sp+4h] [bp-4h] BYREF
v4 = *(_DWORD *)(a1 + 20);
v7 = EVP_MD_CTX_md(a4);
v8 = EVP_MD_size(v7);
if ( v8 < 0 )
return 0;
*a3 = v8;
if ( !a2 )
return 1;
if ( !HMAC_Final(*(_DWORD *)(v4 + 20), a2, &v10) )
return 0;
result = 1;
*a3 = v10;
return result;
}