Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char __thiscall sub_1048E950(LPVOID lpParameter)
- {
- LPVOID v1; // esi@1
- void *v2; // eax@2
- void *v4; // ST14_4@8
- HINSTANCE v5; // ecx@9
- HANDLE v6; // eax@10
- void *v7; // eax@12
- void *v8; // ST14_4@16
- WNDCLASSEXW v9; // [sp+Ch] [bp-38h]@9
- HWND hWnd; // [sp+3Ch] [bp-8h]@1
- DWORD ExitCode; // [sp+40h] [bp-4h]@2
- v1 = lpParameter;
- hWnd = FindWindowExW(HWND_MESSAGE, 0, L"IGOIPC Server", L"IGOIPC Server");
- if ( hWnd )
- {
- v2 = (void *)*((_DWORD *)v1 + 3);
- ExitCode = 0;
- if ( v2 )
- {
- if ( GetExitCodeThread(v2, &ExitCode)
- && ExitCode == 259
- && WaitForSingleObject(*((HANDLE *)v1 + 3), 0x3E8u) == 258 )
- return 1;
- }
- }
- if ( *((_DWORD *)v1 + 3) )
- {
- v4 = (void *)*((_DWORD *)v1 + 5);
- *((_BYTE *)v1 + 8) = 1;
- SetEvent(v4);
- WaitForSingleObject(*((HANDLE *)v1 + 3), 0x9C4u);
- TerminateThread(*((HANDLE *)v1 + 3), 0);
- CloseHandle(*((HANDLE *)v1 + 3));
- *((_DWORD *)v1 + 3) = 0;
- }
- DestroyWindow(hWnd);
- UnregisterClassW(L"IGOIPC Server", *((HINSTANCE *)v1 + 7));
- memset(&v9, 0, 0x30u);
- v5 = (HINSTANCE)*((_DWORD *)v1 + 7);
- v9.cbSize = 48;
- v9.style = 0;
- v9.lpfnWndProc = sub_1048E520;
- v9.hInstance = v5;
- v9.hCursor = 0;
- v9.hbrBackground = 0;
- v9.lpszClassName = L"IGOIPC Server";
- if ( RegisterClassExW(&v9) )
- {
- v6 = CreateThread(0, 0, sub_1048E620, v1, 0, 0);
- *((_DWORD *)v1 + 3) = v6;
- if ( v6 )
- {
- if ( !WaitForSingleObject(*((HANDLE *)v1 + 4), 0x9C4u) )
- {
- v7 = (void *)*((_DWORD *)v1 + 3);
- ExitCode = 0;
- if ( v7 )
- {
- if ( GetExitCodeThread(v7, &ExitCode)
- && ExitCode == 259
- && WaitForSingleObject(*((HANDLE *)v1 + 3), 0x3E8u) == 258 )
- return 1;
- }
- }
- v8 = (void *)*((_DWORD *)v1 + 5);
- *((_BYTE *)v1 + 8) = 1;
- SetEvent(v8);
- WaitForSingleObject(*((HANDLE *)v1 + 3), 0x9C4u);
- TerminateThread(*((HANDLE *)v1 + 3), 0);
- CloseHandle(*((HANDLE *)v1 + 3));
- *((_DWORD *)v1 + 3) = 0;
- }
- DestroyWindow(hWnd);
- UnregisterClassW(L"IGOIPC Server", *((HINSTANCE *)v1 + 7));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement