int __thiscall PciRegWriteViaBar(int *this)
{
int v1; // ecx
int v2; // ecx
int v3; // esi
int v4; // eax
int v5; // edx
PciRegWrite(*this, 510525552, 0);
PciRegWrite(v1, 510525552, 133);
v3 = 0;
while ( 1 )
{
v4 = PciRegRead(v2, 510525552) & 0x3000;
if ( (v4 & 0x2000) != 0 )
break;
if ( (unsigned int)++v3 > 0x4C4B40 )
{
PciRegWrite(v2, v5, 0);
return 0;
}
if ( v4 )
{
PciRegWrite(v2, v5, 0);
return 1;
}
}
return 0;
}