Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. void __fastcall PaintWatermark( HDC hdcIn, const struct tagRECT *rectIn )
  2. {
  3. const struct tagRECT *rect; // r14
  4. HDC hDc; // rbx
  5. __int64 hFont; // rdi
  6. __int64 v5; // rsi
  7. __int64 v6; // rcx
  8. __int64 v7; // rcx
  9. __int64 v8; // rcx
  10. struct tagSIZE size; // [rsp+90h] [rbp+18h]
  11.  
  12. rect = rectIn;
  13. hDc = hdcIn;
  14. hFont = NULL;
  15.  
  16. if ( gbGreTextReady && *(*gpsi + 0x874) )
  17. {
  18. v5 = GetDPIServerInfo( );
  19.  
  20. if ( *(v5 + 8) )
  21. hFont = GreSelectFont( hDc );
  22.  
  23. if ( *gdwInAtomicOperation && *gdwExtraInstrumentations & 1 )
  24. {
  25. //WIN32K_ATOMIC_CHECK_FAILURE
  26. KeBugCheckEx( 0x160u, *gdwInAtomicOperation, NULL, NULL, NULL );
  27. }
  28. EnterRenderBlock( );
  29. UserSessionSwitchLeaveCrit( );
  30. EnterSharedCrit( NULL, 1 );
  31. EnterSharedRenderCrit( );
  32. GreSetBkMode( hDc );
  33. GreSetTextColor( hDc );
  34. if ( GreGetTextExtentW( hDc, &gwszSafeModeStr, gSafeModeStrLen, &size ) )
  35. {
  36. GreExtTextOutWInternal( hDc, rect->left, rect->top, 0, NULL, &gwszSafeModeStr, gSafeModeStrLen, NULL, NULL, 0 );
  37. GreExtTextOutWInternal( hDc,(rect->right - size.cx), rect->top, 0,NULL,&gwszSafeModeStr,gSafeModeStrLen,NULL,NULL,0 );
  38. GreExtTextOutWInternal( hDc,(rect->right - size.cx),(rect->bottom - *(v5 + 40)),0,NULL,&gwszSafeModeStr,gSafeModeStrLen,NULL,NULL,0 );
  39. GreExtTextOutWInternal( hDc,rect->left,(rect->bottom - *(v5 + 40)),0,NULL,&gwszSafeModeStr,gSafeModeStrLen,NULL,NULL,0 );
  40. }
  41. GreSetBkMode( hDc );
  42. GreSetTextColor( hDc );
  43. LeaveRenderBlock( v6 );
  44. LeaveRenderCrit( v7 );
  45. UserSessionSwitchLeaveCrit( v8 );
  46. EnterCrit( NULL, 1i64 );
  47.  
  48. if ( hFont )
  49. GreSelectFont(hDc);
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement