SdbpGetMatchingTextAttributes
__int64 __fastcall SdbpGetMatchingTextAttributes(
void *a1,
UINT64 a2,
_QWORD *a3,
_QWORD *a4,
unsigned int *a5,
_DWORD *a6,
int *a7){
unsigned int v7;
int v8;
unsigned int v9;
void *v11;
unsigned int FirstTag;
_WORD *StringTagPtr;
_WORD *v14;
unsigned int v15;
unsigned int v16;
unsigned int TagDataSize;
VOID *v18;
INT64 v19;
unsigned int v20;
void *v21;
unsigned int v22;
int DWORDTag;
unsigned int v24;
v7 = 0;
*a3 = 0i64;
v8 = 0x2000;
*a4 = 0i64;
v9 = a2;
*a5 = 0;
v11 = 0i64;
*a6 = 0;
*a7 = 0x2000;
FirstTag = SdbFindFirstTag((INT64)a1, a2, 24577);
if( !FirstTag )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x61Aui64, "Failed to get MATCHING_TEXT file path");
return v7;
}
StringTagPtr = (_WORD *)SdbGetStringTagPtr((RTL_RUN_ONCE *)a1, FirstTag);
v14 = StringTagPtr;
if( !StringTagPtr || !*StringTagPtr )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x620ui64, "Failed to read MATCHING_TEXT file path");
LABEL_22:
if( v11 )
ExFreePoolWithTag(v11, 0x74705041u);
return v7;
}
v15 = SdbFindFirstTag((INT64)a1, v9, 36883);
v16 = v15;
if( !v15 )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x629ui64, "Failed to read text to match");
return v7;
}
TagDataSize = SdbGetTagDataSize((INT64)a1, v15);
v20 = TagDataSize;
if( !TagDataSize )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x62Fui64, "Failed to get text to match blob");
return v7;
}
v21 = AslAlloc(v18, TagDataSize + 2i64, v19);
v11 = v21;
if( !v21 )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x635ui64, "Failed to allocate memory for text blob");
return v7;
}
if( !(unsigned int)SdbReadBinaryTag((__int64)a1, v16, v21, v20) )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x63Aui64, "Failed to read matching text blob");
goto LABEL_22;
}
v22 = SdbFindFirstTag((INT64)a1, v9, 16467);
if( !v22 )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x643ui64, "Failed to read text encoding");
goto LABEL_22;
}
DWORDTag = SdbReadDWORDTag((INT64)a1, v22, 0i64);
if( !DWORDTag )
{
AslLogCallPrintf(1ui64, "SdbpGetMatchingTextAttributes", 0x649ui64, "Failed to read encoding type");
goto LABEL_22;
}
v24 = SdbFindFirstTag((INT64)a1, v9, 16385);
if( v24 )
v8 = SdbReadDWORDTag((INT64)a1, v24, 0x2000ui64);
v7 = 1;
*a3 = v14;
*a4 = v11;
*a5 = v20;
*a6 = DWORDTag;
*a7 = v8;
return v7;
}Referenced by:
SdbpCheckMatchingText