GreSpDwmSyncCaptureSurfaceBits
[C++] 纯文本查看 复制代码 __int64 __fastcall xxxPrintWindow(__int64 pwnd, HDC hdc, char flags)
{
_DWORD *v3; // r9
int v5; // edi
int v6; // r12d
int v7; // r14d
int v8; // r13d
int v9; // r15d
__int64 StyleWindow; // rax
__int64 v11; // rbx
__int64 v12; // rax
__int128 v13; // xmm0
__int64 v14; // rax
__m128i v15; // xmm0
unsigned int v16; // edi
float *v17; // rax
float v18; // xmm2_4
int v19; // eax
__int64 v20; // rcx
__int64 DCEx; // rbx
__int128 v23; // [rsp+60h] [rbp-9h] BYREF
__int64 v24; // [rsp+70h] [rbp+7h] BYREF
int v25; // [rsp+78h] [rbp+Fh]
int v26; // [rsp+7Ch] [rbp+13h]
__int128 v27; // [rsp+80h] [rbp+17h] BYREF
int v29; // [rsp+E0h] [rbp+77h]
v29 = 0;
v3 = *(_DWORD **)(pwnd + 40);
v27 = 0i64;
v5 = flags & 1;
if ( (flags & 1) != 0 )
{
v6 = v3[26] - v3[22];
v7 = v3[28] - v3[26];
v8 = v3[27] - v3[23];
v9 = v3[29] - v3[27];
}
else
{
v6 = 0;
v7 = v3[24] - v3[22];
v8 = 0;
v9 = v3[25] - v3[23];
}
if ( (flags & 2) != 0
&& (unsigned int)IsWindowDesktopComposed(pwnd)
&& (StyleWindow = GetStyleWindow(pwnd, 2568), (v11 = StyleWindow) != 0) )
{
if ( StyleWindow != pwnd )
{
v12 = *(_QWORD *)(pwnd + 40);
if ( v5 )
v13 = *(_OWORD *)(v12 + 104);
else
v13 = *(_OWORD *)(v12 + 88);
v14 = *(_QWORD *)(v11 + 40);
v23 = v13;
v15 = *(__m128i *)(v14 + 88);
LODWORD(v14) = _mm_cvtsi128_si32(v15);
HIDWORD(v23) -= v15.m128i_i32[1];
DWORD1(v23) -= v15.m128i_i32[1];
LODWORD(v23) = v23 - v14;
DWORD2(v23) -= v14;
v25 = v15.m128i_i32[2] - v14;
v26 = v15.m128i_i32[3] - v15.m128i_i32[1];
v24 = 0i64;
v16 = IntersectRect(&v27, (int *)&v24, (int *)&v23);
if ( !v16 )
return v16;
v6 = v27;
v7 = DWORD2(v27) - v27;
v8 = DWORD1(v27);
v9 = HIDWORD(v27) - DWORD1(v27);
}
if ( gdwInAtomicOperation && (gdwExtraInstrumentations & 1) != 0 )
KeBugCheckEx(0x160u, gdwInAtomicOperation, 0i64, 0i64, 0i64);
UserSessionSwitchLeaveCrit();
v17 = *(float **)(v11 + 216);
v18 = FLOAT_1_0;
if ( v17 )
v18 = *v17;
v16 = GreSpDwmSyncCaptureSurfaceBits(*(HWND *)v11, hdc, v18, v6, v8, v7, v9);
EnterCrit(0i64, 1i64);
}
else
{
if ( (GetRedirectionFlags(pwnd) & 8) == 0 )
{
v19 = SetRedirectedWindow(pwnd, 8i64);
v20 = *(_QWORD *)(pwnd + 40);
if ( v19 < 0 )
return (*(unsigned __int8 *)(v20 + 26) >> 5) & 1;
*(_DWORD *)(v20 + 232) |= 4u;
v29 = 1;
}
v16 = 1;
xxxInternalUpdateWindow((struct tagWND *)pwnd, 1u);
DCEx = _GetDCEx(pwnd, 0i64, 3i64);
NtGdiBitBltInternal((_DWORD)hdc, 0, 0, v7, v9, DCEx, v6, v8, -2134114272, 0, 0);
_ReleaseDC(DCEx);
if ( v29 && (*(_DWORD *)(*(_QWORD *)(pwnd + 40) + 232i64) & 4) != 0 )
{
UnsetRedirectedWindow(pwnd, 8i64);
*(_DWORD *)(*(_QWORD *)(pwnd + 40) + 232i64) &= ~4u;
}
}
return v16;
} |