//
// sub_6CE938 from 0x6ce938 to 0x6ceac4 (396 bytes)
//
// 3 xrefs:
// > sub_6D5E60 @ 0x6d5f54
// > sub_6D5E60 @ 0x6d5f58
// > ??> @ 0x6d64e8
//
// 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_6CE938(int result, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, unsigned __int8 *a9)
{
int v11; // [sp+4h] [bp-28h]
int v13; // [sp+10h] [bp-1Ch]
int v14; // [sp+20h] [bp-Ch]
int i; // [sp+38h] [bp+Ch]
v13 = *(unsigned __int16 *)(result + 26);
for ( i = v13 * a7; a6-- != 0; a9 += i )
{
v11 = a5;
while ( v11-- != 0 )
{
v14 = a9[3];
*a2++ = (*(unsigned __int8 *)(*(_DWORD *)(result + 76) + (v14 << 8) + a9[1]) << 8)
| *(unsigned __int8 *)(*(_DWORD *)(result + 76) + (v14 << 8) + *a9)
| (*(unsigned __int8 *)(*(_DWORD *)(result + 76) + (v14 << 8) + a9[2]) << 16)
| (v14 << 24);
a9 += v13;
}
a2 += a8;
}
return result;
}