//
// sub_8DEB48 from 0x8deb48 to 0x8dfb00 (4024 bytes)
//
// 3 xrefs:
// > sub_8E5A20 @ 0x8e5c20
// > sub_8E5A20 @ 0x8e5c24
// > ??> @ 0x8e60bc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:04:09 +0000
//
int __fastcall sub_8DEB48(
int result,
unsigned int *a2,
int a3,
int a4,
unsigned int a5,
int a6,
int a7,
int a8,
unsigned __int8 *a9)
{
unsigned int *v11; // [sp+8h] [bp-1Ch]
int v12; // [sp+10h] [bp-14h]
unsigned int j; // [sp+1Ch] [bp-8h]
int i; // [sp+30h] [bp+Ch]
unsigned __int8 *v15; // [sp+38h] [bp+14h]
unsigned __int8 *v16; // [sp+38h] [bp+14h]
unsigned __int8 *v17; // [sp+38h] [bp+14h]
unsigned __int8 *v18; // [sp+38h] [bp+14h]
unsigned __int8 *v19; // [sp+38h] [bp+14h]
unsigned __int8 *v20; // [sp+38h] [bp+14h]
unsigned __int8 *v21; // [sp+38h] [bp+14h]
v12 = *(unsigned __int16 *)(result + 26);
for ( i = v12 * a7; a6-- != 0; a9 += i )
{
for ( j = a5; j > 7; j -= 8 )
{
*a2 = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
v11 = a2 + 1;
v15 = &a9[v12];
*v11++ = (unsigned __int16)((__int16)((255 - *v15) * (255 - v15[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v15[1]) * (255 - v15[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v15[2]) * (255 - v15[3])) / 255) << 16)
| 0xFF000000;
v16 = &v15[v12];
*v11++ = (unsigned __int16)((__int16)((255 - *v16) * (255 - v16[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v16[1]) * (255 - v16[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v16[2]) * (255 - v16[3])) / 255) << 16)
| 0xFF000000;
v17 = &v16[v12];
*v11++ = (unsigned __int16)((__int16)((255 - *v17) * (255 - v17[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v17[1]) * (255 - v17[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v17[2]) * (255 - v17[3])) / 255) << 16)
| 0xFF000000;
v18 = &v17[v12];
*v11++ = (unsigned __int16)((__int16)((255 - *v18) * (255 - v18[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v18[1]) * (255 - v18[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v18[2]) * (255 - v18[3])) / 255) << 16)
| 0xFF000000;
v19 = &v18[v12];
*v11++ = (unsigned __int16)((__int16)((255 - *v19) * (255 - v19[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v19[1]) * (255 - v19[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v19[2]) * (255 - v19[3])) / 255) << 16)
| 0xFF000000;
v20 = &v19[v12];
*v11++ = (unsigned __int16)((__int16)((255 - *v20) * (255 - v20[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v20[1]) * (255 - v20[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v20[2]) * (255 - v20[3])) / 255) << 16)
| 0xFF000000;
v21 = &v20[v12];
*v11 = (unsigned __int16)((__int16)((255 - *v21) * (255 - v21[3])) / 255)
| ((unsigned __int16)((__int16)((255 - v21[1]) * (255 - v21[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - v21[2]) * (255 - v21[3])) / 255) << 16)
| 0xFF000000;
a2 = v11 + 1;
a9 = &v21[v12];
}
if ( j )
{
switch ( j )
{
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++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
LABEL_8:
*a2++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
LABEL_9:
*a2++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
LABEL_10:
*a2++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
LABEL_11:
*a2++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
LABEL_12:
*a2++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
LABEL_13:
*a2++ = (unsigned __int16)((__int16)((255 - *a9) * (255 - a9[3])) / 255)
| ((unsigned __int16)((__int16)((255 - a9[1]) * (255 - a9[3])) / 255) << 8)
| ((unsigned __int16)((__int16)((255 - a9[2]) * (255 - a9[3])) / 255) << 16)
| 0xFF000000;
a9 += v12;
break;
}
}
a2 += a8;
}
return result;
}