Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.19 KB | None | 0 0
  1. char __thiscall sub_1048E950(LPVOID lpParameter)
  2. {
  3.   LPVOID v1; // esi@1
  4.   void *v2; // eax@2
  5.   void *v4; // ST14_4@8
  6.   HINSTANCE v5; // ecx@9
  7.   HANDLE v6; // eax@10
  8.   void *v7; // eax@12
  9.   void *v8; // ST14_4@16
  10.   WNDCLASSEXW v9; // [sp+Ch] [bp-38h]@9
  11.   HWND hWnd; // [sp+3Ch] [bp-8h]@1
  12.   DWORD ExitCode; // [sp+40h] [bp-4h]@2
  13.  
  14.   v1 = lpParameter;
  15.   hWnd = FindWindowExW(HWND_MESSAGE, 0, L"IGOIPC Server", L"IGOIPC Server");
  16.   if ( hWnd )
  17.   {
  18.     v2 = (void *)*((_DWORD *)v1 + 3);
  19.     ExitCode = 0;
  20.     if ( v2 )
  21.     {
  22.       if ( GetExitCodeThread(v2, &ExitCode)
  23.         && ExitCode == 259
  24.         && WaitForSingleObject(*((HANDLE *)v1 + 3), 0x3E8u) == 258 )
  25.         return 1;
  26.     }
  27.   }
  28.   if ( *((_DWORD *)v1 + 3) )
  29.   {
  30.     v4 = (void *)*((_DWORD *)v1 + 5);
  31.     *((_BYTE *)v1 + 8) = 1;
  32.     SetEvent(v4);
  33.     WaitForSingleObject(*((HANDLE *)v1 + 3), 0x9C4u);
  34.     TerminateThread(*((HANDLE *)v1 + 3), 0);
  35.     CloseHandle(*((HANDLE *)v1 + 3));
  36.     *((_DWORD *)v1 + 3) = 0;
  37.   }
  38.   DestroyWindow(hWnd);
  39.   UnregisterClassW(L"IGOIPC Server", *((HINSTANCE *)v1 + 7));
  40.   memset(&v9, 0, 0x30u);
  41.   v5 = (HINSTANCE)*((_DWORD *)v1 + 7);
  42.   v9.cbSize = 48;
  43.   v9.style = 0;
  44.   v9.lpfnWndProc = sub_1048E520;
  45.   v9.hInstance = v5;
  46.   v9.hCursor = 0;
  47.   v9.hbrBackground = 0;
  48.   v9.lpszClassName = L"IGOIPC Server";
  49.   if ( RegisterClassExW(&v9) )
  50.   {
  51.     v6 = CreateThread(0, 0, sub_1048E620, v1, 0, 0);
  52.     *((_DWORD *)v1 + 3) = v6;
  53.     if ( v6 )
  54.     {
  55.       if ( !WaitForSingleObject(*((HANDLE *)v1 + 4), 0x9C4u) )
  56.       {
  57.         v7 = (void *)*((_DWORD *)v1 + 3);
  58.         ExitCode = 0;
  59.         if ( v7 )
  60.         {
  61.           if ( GetExitCodeThread(v7, &ExitCode)
  62.             && ExitCode == 259
  63.             && WaitForSingleObject(*((HANDLE *)v1 + 3), 0x3E8u) == 258 )
  64.             return 1;
  65.         }
  66.       }
  67.       v8 = (void *)*((_DWORD *)v1 + 5);
  68.       *((_BYTE *)v1 + 8) = 1;
  69.       SetEvent(v8);
  70.       WaitForSingleObject(*((HANDLE *)v1 + 3), 0x9C4u);
  71.       TerminateThread(*((HANDLE *)v1 + 3), 0);
  72.       CloseHandle(*((HANDLE *)v1 + 3));
  73.       *((_DWORD *)v1 + 3) = 0;
  74.     }
  75.     DestroyWindow(hWnd);
  76.     UnregisterClassW(L"IGOIPC Server", *((HINSTANCE *)v1 + 7));
  77.   }
  78.   return 0;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement