//
// sub_6D0848 from 0x6d0848 to 0x6d10d0 (2184 bytes)
//
// 3 xrefs:
// > sub_6D6548 @ 0x6d65fc
// > sub_6D6548 @ 0x6d6600
// > ??> @ 0x6d6830
//
// 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 sub_6D0848(
int a1,
int *a2,
int a3,
int a4,
unsigned int a5,
int a6,
int a7,
int a8,
unsigned __int8 *a9,
unsigned __int8 *a10,
unsigned __int8 *a11,
unsigned __int8 *a12)
{
int *v14; // [sp+8h] [bp-14h]
unsigned int i; // [sp+14h] [bp-8h]
unsigned __int8 *v16; // [sp+30h] [bp+14h]
unsigned __int8 *v17; // [sp+34h] [bp+18h]
unsigned __int8 *v18; // [sp+38h] [bp+1Ch]
unsigned __int8 *v19; // [sp+3Ch] [bp+20h]
while ( a6-- != 0 )
{
for ( i = a5; i > 7; i -= 8 )
{
*a2 = *a9 | (*a10 << 8) | (*a11 << 16) | (*a12 << 24);
v14 = a2 + 1;
v16 = a9 + 1;
v17 = a10 + 1;
v18 = a11 + 1;
v19 = a12 + 1;
*v14++ = *v16 | (*v17 << 8) | (*v18 << 16) | (*v19 << 24);
*v14++ = *++v16 | (*++v17 << 8) | (*++v18 << 16) | (*++v19 << 24);
*v14++ = *++v16 | (*++v17 << 8) | (*++v18 << 16) | (*++v19 << 24);
*v14++ = *++v16 | (*++v17 << 8) | (*++v18 << 16) | (*++v19 << 24);
*v14++ = *++v16 | (*++v17 << 8) | (*++v18 << 16) | (*++v19 << 24);
*v14++ = *++v16 | (*++v17 << 8) | (*++v18 << 16) | (*++v19 << 24);
*v14 = *++v16 | (*++v17 << 8) | (*++v18 << 16) | (*++v19 << 24);
a2 = v14 + 1;
a9 = v16 + 1;
a10 = v17 + 1;
a11 = v18 + 1;
a12 = v19 + 1;
}
if ( i )
{
switch ( i )
{
case 1u:
goto LABEL_13;
case 2u:
goto LABEL_12;
case 3u:
goto LABEL_11;
case 4u:
goto LABEL_10;
case 5u:
goto LABEL_9;
case 6u:
goto LABEL_8;
case 7u:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
LABEL_8:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
LABEL_9:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
LABEL_10:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
LABEL_11:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
LABEL_12:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
LABEL_13:
*a2++ = *a9++ | (*a10++ << 8) | (*a11++ << 16) | (*a12++ << 24);
break;
}
}
a9 += a7;
a10 += a7;
a11 += a7;
a12 += a7;
a2 += a8;
}
}