int __fastcall VgaModeProgramGc(int this, unsigned int a2)
{
int v3; // edx
unsigned int v4; // esi
int v5; // ecx
unsigned int v6; // edi
int v7; // ecx
int v8; // ecx
int v9; // ecx
int v10; // ecx
int v11; // ecx
int v12; // ecx
int v13; // ecx
v4 = PciRegRead(*(_DWORD *)(this + 60), 510525444) & 0xFFFFFFFC;
v6 = PciRegRead(v5, v3 + 16) & 0xFFFFFF00;
PciRegWrite(v7, -1609564160, 1094861636);
PciRegWrite(v8, -1877999616, 892745528);
PciRegWrite(v9, -2012217344, 690629420);
PciRegWrite(v10, -2146435072, 488513296);
if ( PciRegRead(v11, -1609564160) == 1094861636 )
{
v4 |= 3u;
a2 >>= 24;
}
else
{
if ( PciRegRead(v12, -1877999616) == 892745528 )
{
v4 |= 2u;
a2 >>= 16;
}
else if ( PciRegRead(v12, -2012217344) == 690629420 )
{
v4 |= 1u;
a2 >>= 8;
}
a2 = (unsigned __int8)a2;
}
PciRegWrite(v12, 510525444, v4);
return PciRegWrite(v13, 510525460, a2 | v6);
}