KdpFillMemory
INT64 __fastcall KdpFillMemory(INT64 a1, INT64 a2){
char *v2;
int v3;
INT64 v4;
__int64 v5;
NTSTATUS v7;
__int16 v8;
int v9;
char *v10;
char *v11;
int v12;
UINT64 v13;
char *v14;
bool v15;
UINT64 Flags;
__int128 v18;
UINT64 ActualSize;
v2 = *(char **)(a2 + 8);
v3 = *(_DWORD *)(a1 + 24);
v4 = a1;
v5 = *(unsigned __int16 *)(a1 + 30);
v7 = 0;
v18 = 0i64;
v8 = *(_WORD *)(v4 + 28);
v9 = 5;
v10 = &v2[v5];
v11 = v2;
v12 = 0;
if( (v8 & 2) != 0 )
{
v9 = 7;
}
else if( (v8 & 1) == 0 )
{
v7 = -1073741811;
}
if( !(_WORD)v5 || *(_WORD *)a2 < (unsigned __int16)v5 )
v7 = -1073741811;
if( v7 >= 0 )
{
v13 = *(_QWORD *)(v4 + 16);
if( v3 )
{
do
{
LODWORD(Flags) = v9;
--v3;
v7 = KdpCopyMemoryChunks(v13, v11, 1ui64, 0i64, Flags, &ActualSize);
if( v7 < 0 )
break;
v14 = v11 + 1;
++v13;
++v12;
v15 = v11 + 1 == v10;
v11 = v2;
if( !v15 )
v11 = v14;
}
while( v3 );
if( v12 )
v7 = 0;
v4 = a1;
}
}
*(_DWORD *)(v4 + 8) = v7;
*(_DWORD *)(v4 + 24) = v12;
LOWORD(v18) = 56;
*((_QWORD *)&v18 + 1) = v4;
return KdSendPacket(2i64, &v18, 0i64, &KdpContext);
}Referenced by:
KdpSendWaitContinue