int __cdecl sub_1001C9E0(int a1, unsigned int a2, int a3)
{
int result; // eax@1
unsigned int l; // [sp+4h] [bp-10h]@14
unsigned int k; // [sp+8h] [bp-Ch]@10
unsigned int j; // [sp+Ch] [bp-8h]@6
unsigned int i; // [sp+10h] [bp-4h]@2
result = a3;
switch ( a3 )
{
case 1:
for ( i = 0; i < a2 - 1; ++i )
{
result = i + a1;
*(_BYTE *)(i + a1) ^= 0xC3u;
}
break;
case 13:
for ( j = 0; j < a2 - 2; ++j )
{
*(_BYTE *)(j + a1) ^= 0xC3u;
result = j + 1;
}
break;
case 7:
for ( k = 0; ; ++k )
{
result = a2 - 1;
if ( k >= a2 - 1 )
break;
*(_BYTE *)(k + a1) ^= 0xC3u;
}
break;
case 3:
case 14:
return result;
default:
for ( l = 0; l < a2; ++l )
{
result = l + a1;
*(_BYTE *)(l + a1) ^= 0xC3u;
}
break;
}
return result;
}