HalpGetSetCmosData
INT64 __fastcall HalpGetSetCmosData(INT64 a1, INT64 a2, INT64 a3, INT64 a4, CHAR a5){
_BYTE *v5;
unsigned int v6;
unsigned int v8;
__int64 v9;
unsigned int v10;
__int64 v11;
v5 = (_BYTE *)a3;
v6 = a2;
if( (unsigned int)a1 >= 2 )
return 0i64;
v8 = a2;
v9 = 3i64 * (unsigned int)a1;
v10 = HalpCmosBusParameterTable[3 * (unsigned int)a1];
if( (int)a2 + (int)a4 - 1 <= v10 )
v10 = a2 + a4 - 1;
HalpAcquireCmosSpinLock(a1, a2, a3);
if( v6 <= v10 )
{
if( a5 )
{
do
{
LOBYTE(v11) = *v5;
((void(__fastcall *)(_QWORD, __int64))*(&funcs_1404C9962 + v9))(v8, v11);
++v5;
++v8;
}
while( v8 <= v10 );
}
else
{
do
*v5++ = ((__int64(__fastcall *)(_QWORD))funcs_1404C9947[v9])(v8++);
while( v8 <= v10 );
}
}
_InterlockedExchange(&HalpSystemHardwareLock, -1);
if( (_BYTE)HalpSystemHardwareLockInterruptsEnabled )
_enable();
return v8 - v6;
}Referenced by:
HalGetBusDataByOffset
HalSetBusDataByOffset
HalpGetCmosData
HalpSetCmosData