Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. bool __thiscall sub_1048EBE0(void *this, int a2, signed int Mode)
  2. {
  3.   void *v3; // esi@1
  4.   bool result; // al@2
  5.   HANDLE v5; // eax@3
  6.   WCHAR NamedPipeName; // [sp+4h] [bp-100h]@1
  7.   char v7; // [sp+6h] [bp-FEh]@1
  8.  
  9.   v3 = this;
  10.   NamedPipeName = 0;
  11.   memset(&v7, 0, 0xFEu);
  12.   *((_DWORD *)v3 + 2) = a2;
  13.   wsprintfW(&NamedPipeName, L"\\\\.\\pipe\\IGO_pipe_%d", a2);
  14.   if ( WaitNamedPipeW(&NamedPipeName, 0) )
  15.   {
  16.     *((_BYTE *)v3 + 70) = Mode;
  17.     v5 = CreateFileW(&NamedPipeName, 0xC0000000u, 0, 0, 3u, 0x40000000u, 0);
  18.     *((_DWORD *)v3 + 1) = v5;
  19.     if ( v5 != (HANDLE)-1 )
  20.     {
  21.       Mode = 2;
  22.       SetNamedPipeHandleState(v5, (LPDWORD)&Mode, 0, 0);
  23.       if ( *((_BYTE *)v3 + 70) )
  24.       {
  25.         *((_DWORD *)v3 + 33) = 2;
  26.         *((_BYTE *)v3 + 69) = 0;
  27.         sub_1048EB40(v3);
  28.       }
  29.     }
  30.     result = *((_DWORD *)v3 + 1) != -1;
  31.   }
  32.   else
  33.   {
  34.     result = 0;
  35.   }
  36.   return result;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement