HdlspEnableTerminal
NTSTATUS __stdcall HdlspEnableTerminal(UINT8 bEnable){
unsigned int v1;
UINT8 IsMMIOAddress;
int v3;
__int64 v4;
__int64 v6;
if( bEnable == 1 )
{
v1 = *(_DWORD *)(*(&stru_140CF2E80 + 920) + 48i64);
if( (v1 & 1) == 0 )
{
IsMMIOAddress = *(_BYTE *)(*(&stru_140CF2E80 + 920) + 116i64);
if( !IsMMIOAddress || (v1 & 2) == 0 )
{
v3 = InbvPortInitialize(
*(unsigned int *)(*(&stru_140CF2E80 + 920) + 52i64),
(v1 >> 9) & 7,
*(UINT8 **)(*(&stru_140CF2E80 + 920) + 64i64),
(UINT64 *)(*(&stru_140CF2E80 + 920) + 56i64),
IsMMIOAddress,
*(_BYTE *)(*(&stru_140CF2E80 + 920) + 85i64));
v4 = *(&stru_140CF2E80 + 920);
*(_DWORD *)(*(&stru_140CF2E80 + 920) + 48i64) ^= (*(_DWORD *)(*(&stru_140CF2E80 + 920) + 48i64) ^ v3) & 1;
if( (*(_DWORD *)(v4 + 48) & 1) == 0 )
return -1073741823;
HdlspSendStringAtBaud((UINT8 *)"\x1B[2J");
HdlspSendStringAtBaud((UINT8 *)"\x1B[H");
}
}
}
else if( !bEnable )
{
InbvPortTerminate(*(unsigned int *)(*(&stru_140CF2E80 + 920) + 56i64));
*(_DWORD *)(v6 + 56) = 0;
*(_DWORD *)(v6 + 48) &= ~1u;
}
return 0;
}Referenced by:
HdlspDispatch
HeadlessInit