HdlspSetBlueScreenInformation
__int64 __fastcall HdlspSetBlueScreenInformation(unsigned int *a1, __int64 a2){
__int64 v2;
unsigned int v5;
unsigned __int64 v6;
__int64 v7;
VOID **v8;
VOID **i;
unsigned __int8 *v10;
int v11;
int v12;
__int64 v13;
char *v14;
__int64 v15;
char *PoolWithTag;
char *v17;
__int64 v18;
VOID **v19;
VOID *v20;
void *v21;
char *v22;
char *v23;
__int64 v24;
v2 = *(&stru_140CF2E80 + 920);
if( (*(_DWORD *)(*(&stru_140CF2E80 + 920) + 48i64) & 2) != 0 )
return 3221225473i64;
v5 = 0;
if( a1 )
{
v6 = *a1;
if( (unsigned int)v6 >= 2 )
{
v7 = (unsigned int)v6;
if( v6 < a2 - 8 && !*((_BYTE *)a1 + (unsigned int)(v6 - 1) + 4) && !*((_BYTE *)a1 + a2 - 4) )
{
v8 = *(VOID ***)(*(&stru_140CF2E80 + 920) + 40i64);
for( i = v8; i; i = (VOID **)i[2] )
{
v10 = (unsigned __int8 *)*i;
do
{
v11 = v10[(char *)(a1 + 1) - (_BYTE *)*i];
v12 = *v10 - v11;
if( v12 )
break;
++v10;
}
while( v11 );
if( !v12 )
break;
v8 = i;
}
v13 = -1i64;
v14 = (char *)a1 + v7;
v15 = -1i64;
do
++v15;
while( v14[v15 + 4] );
if( i )
{
if( v15 )
{
PoolWithTag = (char *)ExAllocatePoolWithTag(0x200ui64, v15 + 1, 1936483400i64);
v17 = PoolWithTag;
if( PoolWithTag )
{
strcpy_s(PoolWithTag, v15 + 1, v14 + 4);
v18 = *(&stru_140CF2E80 + 920);
v19 = (VOID **)i[1];
i[1] = v17;
if( (*(_DWORD *)(v18 + 48) & 2) == 0 )
goto LABEL_40;
}
else
{
return(unsigned int)-1073741801;
}
return v5;
}
v20 = i[2];
v8[2] = v20;
if( *(VOID ***)(v2 + 40) == i )
*(_QWORD *)(v2 + 40) = v20;
if( (*(_DWORD *)(v2 + 48) & 2) != 0 )
return v5;
ExFreePoolWithTag(i[1], 0);
v21 = *i;
}
else
{
if( !v15 )
return(unsigned int)-1073741811;
i = ExAllocatePoolWithTag(0x200ui64, 0x18ui64, 1936483400i64);
if( !i )
return v5;
v22 = (char *)ExAllocatePoolWithTag(0x200ui64, v15 + 1, 1936483400i64);
i[1] = v22;
if( !v22 )
{
v5 = -1073741801;
goto LABEL_39;
}
strcpy_s(v22, v15 + 1, v14 + 4);
do
++v13;
while( *((_BYTE *)a1 + v13 + 4) );
if( v13 )
{
v23 = (char *)ExAllocatePoolWithTag(0x200ui64, v13 + 1, 1936483400i64);
*i = v23;
if( v23 )
{
strcpy_s(v23, v13 + 1, (PSTR)a1 + 4);
v24 = *(&stru_140CF2E80 + 920);
i[2] = *(VOID **)(*(&stru_140CF2E80 + 920) + 40i64);
*(_QWORD *)(v24 + 40) = i;
return v5;
}
v5 = -1073741801;
}
else
{
v5 = -1073741811;
}
v21 = i[1];
}
ExFreePoolWithTag(v21, 0);
LABEL_39:
v19 = i;
LABEL_40:
ExFreePoolWithTag(v19, 0);
return v5;
}
}
}
return 3221225485i64;
}Referenced by:
HdlspDispatch