CmpGetBiosVersion
UINT8 __stdcall CmpGetBiosVersion(PSTR SearchArea, UINT64 SearchLength, PSTR VersionString){
_BYTE *v4;
_BYTE *v5;
char *p_Str;
unsigned __int16 v7;
char *v8;
char v9;
const CHAR *v10;
CHAR *v11;
__int16 v12;
UINT8 result;
unsigned __int16 i;
CHAR v15;
__int64 v16;
char Str;
if( SearchArea )
{
BiosBegin = (__int64)SearchArea;
Start = (__int64)(SearchArea + 1);
End = (__int64)&SearchArea[(unsigned int)SearchLength - 2];
}
while( 1 )
{
v4 = (_BYTE *)Start;
v5 = 0i64;
if( Start > (unsigned __int64)End )
return 0;
while( *v4 != 46 || (unsigned __int8)(v4[1] - 48) > 9u || (unsigned __int8)(*(v4 - 1) - 48) > 9u )
{
Start = (__int64)++v4;
if( (unsigned __int64)v4 > End )
goto LABEL_10;
}
v5 = v4;
LABEL_10:
if( (unsigned __int64)v4 > End )
return 0;
Str = 0;
Start = (__int64)(v4 + 2);
p_Str = &Str;
v7 = 0;
v8 = v5 - 1;
do
{
if( (unsigned __int64)v8 < BiosBegin )
break;
v9 = *v8;
if( *v8 < 32 )
break;
if( v9 == 36 )
break;
--p_Str;
--v8;
++v7;
*p_Str = v9;
}
while( v7 < 0x78u );
v10 = SearchStrings;
v11 = v8 + 1;
v12 = 0;
while( v10 )
{
if( strstr(p_Str, v10) )
{
for( ; v11; ++v11 )
{
if( *v11 != 32 )
break;
}
for( i = 0; i < 0x7Fu; ++i )
{
if( !v11 )
break;
if( (unsigned __int64)v11 > End + 1 )
break;
v15 = *v11;
if( *v11 < 32 )
break;
if( v15 == 36 )
break;
v16 = i;
++v11;
VersionString[v16] = v15;
}
result = 1;
VersionString[i] = 0;
return result;
}
v10 = (&SearchStrings)[(unsigned __int16)++v12];
}
}
}Referenced by:
CmpSetSystemBiosInformation
CmpSetVideoBiosInformation