Advertisement
sv_iridescence

Untitled

Jan 18th, 2022
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.58 KB | None | 0 0
  1. __int16 Sys_CreateConsole()
  2. {
  3.   HWND hWndParent; // rax
  4.   int SystemMetrics; // edi
  5.   int v2; // esi
  6.   HMODULE ModuleHandleA; // rax
  7.   LPARAM v4; // r14
  8.   HWND v5; // rbx
  9.   int v6; // ecx
  10.   int v7; // er8
  11.   WNDCLASSA WndClass; // [rsp+60h] [rbp-29h] BYREF
  12.   struct tagRECT Rect; // [rsp+B0h] [rbp+27h] BYREF
  13.  
  14.   *(_QWORD *)&WndClass.style = 0i64;
  15.   *(_QWORD *)&WndClass.cbClsExtra = 0i64;
  16.   WndClass.lpszMenuName = 0i64;
  17.   WndClass.lpfnWndProc = DefWindowProcA;
  18.   WndClass.hInstance = hInstance;
  19.   WndClass.hIcon = LoadIconA(hInstance, (LPCSTR)1);
  20.   WndClass.hbrBackground = (HBRUSH)6;
  21.   WndClass.hCursor = LoadCursorA(0i64, (LPCSTR)&loc_7F00);
  22.   WndClass.lpszClassName = "CoD Splash Screen";
  23.   LOWORD(hWndParent) = RegisterClassA(&WndClass);
  24.   if ( (_WORD)hWndParent )
  25.   {
  26.     SystemMetrics = GetSystemMetrics(16);
  27.     v2 = GetSystemMetrics(17);
  28.     ModuleHandleA = GetModuleHandleA(0i64);
  29.     hWndParent = (HWND)LoadImageA(ModuleHandleA, (LPCSTR)0x64, 0, 0, 0, 0x4000u);
  30.     v4 = (LPARAM)hWndParent;
  31.     if ( hWndParent )
  32.     {
  33.       hWndParent = CreateWindowExA(
  34.                      0x40000u,
  35.                      "CoD Splash Screen",
  36.                      "Call of Duty®: Modern Warfare® Remastered Multiplayer",
  37.                      0x80880000,
  38.                      (SystemMetrics - 320) / 2,
  39.                      (v2 - 100) / 2,
  40.                      320,
  41.                      100,
  42.                      0i64,
  43.                      0i64,
  44.                      hInstance,
  45.                      0i64);
  46.       off_C9DCF58 = hWndParent;
  47.       if ( hWndParent )
  48.       {
  49.         hWndParent = CreateWindowExA(0, "Static", 0i64, 0x5000000Eu, 0, 0, 320, 100, hWndParent, 0i64, hInstance, 0i64);
  50.         v5 = hWndParent;
  51.         if ( hWndParent )
  52.         {
  53.           SendMessageA(hWndParent, 0x172u, 0i64, v4);
  54.           GetWindowRect(v5, &Rect);
  55.           v6 = Rect.right - Rect.left + 2;
  56.           v7 = Rect.bottom - Rect.top + 2;
  57.           Rect.left = (SystemMetrics - v6) / 2;
  58.           Rect.right = v6 + Rect.left;
  59.           Rect.top = (v2 - v7) / 2;
  60.           Rect.bottom = v7 + Rect.top;
  61.           AdjustWindowRect(&Rect, 0x5000000Eu, 0);
  62.           LOWORD(hWndParent) = SetWindowPos(
  63.                                  off_C9DCF58,
  64.                                  0i64,
  65.                                  Rect.left,
  66.                                  Rect.top,
  67.                                  Rect.right - Rect.left,
  68.                                  Rect.bottom - Rect.top,
  69.                                  4u);
  70.         }
  71.       }
  72.     }
  73.   }
  74.   return (__int16)hWndParent;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement