//
// MD5::Update from 0x457b5e to 0x457bca (108 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::generateCustomContentURL @ 0x4588fc
// > MusicDownloadManager::generateCustomContentURL @ 0x458922
// > MusicDownloadManager::generateCustomContentURL @ 0x45892c
//
// 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 MD5::Update(MD5 *this, unsigned __int8 *a2, size_t a3)
{
unsigned int v4; // r3
unsigned int v5; // r2
int v8; // r0
unsigned int v9; // r3
size_t v10; // r5
unsigned __int8 *v11; // r2
unsigned __int8 *v12; // r2
v4 = *((_DWORD *)this + 4);
v5 = 8 * a3;
v8 = (v4 >> 3) & 0x3F;
v9 = v4 + v5;
*((_DWORD *)this + 4) = v9;
v10 = 64 - v8;
if ( v9 < v5 )
++*((_DWORD *)this + 5);
*((_DWORD *)this + 5) += a3 >> 29;
if ( a3 < v10 )
{
v10 = 0;
}
else
{
memcpy((char *)this + v8 + 24, a2, v10);
MD5::MD5Transform(this, (unsigned int *)this + 6, v11);
while ( v10 + 63 < a3 )
{
MD5::MD5Transform(this, (unsigned int *)&a2[v10], v12);
v10 += 64;
}
v8 = 0;
}
return j_memcpy((char *)this + v8 + 24, &a2[v10], a3 - v10);
}