//
// MDC2_Final from 0x8b8e94 to 0x8b8f28 (148 bytes)
//
// 2 xrefs:
// > sub_8B7D6C @ 0x8b7d84
// > ??> @ 0x6b0ac
//
// 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 MDC2_Final(char *a1, int *a2)
{
int v2; // r2
_BOOL4 v3; // r3
_BOOL4 v5; // r1
char *v7; // r3
v2 = *a2;
v3 = a2[7] == 2;
if ( *a2 )
v5 = 1;
else
v5 = a2[7] == 2;
if ( v5 )
{
if ( v3 )
{
v7 = (char *)a2 + v2++;
v7[4] = 0x80;
}
memset((char *)a2 + v2 + 4, 0, 8 - v2);
sub_8B8BE8((int)a2, (int)(a2 + 1), 8u);
}
memcpy(a1, a2 + 3, 8u);
memcpy(a1 + 8, a2 + 5, 8u);
return 1;
}