//
// HMAC from 0xdb0168 to 0xdb0248 (224 bytes)
//
// 2 xrefs:
// > sub_DB2434 @ 0xdb2498
// > ??> @ 0x94650
//
// 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
//
void *__fastcall HMAC(__int64 a1, const void *a2, unsigned int a3, __int64 a4, __int64 a5, void *a6, _DWORD *a7)
{
void *v8; // x19
__int64 v10; // x0
_QWORD *v11; // x20
const void *v12; // x1
v8 = a6;
if ( !a6 )
v8 = &unk_125F020;
v10 = HMAC_CTX_new();
v11 = (_QWORD *)v10;
if ( !v10 )
goto LABEL_11;
v12 = a2;
if ( !a2 && !a3 )
v12 = &unk_F6FB00;
if ( HMAC_Init_ex(v10, v12, a3, a1, 0) && (unsigned int)HMAC_Update(v11) && HMAC_Final((__int64)v11, (__int64)v8, a7) )
{
HMAC_CTX_free((__int64)v11);
return v8;
}
else
{
LABEL_11:
HMAC_CTX_free((__int64)v11);
return nullptr;
}
}