//
// sub_82C0C from 0x82c0c to 0x82c90 (132 bytes)
//
// 1 xrefs:
// > sub_83348 @ 0x835dc
//
// 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_82C0C(int a1)
{
int v2; // r1
int v3; // r5
int v4; // r2
unsigned int v5; // r0
unsigned int v6; // r0
int v7; // r2
char v8; // r0
v2 = *(unsigned __int8 *)(a1 + 230);
v3 = *(_DWORD *)(a1 + 4);
v4 = *(_BYTE *)(a1 + 262) & 3;
v5 = 255;
switch ( v4 )
{
case 0:
v5 = byte_E8004[v2 & 0x1F];
break;
case 1:
v5 = (8 * v2) ^ ((unsigned int)(char)v2 >> 7);
goto LABEL_5;
case 2:
break;
case 3:
LOBYTE(v5) = sub_4F410((int *)(*(_DWORD *)a1 + 2460));
LOBYTE(v2) = *(_BYTE *)(a1 + 230);
LABEL_5:
v5 = (unsigned __int8)v5;
break;
}
v6 = *(unsigned __int8 *)(a1 + 232) * v5;
v7 = -(v6 >> 7);
if ( (char)v2 > -1 )
v7 = v6 >> 7;
*(_DWORD *)(v3 + 56) = v7;
v8 = *(_BYTE *)(a1 + 231) + v2;
if ( v8 > 31 )
v8 -= 64;
*(_BYTE *)(a1 + 230) = v8;
*(_BYTE *)(v3 + 36) |= 1u;
return 0;
}