int __fastcall VgaModeSetOffset(int this, int n2)
{
int v3; // ecx
int v4; // ecx
int v5; // esi
int v6; // eax
int v7; // edx
int v8; // esi
PciRegWrite(*(_DWORD *)(this + 60), 510525552, 0);
PciRegWrite(v3, 510525552, (8 * n2) | 0xC1);
v5 = 0;
while ( 1 )
{
v6 = PciRegRead(v4, 510525552) & 0x3000;
if ( (v6 & 0x2000) != 0 )
return 0;
if ( (unsigned int)++v5 > 0x4C4B40 )
{
v8 = 0;
goto LABEL_7;
}
if ( v6 )
{
v8 = 1;
LABEL_7:
PciRegWrite(v4, v7, 0);
return v8;
}
}
}