HalpQueryDebuggerInformation
NTSTATUS __stdcall HalpQueryDebuggerInformation(
_DEBUGGING_DEVICE_IN_USE_INFORMATION *OutputBuffer,
UINT64 Size,
UINT64 *ReturnedLength){
__int64 *v3;
int v4;
unsigned int v6;
__int64 v9;
__int64 v10;
int v11;
char *v12;
unsigned int v13;
unsigned int v14;
int v15;
unsigned int v16;
WCHAR *v17;
*(_DWORD *)ReturnedLength = 4;
v3 = (__int64 *)qword_140C48AC8;
v4 = 0;
v6 = Size;
if( (__int64 *)qword_140C48AC8 == &qword_140C48AC8 )
return -1073741823;
do
{
v9 = v3[2];
v10 = *(unsigned int *)ReturnedLength;
v11 = *(_DWORD *)(v9 + 220);
v12 = (char *)OutputBuffer + v10;
if( v11 )
{
if( v11 != 1 )
return -1073741823;
v14 = *(_DWORD *)(v9 + 232) + 2;
v15 = *(_DWORD *)(v9 + 232) + 22;
v16 = v15 + v10;
*(_DWORD *)ReturnedLength = v16;
if( v16 <= v6 )
{
*(_DWORD *)v12 = 1;
*((_DWORD *)v12 + 1) = v15;
*((_DWORD *)v12 + 2) = *(_DWORD *)(v9 + 232);
if( *(_DWORD *)(v9 + 232) )
{
v17 = *(WCHAR **)(v9 + 224);
if( v17 )
wcscpy_s((PWCHAR)v12 + 6, (unsigned __int64)v14 >> 1, v17);
}
}
}
else
{
v13 = v10 + 20;
*(_DWORD *)ReturnedLength = v13;
if( v13 <= v6 )
{
*(_DWORD *)v12 = 0;
*((_DWORD *)v12 + 1) = 20;
*((_DWORD *)v12 + 3) = *(_DWORD *)v9;
*((_DWORD *)v12 + 4) = *(_DWORD *)(v9 + 4);
*((_WORD *)v12 + 4) = *(_WORD *)(v9 + 8);
}
}
v3 = (__int64 *)*v3;
++v4;
}
while( v3 != &qword_140C48AC8 );
if( !v4 )
return -1073741823;
if( *(_DWORD *)ReturnedLength > v6 )
return -2147483643;
OutputBuffer->DeviceCount = DevicesList;
return 0;
}Referenced by:
HaliQuerySystemInformation