EmpParseStrings
NTSTATUS __stdcall EmpParseStrings(PVOID ParsedInfHandle){
int v2;
unsigned int SectionLineCount;
unsigned int v4;
_BYTE *v5;
VOID **PoolWithTag;
unsigned int v7;
PSTR SectionLineIndex;
CHAR *v9;
__int64 v10;
VOID **v11;
__int64 v12;
PVOID *v13;
__int64 v14;
VOID **v16;
VOID **v17;
unsigned int v18;
__int64 v19;
signed __int64 v20;
v2 = 0;
SectionLineCount = EmpInfParseGetSectionLineCount(ParsedInfHandle, (INT8 *)"Strings");
v4 = SectionLineCount;
if( !SectionLineCount )
return v2;
v5 = qword_140C50898;
if( !qword_140C50898 )
{
PoolWithTag = ExAllocatePoolWithTag(1ui64, 8i64 * SectionLineCount, 1953058117i64);
qword_140C50898 = PoolWithTag;
if( PoolWithTag )
{
memset(PoolWithTag, 0i64, 8 * v4);
goto LABEL_5;
}
return -1073741670;
}
v16 = ExAllocatePoolWithTag(1ui64, 8i64 * (SectionLineCount + dword_140C50888), 1953058117i64);
qword_140C50898 = v16;
v17 = v16;
if( !v16 )
return -1073741670;
v18 = dword_140C50888;
memset(v16, 0i64, 8 * (dword_140C50888 + v4));
if( v18 )
{
v19 = v18;
v20 = v5 - (_BYTE *)v17;
do
{
*v17 = *(VOID **)((char *)v17 + v20);
++v17;
--v19;
}
while( v19 );
}
ExFreePoolWithTag(v5, 0x74694D45u);
LABEL_5:
v7 = 0;
while( v7 < v4 )
{
SectionLineIndex = CmpGetSectionLineIndex(ParsedInfHandle, (PSTR)"Strings", v7, 0i64);
v9 = SectionLineIndex;
if( SectionLineIndex )
{
v10 = -1i64;
do
++v10;
while( SectionLineIndex[v10] );
v11 = ExAllocatePoolWithTag(1ui64, v10 + 1, 1953058117i64);
v12 = dword_140C50888;
v13 = (PVOID *)qword_140C50898;
*((_QWORD *)qword_140C50898 + dword_140C50888) = v11;
if( !v11 )
return -1073741670;
v14 = -1i64;
do
++v14;
while( v9[v14] );
v2 = RtlStringCchCopyA((CHAR *)v11, v14 + 1, v9);
if( v2 < 0 )
{
ExFreePoolWithTag(v13[v12], 0x74694D45u);
v2 = 0;
}
else
{
++dword_140C50888;
}
++v7;
}
}
return v2;
}Referenced by:
EmpParseInfDatabase